Skip to content

Commit 10ca092

Browse files
- updated docs for the new release process and added nuke-build-env
1 parent f433580 commit 10ca092

File tree

2 files changed

+24
-12
lines changed

2 files changed

+24
-12
lines changed

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@
2424
"refresh-node-modules": "rimraf packages/*/node_modules && rimraf node_modules && npm install",
2525
"commit-package-changes": "git add package-lock.json packages/*/package*.json && cross-env CI=skipPrecommit git commit -m 'updated package*.json after versioning' && git push",
2626
"post-versioning": "echo 'This will take a while...' && npm run bump-peer-deps && npm run refresh-node-modules && npm run commit-package-changes && npm run update-version-tags",
27-
"update-version-tags": "git tag -f $(node scripts/get-version-tag.js) && git push -f origin $(node scripts/get-version-tag.js)"
27+
"update-version-tags": "git tag -f $(node scripts/get-version-tag.js) && git push -f origin $(node scripts/get-version-tag.js)",
28+
"nuke-build-env": "rimraf .nx && rimraf package-lock.json"
2829
},
2930
"license": "Apache-2.0",
3031
"homepage": "https://github.com/rjsf-team/react-jsonschema-form",

packages/docs/docs/contributing.md

Lines changed: 22 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,7 @@ npm run clean-build
4343
The first command will delete all of the `node_modules` directories in the environment and then rerun `npm install`.
4444
The second command cleans up the typescript build cache files before retrying the build.
4545

46-
Worst case scenario when neither of those commands work, try deleting the `package-lock.json` and the entire `.nx` cache
47-
directory and rerun the commands again.
46+
Worst case scenario when neither of those commands work, try running `npm run nuke-build-env` and then rerun the two commands.
4847

4948
## Cloud builds
5049

@@ -154,19 +153,16 @@ For instance if you are about to create the new `6.100.10` branch, then you woul
154153

155154
```bash
156155
git checkout -b rc6.100.10
157-
git push
158156
npx nx release version --git-tag
159-
npm run post-versioning
157+
git commit -m "Releasing 6.100.10"
158+
git push
159+
npm run update-version-tags
160160
```
161161

162162
Make sure you use [semver](https://semver.org/) for version numbering when selecting the version.
163-
The `npx nx release version --git-tag` command will create a new version tag and push it to GitHub.
164-
165-
The `npm run post-versioning` script will update the peer dependencies in all of the `packages/*/package.json` files if necessary.
166-
It will then clean up the `node_modules` directories and rerun `npm install` to update the `package-lock.json` files.
167-
Finally, it creates and pushes a new commit with those `package.json` and `package-lock.json` files up to GitHub.
168-
169-
> NOTE: this command will take a while, be patient
163+
The `npx nx release version --git-tag` command will update the `package*.josn` files and create a new version tag.
164+
Committing and pushing the branch will allow you to create the PR on GitHub.
165+
The `npm run update-version-tags` will push the tags up to GitHub.
170166

171167
Then, make a PR to main. Merge the PR into main -- make sure you use "merge commit", not squash and merge, so that
172168
the original commit where the tag was based on is still present in the main branch.
@@ -181,6 +177,21 @@ The package is published through an automation token belonging to the
181177
[rjsf-bot](https://www.npmjs.com/~rjsf-bot) user on npm. This token
182178
is stored as the `NPM_TOKEN` secret on GitHub Actions.
183179

180+
### Updating the peer dependencies for new features in a minor release
181+
182+
If a set of changes added new features or APIs that require updating downstream peer dependencies, then run the following
183+
command:
184+
185+
```bash
186+
npm run post-versioning
187+
```
188+
189+
The `npm run post-versioning` script will update the peer dependencies in all of the `packages/*/package.json` files if necessary.
190+
It will then clean up the `node_modules` directories and rerun `npm install` to update the `package-lock.json` files.
191+
Finally, it creates and pushes a new commit with those `package.json` and `package-lock.json` files up to GitHub.
192+
193+
> NOTE: this command will take a while, be patient
194+
184195
### Releasing docs
185196

186197
Docs are automatically published to GitHub Pages when the `main` branch is updated.

0 commit comments

Comments
 (0)