Skip to content

Commit b7410e6

Browse files
authored
chore(repo): change workspace to use verdaccio executor (nrwl#17280)
1 parent a7c6d5a commit b7410e6

File tree

4 files changed

+18
-39
lines changed

4 files changed

+18
-39
lines changed

CONTRIBUTING.md

+3-6
Original file line numberDiff line numberDiff line change
@@ -73,18 +73,15 @@ it can be useful to publish to a local registry.
7373

7474
Check out [this video for a live walkthrough](https://youtu.be/Tx257WpNsxc) or follow the instructions below:
7575

76-
- Run `pnpm local-registry start` in Terminal 1 (keep it running)
76+
- Run `pnpm local-registry` in Terminal 1 (keep it running)
7777
- Run `npm adduser --registry http://localhost:4873` in Terminal 2 (real credentials are not required, you just need to
7878
be logged in. You can use test/test/[email protected].)
79-
- Run `pnpm local-registry enable` in Terminal 2
8079
- Run `pnpm nx-release 16.0.0 --local` in Terminal 2 - you can choose any nonexistent version number here, but it's recommended to use the next major
8180
- Run `cd ./tmp` in Terminal 2
82-
- Run `npx create-nx-workspace@16.0.0` in Terminal 2
81+
- Run `npx create-nx-workspace@17.0.0` in Terminal 2
8382

8483
If you have problems publishing, make sure you use Node 18 and NPM 8.
8584

86-
**NOTE:** After you finish with local testing don't forget to stop the local registry (e.g. closing the Terminal 1) and disabling the local registy using `pnpm local-registry disable`. Keeping local registry enabled will change your lock file resolutions to `localhost:4873` on the next `pnpm i`. You can also run `pnpm local-registry clear` to clean all packages in that local registry.
87-
8885
**NOTE:** To use this newly published local version, you need to make a new workspace or change all of your target packages to this new version, eg: `"nx": "^16.0.0",` and re-run `pnpm i` in your testing project.
8986

9087
### Publishing for Yarn 2+ (Berry)
@@ -101,7 +98,7 @@ Yarn Berry operates slightly differently than Yarn Classic. In order to publish
10198
- localhost
10299
```
103100
104-
- Run `pnpm local-registry start` in Terminal 1 (keep it running)
101+
- Run `pnpm local-registry` in Terminal 1 (keep it running)
105102
- If you are creating nx workspace outside of your nx repo, make sure to add npm registry info to your root yarnrc (
106103
usually in ~/.yarnrc.yml). The file should look something like this:
107104

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
"prepublishOnly": "node ./scripts/update-package-group.js",
1919
"version": "pnpm prettier lerna.json --write",
2020
"depcheck": "ts-node -P ./scripts/tsconfig.scripts.json ./scripts/depcheck",
21-
"local-registry": "./scripts/local-registry.sh",
21+
"local-registry": "nx local-registry @nx/nx-source",
2222
"documentation": "ts-node -P scripts/tsconfig.scripts.json ./scripts/documentation/generators/main.ts && pnpm check-documentation-map",
2323
"submit-plugin": "node ./scripts/submit-plugin.js",
2424
"prepare": "is-ci || husky install",

project.json

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"name": "@nx/nx-source",
3+
"$schema": "node_modules/nx/schemas/project-schema.json",
4+
"targets": {
5+
"local-registry": {
6+
"executor": "@nx/js:verdaccio",
7+
"options": {
8+
"port": 4873,
9+
"config": ".verdaccio/config.yml",
10+
"storage": "build/local-registry/storage"
11+
}
12+
}
13+
}
14+
}

scripts/local-registry.sh

-32
This file was deleted.

0 commit comments

Comments
 (0)