Skip to content

Commit

Permalink
fix(repo): update package group during publishing
Browse files Browse the repository at this point in the history
  • Loading branch information
FrozenPandaz committed May 20, 2022
1 parent 124fd7d commit d3315d0
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 22 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
"e2e-build-package-publish": "ts-node -P ./scripts/tsconfig.e2e.json ./scripts/e2e-build-package-publish.ts",
"format": "nx format",
"nx-release": "ts-node -P ./scripts/tsconfig.scripts.json ./scripts/nx-release",
"prepublish": "node ./scripts/update-package-group.js",
"depcheck": "ts-node -P ./scripts/tsconfig.scripts.json ./scripts/depcheck",
"local-registry": "./scripts/local-registry.sh",
"documentation": "ts-node -P scripts/tsconfig.scripts.json ./scripts/documentation/documentation.ts && yarn check-documentation-map",
Expand Down
40 changes: 20 additions & 20 deletions packages/workspace/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,27 +32,27 @@
"requirements": {},
"migrations": "./migrations.json",
"packageGroup": {
"@nrwl/angular": "file:../angular",
"@nrwl/cypress": "file:../cypress",
"@nrwl/devkit": "file:../devkit",
"@nrwl/eslint-plugin-nx": "file:../eslint-plugin-nx",
"@nrwl/express": "file:../express",
"@nrwl/jest": "file:../jest",
"@nrwl/linter": "file:../linter",
"@nrwl/nest": "file:../nest",
"@nrwl/next": "file:../next",
"@nrwl/node": "file:../node",
"@nrwl/nx-plugin": "file:../nx-plugin",
"@nrwl/react": "file:../react",
"@nrwl/storybook": "file:../storybook",
"@nrwl/web": "file:../web",
"@nrwl/js": "file:../js",
"@nrwl/cli": "file:../cli",
"@nrwl/tao": "file:../tao",
"@nrwl/angular": "*",
"@nrwl/cypress": "*",
"@nrwl/devkit": "*",
"@nrwl/eslint-plugin-nx": "*",
"@nrwl/express": "*",
"@nrwl/jest": "*",
"@nrwl/linter": "*",
"@nrwl/nest": "*",
"@nrwl/next": "*",
"@nrwl/node": "*",
"@nrwl/nx-plugin": "*",
"@nrwl/react": "*",
"@nrwl/storybook": "*",
"@nrwl/web": "*",
"@nrwl/js": "*",
"@nrwl/cli": "*",
"@nrwl/tao": "*",
"@nrwl/nx-cloud": "latest",
"@nrwl/react-native": "file:../react-native",
"@nrwl/detox": "file:../detox",
"nx": "file:../nx"
"@nrwl/react-native": "*",
"@nrwl/detox": "*",
"nx": "*"
}
},
"peerDependencies": {
Expand Down
1 change: 0 additions & 1 deletion scripts/nx-release.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ import * as publish from '@lerna/publish/index';
message: 'chore(misc): publish %v',
loglevel: options.loglevel ?? 'info',
yes: false,
ignoreScripts: true,
};

if (options.local) {
Expand Down
1 change: 0 additions & 1 deletion scripts/replace-versions.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,4 @@ writeFileSync(
originalContents
.replace(/TYPESCRIPT_VERSION/g, typescriptVersion)
.replace(/PRETTIER_VERSION/g, prettierVersion)
// .replace(/TYPESCRIPT_VERSION/g, typescriptVersion)
);
10 changes: 10 additions & 0 deletions scripts/update-package-group.js
Original file line number Diff line number Diff line change
@@ -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));

0 comments on commit d3315d0

Please sign in to comment.