Skip to content

Commit 50e267b

Browse files
committed
Publish only updates react-native-web packages
The script to release react-native-web is now limited to version-locking related packages, not every package in the monorepo.
1 parent aee652f commit 50e267b

File tree

4 files changed

+13
-9
lines changed

4 files changed

+13
-9
lines changed

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"private": true,
3-
"version": "0.18.3",
3+
"version": "0.0.0",
44
"name": "monorepo",
55
"scripts": {
66
"clean": "del-cli ./packages/*/dist",
@@ -25,7 +25,7 @@
2525
"lint": "yarn lint:report --fix",
2626
"lint:report": "eslint configs packages scripts --config ./configs/.eslintrc",
2727
"prerelease": "yarn test && yarn compile",
28-
"release": "node ./scripts/releasePackages.js",
28+
"release": "node ./scripts/releaseReactNativeWebPackages.js",
2929
"postrelease": "yarn docs:release && yarn benchmarks:release",
3030
"test": "yarn flow && yarn fmt:report && yarn lint:report && yarn jest --runInBand"
3131
},

packages/benchmarks/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"private": true,
33
"name": "benchmarks",
4-
"version": "0.18.3",
4+
"version": "0.0.0",
55
"scripts": {
66
"dev": "mkdir -p dist && cp -f index.html dist/index.html && ./node_modules/.bin/webpack-cli --config ./webpack.config.js",
77
"build": "NODE_ENV=production yarn dev"

packages/dom-event-testing-library/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"private": true,
33
"name": "dom-event-testing-library",
4-
"version": "0.18.3",
4+
"version": "0.0.0",
55
"main": "index.js",
66
"description": "Browser event sequences for unit tests",
77
"author": "Nicolas Gallagher",

scripts/releasePackages.js renamed to scripts/releaseReactNativeWebPackages.js

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,17 @@ const version = argv._[0];
1515
const skipGit = argv['skip-git'];
1616
const oneTimeCode = argv.otp;
1717

18-
console.log(`Publishing ${version}`);
18+
console.log(`Publishing react-native-web@${version}`);
1919

20-
// Collect workspaces and package manifests
21-
const workspacePaths = require('../package.json').workspaces.concat(['./']);
20+
// Collect 'react-native-web' workspaces and package manifests
21+
const workspacePaths = require('../package.json').workspaces;
2222
const workspaces = workspacePaths.reduce((acc, curr) => {
23-
const packageDirectories = glob.sync(path.resolve(curr));
24-
packageDirectories.forEach((directory) => {
23+
const packageDirectories = glob.sync(curr);
24+
const subsetOfpackageDirectories = packageDirectories.filter((dir) => {
25+
return dir.includes('react-native-web');
26+
});
27+
subsetOfpackageDirectories.forEach((dir) => {
28+
const directory = path.resolve(dir);
2529
const packageJsonPath = path.join(directory, 'package.json');
2630
const packageJson = JSON.parse(fs.readFileSync(packageJsonPath, { encoding: 'utf-8' }));
2731
acc.push({ directory, packageJson, packageJsonPath });

0 commit comments

Comments
 (0)