Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
ts-node
to its modern alternativetsx
These changes do not affect our current release process. They make it easier to perform the existing package release sequence.
Do mind though that the script reports release tag name as
react-v0.6.x
instead of the old formatv0.6.x-react
. The release pipeline still expects the latter version, I just haven't made that change yet. I moved the package discriminator to suffix position so that pre-release versions of packages have cleaner tags, e.g.react-1.2.3-nightly.4
.Excerpt from
release.ts
This script's purpose is to automate the process of publishing a branch containing new version of a package to the remote repository. It was written with the goal to maintain a good balance of code brevity, features, and resilience to errors.
If you had to perform the release manually, you would have to successfully execute the following steps.
CHANGELOG.md
to update the release title"version"
field inpackage.json
The steps above, except for editing the changelog, could be performed with following commands.
That's not a lot. But to account for various (valid and invalid) local repository states, we need to perform additional checks and actions so that the desirable result is achieved more consistently and problems are detected and reported preemptively.
When extending this script, please maintain a couple of core design guidelines.
throw new RuntimeError(message)
to report error and terminate script with non-zero status code