From 7d5c5a25e9c4b6fbcfccdd65de646ed84e590927 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Oskar=20Kwas=CC=81niewski?= Date: Mon, 23 Sep 2024 17:36:37 +0200 Subject: [PATCH] feat: get react-native package name from package.json --- .../scripts/codegen/generate-artifacts-executor.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/react-native/scripts/codegen/generate-artifacts-executor.js b/packages/react-native/scripts/codegen/generate-artifacts-executor.js index 50717a825e1ab5..1c3d5f955477c6 100644 --- a/packages/react-native/scripts/codegen/generate-artifacts-executor.js +++ b/packages/react-native/scripts/codegen/generate-artifacts-executor.js @@ -59,7 +59,10 @@ const CORE_LIBRARIES_WITH_OUTPUT_FOLDER = { ), }, }; -const REACT_NATIVE = 'react-native'; + +const packageJsonPath = path.join(REACT_NATIVE_PACKAGE_ROOT_FOLDER, 'package.json') +const packageJson = JSON.parse(fs.readFileSync(packageJsonPath)); +const REACT_NATIVE = packageJson.name; const MODULES_PROTOCOLS_H_TEMPLATE_PATH = path.join( REACT_NATIVE_PACKAGE_ROOT_FOLDER,