fix(repo): update package group during publishing (#10411)
This commit is contained in:
parent
85485cc80d
commit
2814a86b4c
@ -17,6 +17,7 @@
|
|||||||
"e2e-build-package-publish": "ts-node -P ./scripts/tsconfig.e2e.json ./scripts/e2e-build-package-publish.ts",
|
"e2e-build-package-publish": "ts-node -P ./scripts/tsconfig.e2e.json ./scripts/e2e-build-package-publish.ts",
|
||||||
"format": "nx format",
|
"format": "nx format",
|
||||||
"nx-release": "ts-node -P ./scripts/tsconfig.scripts.json ./scripts/nx-release",
|
"nx-release": "ts-node -P ./scripts/tsconfig.scripts.json ./scripts/nx-release",
|
||||||
|
"prepublishOnly": "node ./scripts/update-package-group.js",
|
||||||
"depcheck": "ts-node -P ./scripts/tsconfig.scripts.json ./scripts/depcheck",
|
"depcheck": "ts-node -P ./scripts/tsconfig.scripts.json ./scripts/depcheck",
|
||||||
"local-registry": "./scripts/local-registry.sh",
|
"local-registry": "./scripts/local-registry.sh",
|
||||||
"documentation": "ts-node -P scripts/tsconfig.scripts.json ./scripts/documentation/documentation.ts && yarn check-documentation-map",
|
"documentation": "ts-node -P scripts/tsconfig.scripts.json ./scripts/documentation/documentation.ts && yarn check-documentation-map",
|
||||||
|
|||||||
@ -32,27 +32,27 @@
|
|||||||
"requirements": {},
|
"requirements": {},
|
||||||
"migrations": "./migrations.json",
|
"migrations": "./migrations.json",
|
||||||
"packageGroup": {
|
"packageGroup": {
|
||||||
"@nrwl/angular": "file:../angular",
|
"@nrwl/angular": "*",
|
||||||
"@nrwl/cypress": "file:../cypress",
|
"@nrwl/cypress": "*",
|
||||||
"@nrwl/devkit": "file:../devkit",
|
"@nrwl/devkit": "*",
|
||||||
"@nrwl/eslint-plugin-nx": "file:../eslint-plugin-nx",
|
"@nrwl/eslint-plugin-nx": "*",
|
||||||
"@nrwl/express": "file:../express",
|
"@nrwl/express": "*",
|
||||||
"@nrwl/jest": "file:../jest",
|
"@nrwl/jest": "*",
|
||||||
"@nrwl/linter": "file:../linter",
|
"@nrwl/linter": "*",
|
||||||
"@nrwl/nest": "file:../nest",
|
"@nrwl/nest": "*",
|
||||||
"@nrwl/next": "file:../next",
|
"@nrwl/next": "*",
|
||||||
"@nrwl/node": "file:../node",
|
"@nrwl/node": "*",
|
||||||
"@nrwl/nx-plugin": "file:../nx-plugin",
|
"@nrwl/nx-plugin": "*",
|
||||||
"@nrwl/react": "file:../react",
|
"@nrwl/react": "*",
|
||||||
"@nrwl/storybook": "file:../storybook",
|
"@nrwl/storybook": "*",
|
||||||
"@nrwl/web": "file:../web",
|
"@nrwl/web": "*",
|
||||||
"@nrwl/js": "file:../js",
|
"@nrwl/js": "*",
|
||||||
"@nrwl/cli": "file:../cli",
|
"@nrwl/cli": "*",
|
||||||
"@nrwl/tao": "file:../tao",
|
"@nrwl/tao": "*",
|
||||||
"@nrwl/nx-cloud": "latest",
|
"@nrwl/nx-cloud": "latest",
|
||||||
"@nrwl/react-native": "file:../react-native",
|
"@nrwl/react-native": "*",
|
||||||
"@nrwl/detox": "file:../detox",
|
"@nrwl/detox": "*",
|
||||||
"nx": "file:../nx"
|
"nx": "*"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
|
|||||||
@ -42,7 +42,6 @@ import * as publish from '@lerna/publish/index';
|
|||||||
message: 'chore(misc): publish %v',
|
message: 'chore(misc): publish %v',
|
||||||
loglevel: options.loglevel ?? 'info',
|
loglevel: options.loglevel ?? 'info',
|
||||||
yes: false,
|
yes: false,
|
||||||
ignoreScripts: true,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
if (options.local) {
|
if (options.local) {
|
||||||
|
|||||||
@ -15,5 +15,4 @@ writeFileSync(
|
|||||||
originalContents
|
originalContents
|
||||||
.replace(/TYPESCRIPT_VERSION/g, typescriptVersion)
|
.replace(/TYPESCRIPT_VERSION/g, typescriptVersion)
|
||||||
.replace(/PRETTIER_VERSION/g, prettierVersion)
|
.replace(/PRETTIER_VERSION/g, prettierVersion)
|
||||||
// .replace(/TYPESCRIPT_VERSION/g, typescriptVersion)
|
|
||||||
);
|
);
|
||||||
|
|||||||
10
scripts/update-package-group.js
Normal file
10
scripts/update-package-group.js
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
const { readFileSync, writeFileSync } = require('fs');
|
||||||
|
const { join } = require('path');
|
||||||
|
|
||||||
|
console.log('Updating @nrwl/workspace package group');
|
||||||
|
const file = join(__dirname, '../build/packages/workspace/package.json');
|
||||||
|
const originalContents = readFileSync(file).toString();
|
||||||
|
|
||||||
|
const { version } = require(file);
|
||||||
|
|
||||||
|
writeFileSync(file, originalContents.replace(/\*/g, version));
|
||||||
Loading…
x
Reference in New Issue
Block a user