Skip to content

Commit

Permalink
fix(repo): update package group during publishing (#10411)
Browse files Browse the repository at this point in the history
  • Loading branch information
FrozenPandaz committed May 24, 2022
1 parent 85485cc commit 2814a86
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 22 deletions.
1 change: 1 addition & 0 deletions package.json
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",
"prepublishOnly": "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
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
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
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
@@ -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));

1 comment on commit 2814a86

@vercel
Copy link

@vercel vercel bot commented on 2814a86 May 24, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

nx-dev – ./

nx-five.vercel.app
nx-dev-nrwl.vercel.app
nx.dev
nx-dev-git-master-nrwl.vercel.app

Please sign in to comment.