🚀 Socket Launch Week Day 5:Introducing Repository Access Permissions and Custom Roles.Learn more
Sign In

@react-native/codegen

Package Overview
Dependencies
Maintainers
2
Versions
1093
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@react-native/codegen - npm Package Compare versions

Comparing version
0.85.0-nightly-20260210-4535df4f6
to
0.85.0-nightly-20260217-db45c280e
+10
-0
lib/parsers/error-utils.js

@@ -15,2 +15,3 @@ /**

IncorrectModuleRegistryCallArgumentTypeParserError,
IncorrectModuleRegistryCallArgumentValueParserError,
IncorrectModuleRegistryCallArityParserError,

@@ -288,2 +289,11 @@ IncorrectModuleRegistryCallTypeParameterParserError,

}
const value = callExpressionArg.value;
if (typeof value !== 'string' || !/^[a-zA-Z_][a-zA-Z0-9_]*$/.test(value)) {
throw new IncorrectModuleRegistryCallArgumentValueParserError(
nativeModuleName,
callExpressionArg,
methodName,
String(value),
);
}
}

@@ -290,0 +300,0 @@ function throwIfPartialNotAnnotatingTypeParameter(

@@ -332,2 +332,11 @@ /**

}
class IncorrectModuleRegistryCallArgumentValueParserError extends ParserError {
constructor(nativeModuleName, flowArgument, methodName, value) {
super(
nativeModuleName,
flowArgument,
`Please call TurboModuleRegistry.${methodName}<Spec>() with a safe module name. Module names must only contain alphanumeric characters and underscores (matching /^[a-zA-Z_][a-zA-Z0-9_]*$/). Got '${value.replace(/[^\x20-\x7e]/g, '?')}'`,
);
}
}
module.exports = {

@@ -360,2 +369,3 @@ ParserError,

IncorrectModuleRegistryCallArgumentTypeParserError,
IncorrectModuleRegistryCallArgumentValueParserError,
};
+2
-2
{
"name": "@react-native/codegen",
"version": "0.85.0-nightly-20260210-4535df4f6",
"version": "0.85.0-nightly-20260217-db45c280e",
"description": "Code generation tools for React Native",

@@ -33,3 +33,3 @@ "license": "MIT",

"@babel/core": "^7.25.2",
"@babel/parser": "^7.25.3",
"@babel/parser": "^7.29.0",
"hermes-parser": "0.33.3",

@@ -36,0 +36,0 @@ "invariant": "^2.2.4",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet