This doc covers helper scripts that are available in this repo.
Synchronizes dependency versions. Useful for making sure that e.g. node is using the correct sdk-core version.
syncVersions.ts [...package.json paths]
-
Sync versions of all packages
syncVersions.ts -
Sync versions of specific packages
syncVersions.ts ./path/to/package.json ./path/to/different/package.json
Creates a git release for a package by doing the following:
- Update
package.jsonwith the new version, - Run
npm installto generate a validpackage-lock.jsonfile, - Stage
package.jsonandpackage-lock.json, - Create branch
<package name>/<new version>and checkout to it, - Commit with message
<package name>: version <new version>, - Push to
<package name>/<new version>.
If something goes wrong on any of the steps, the script will try to rollback the changes.
gitRelease.ts [opts] <package.json path> <release|version> [identifier]
-
release- can be one ofmajor,premajor,minor,preminor,patch,prepatch,prerelease -
version- semantic version -
identifier- identifier for preleases, e.g.alphaorbeta -
--dry-run- does not do anything, just prints the output -
--no-add- exits before staging any files -
--no-checkout- exits before creating and checkouting to the branch -
--no-commit- exits before creating a commit -
--no-push- exits before pushing
-
Make a minor release
gitRelease.ts ./path/to/package.json minor -
Make a beta prerelase without pushing
gitRelease.ts ./path/to/package.json prerelase beta --no-push -
Check what happens with making a release with version 1.2.3
gitRelease.ts ./path/to/package.json 1.2.3 --dry-run
Creates a tagged release and publishes it to npm:
- Create tag
<package name>/<version>, - Push tag to remote,
- Run
npm publish.
The version is read from the package.json file. If something goes wrong on any of the steps, the script will try to
rollback the changes.
release.ts [opts] <package.json path> [commit hash]
-
commit hash- if specified, tag will be added on this hash instead ofHEAD. Warning: checkout is not performed currently -
--dry-run- does not do anything, just prints the output -
--no-tag- does not add and push a tag -
--no-push-tag- does not push the tag -
--no-publish- does not publish to npm
-
Make a release of package
release.ts ./path/to/package.json -
Make a release of package without publishing to npm and add tag on hash
b19f45885a21ba7235c32aae62c4c73199f40ca6release.ts ./path/to/package.json b19f45885a21ba7235c32aae62c4c73199f40ca6 --no-publish