mirror of
https://github.com/zoriya/react-native-web.git
synced 2026-06-01 10:07:35 +00:00
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.
This commit is contained in:
+2
-2
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"private": true,
|
"private": true,
|
||||||
"version": "0.18.3",
|
"version": "0.0.0",
|
||||||
"name": "monorepo",
|
"name": "monorepo",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"clean": "del-cli ./packages/*/dist",
|
"clean": "del-cli ./packages/*/dist",
|
||||||
@@ -25,7 +25,7 @@
|
|||||||
"lint": "yarn lint:report --fix",
|
"lint": "yarn lint:report --fix",
|
||||||
"lint:report": "eslint configs packages scripts --config ./configs/.eslintrc",
|
"lint:report": "eslint configs packages scripts --config ./configs/.eslintrc",
|
||||||
"prerelease": "yarn test && yarn compile",
|
"prerelease": "yarn test && yarn compile",
|
||||||
"release": "node ./scripts/releasePackages.js",
|
"release": "node ./scripts/releaseReactNativeWebPackages.js",
|
||||||
"postrelease": "yarn docs:release && yarn benchmarks:release",
|
"postrelease": "yarn docs:release && yarn benchmarks:release",
|
||||||
"test": "yarn flow && yarn fmt:report && yarn lint:report && yarn jest --runInBand"
|
"test": "yarn flow && yarn fmt:report && yarn lint:report && yarn jest --runInBand"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"private": true,
|
"private": true,
|
||||||
"name": "benchmarks",
|
"name": "benchmarks",
|
||||||
"version": "0.18.3",
|
"version": "0.0.0",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "mkdir -p dist && cp -f index.html dist/index.html && ./node_modules/.bin/webpack-cli --config ./webpack.config.js",
|
"dev": "mkdir -p dist && cp -f index.html dist/index.html && ./node_modules/.bin/webpack-cli --config ./webpack.config.js",
|
||||||
"build": "NODE_ENV=production yarn dev"
|
"build": "NODE_ENV=production yarn dev"
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"private": true,
|
"private": true,
|
||||||
"name": "dom-event-testing-library",
|
"name": "dom-event-testing-library",
|
||||||
"version": "0.18.3",
|
"version": "0.0.0",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"description": "Browser event sequences for unit tests",
|
"description": "Browser event sequences for unit tests",
|
||||||
"author": "Nicolas Gallagher",
|
"author": "Nicolas Gallagher",
|
||||||
|
|||||||
@@ -15,13 +15,17 @@ const version = argv._[0];
|
|||||||
const skipGit = argv['skip-git'];
|
const skipGit = argv['skip-git'];
|
||||||
const oneTimeCode = argv.otp;
|
const oneTimeCode = argv.otp;
|
||||||
|
|
||||||
console.log(`Publishing ${version}`);
|
console.log(`Publishing react-native-web@${version}`);
|
||||||
|
|
||||||
// Collect workspaces and package manifests
|
// Collect 'react-native-web' workspaces and package manifests
|
||||||
const workspacePaths = require('../package.json').workspaces.concat(['./']);
|
const workspacePaths = require('../package.json').workspaces;
|
||||||
const workspaces = workspacePaths.reduce((acc, curr) => {
|
const workspaces = workspacePaths.reduce((acc, curr) => {
|
||||||
const packageDirectories = glob.sync(path.resolve(curr));
|
const packageDirectories = glob.sync(curr);
|
||||||
packageDirectories.forEach((directory) => {
|
const subsetOfpackageDirectories = packageDirectories.filter((dir) => {
|
||||||
|
return dir.includes('react-native-web');
|
||||||
|
});
|
||||||
|
subsetOfpackageDirectories.forEach((dir) => {
|
||||||
|
const directory = path.resolve(dir);
|
||||||
const packageJsonPath = path.join(directory, 'package.json');
|
const packageJsonPath = path.join(directory, 'package.json');
|
||||||
const packageJson = JSON.parse(fs.readFileSync(packageJsonPath, { encoding: 'utf-8' }));
|
const packageJson = JSON.parse(fs.readFileSync(packageJsonPath, { encoding: 'utf-8' }));
|
||||||
acc.push({ directory, packageJson, packageJsonPath });
|
acc.push({ directory, packageJson, packageJsonPath });
|
||||||
Reference in New Issue
Block a user