mirror of
https://github.com/pezkuwichain/pezkuwi-common.git
synced 2026-10-25 04:45:02 +00:00
x-randomvalues read one export from react-native, NativeModules, and took its types from the deprecated @types/react-native, which depends on react-native itself: react-native 0.83, metro 0.83 and with them image-size (open advisory, fixed only in 2.x, which metro 0.83 does not accept). The two native modules it looks for are now declared in src/react-native-modules.d.ts; the casts to RNExt are gone and each module is checked before use. The published react-native.d.ts does not reference react-native, and react-native/metro leave the dependency tree. braces resolves to @pezkuwi/braces 3.0.4: braces 3.0.3, the latest upstream release, has an open advisory with no fixed version (CVE-2026-93687, stack exhaustion through deeply nested patterns); the fork rejects nesting deeper than maxDepth (500) with a SyntaxError.
19 lines
604 B
TypeScript
19 lines
604 B
TypeScript
// Copyright 2017-2026 @pezkuwi/x-randomvalues authors & contributors
|
|
// SPDX-License-Identifier: Apache-2.0
|
|
|
|
// The one React Native export react-native.ts reads, and only the native
|
|
// modules it looks for. Declared here instead of installing react-native for
|
|
// its types, which brought in its metro and CLI tree as well.
|
|
declare module 'react-native' {
|
|
interface RandomModules {
|
|
ExpoRandom?: {
|
|
getRandomBase64String: (length: number) => string;
|
|
};
|
|
RNGetRandomValues?: {
|
|
getRandomBase64: (length: number) => string;
|
|
};
|
|
}
|
|
|
|
export const NativeModules: RandomModules;
|
|
}
|