-
Notifications
You must be signed in to change notification settings - Fork 2.3k
chore: Replace Lerna with Nx #4546
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…elated documentation
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
- run: git update-index --assume-unchanged .npmrc | ||
- run: npx lerna publish from-package --yes | ||
- run: npx nx release publish |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried this locally with --dry-run
and it seemed to work, but we won't know for sure until we try to publish a release.
@@ -1,38 +1,57 @@ | |||
{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Config file was auto-migrated by the Nx upgrade tool
"publish-repo": "lerna publish", | ||
"changed": "lerna changed", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed these scripts as I don't believe we use them
"@nx/js": "^20.7.1", | ||
"@swc-node/register": "^1.9.1", | ||
"@swc/core": "^1.5.7", | ||
"@swc/helpers": "^0.5.11", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@nx/js (and these swc
packages) are required to use nx release version
. These were auto-installed when I ran nx add @nx/js
|
||
Make sure you use [semver](https://semver.org/) for version numbering when selecting the version. | ||
The `npx lerna version` command will create a new version tag and push it to GitHub. | ||
The `npx nx release version --git-tag` command will create a new version tag and push it to GitHub. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This git tag includes the v
at the start of the tag name. I think this is different from Lerna, but I don't think it will affect our tag scripts. We may need to tweak this a bit if it doesn't work.
Updated scripts related documentation
Reasons for making this change
Lerna is deprecated and has been replaced by Nx
Checklist
npx nx run-many --target=build --exclude=@rjsf/docs && npm run test:update
to update snapshots, if needed.