mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
RN: Update set-versions for private/ Packages (#51937)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/51937 Updates the `set-versions` script to also update workspace packages in `private/*`. Unlike with packages in `packages/*`, this does not change their `"version"` fields, though. It only updates their dependencies. Changelog: [Internal] Reviewed By: huntie Differential Revision: D76358273 fbshipit-source-id: d0e0557d17c355828020a218083b98dd177a6732
This commit is contained in:
committed by
Facebook GitHub Bot
parent
c3bd624944
commit
df52bbe649
@@ -76,12 +76,15 @@ async function setVersion(
|
||||
includeReactNative: true,
|
||||
});
|
||||
const newPackageVersions = Object.fromEntries(
|
||||
Object.keys(packages).map(packageName => [
|
||||
packageName,
|
||||
packageName === 'react-native' && skipReactNativeVersion
|
||||
? '1000.0.0'
|
||||
: version,
|
||||
]),
|
||||
Object.entries(packages).map(([packageName, {packageJson}]) => {
|
||||
let packageVersion = version;
|
||||
if (packageName === 'react-native' && skipReactNativeVersion) {
|
||||
packageVersion = '1000.0.0';
|
||||
} else if (packageJson.private === true) {
|
||||
packageVersion = packageJson.version ?? '0.0.0';
|
||||
}
|
||||
return [packageName, packageVersion];
|
||||
}),
|
||||
);
|
||||
|
||||
const packagesToUpdate = [
|
||||
|
||||
@@ -13,7 +13,7 @@ const {promises: fs} = require('fs');
|
||||
const glob = require('glob');
|
||||
const path = require('path');
|
||||
|
||||
const WORKSPACES_CONFIG = 'packages/*';
|
||||
const WORKSPACES_CONFIG = '{packages,private}/*';
|
||||
|
||||
/*::
|
||||
export type PackageJson = {
|
||||
|
||||
Reference in New Issue
Block a user