[LOCAL][RN][CI] Fix dry-run that was resetting the artefacts versions (#54494)

This commit is contained in:
Riccardo Cipolleschi authored and GitHub committed 2025-11-11 14:32:04 +00:00
1 parent 5efc57afc1
commit a0e40ec09f
3 files changed
+21 -15

No files matched your search

+12 -1
View File
@@ -8,7 +8,7 @@
* @format
*/
const {REPO_ROOT} = require('./consts');
const {REACT_NATIVE_PACKAGE_DIR, REPO_ROOT} = require('./consts');
const {promises: fs} = require('fs');
const glob = require('glob');
const path = require('path');
@@ -89,6 +89,16 @@ async function getWorkspaceRoot() /*: Promise<PackageInfo> */ {
return packageInfo;
}
/**
* Get the parsed package metadata for the main react-native package.
*/
async function getReactNativePackage() /*: Promise<PackageInfo> */ {
const [, packageInfo] = await parsePackageInfo(
path.join(REACT_NATIVE_PACKAGE_DIR, 'package.json'),
);
return packageInfo;
}
async function parsePackageInfo(
packageJsonPath /*: string */,
) /*: Promise<[string, PackageInfo]> */ {
@@ -158,4 +168,5 @@ module.exports = {
getPackages,
getWorkspaceRoot,
updatePackageJson,
getReactNativePackage,
};