Skip to content

Commit

Permalink
Copy repo-config dependencies for bumping release version
Browse files Browse the repository at this point in the history
Summary:
Changelog: [Internal[Fixed] - Revert, yarn workspaces only used in private packages. Copy dependencies over from repo-config instead

Original commit changeset: 1dd2adc6a036

Reviewed By: fkgozali

Differential Revision: D30599065

fbshipit-source-id: 0efffaaf38bc23bac339e6e1d917736243e1750e
  • Loading branch information
Luna Wei authored and facebook-github-bot committed Sep 1, 2021
1 parent 65e58f2 commit 963254e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion repo-config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"type": "git",
"url": "git@github.com:facebook/react-native.git"
},
"devDependencies": {
"dependencies": {
"@babel/core": "^7.14.0",
"@babel/generator": "^7.14.0",
"@babel/template": "^7.0.0",
Expand Down
10 changes: 5 additions & 5 deletions scripts/bump-oss-version.js
Original file line number Diff line number Diff line change
Expand Up @@ -127,13 +127,13 @@ fs.writeFileSync(
);

let packageJson = JSON.parse(cat('package.json'));

packageJson.version = version;

// Only keep 'repo-config` workspace
packageJson.workspaces = packageJson.workspaces.filter(w => w === 'repo-config');

delete packageJson.workspaces;
delete packageJson.private;

// Copy dependencies over from repo-config/package.json
const repoConfigJson = JSON.parse(cat('repo-config/package.json'));
packageJson.devDependencies = {...packageJson.devDependencies, ...repoConfigJson.dependencies};
fs.writeFileSync('package.json', JSON.stringify(packageJson, null, 2), 'utf-8');

// Change ReactAndroid/gradle.properties
Expand Down

0 comments on commit 963254e

Please sign in to comment.