Publish tools
Package exports useful commands to automatically upgrading packages in few cases.
- Command to set package version to last published version matching prerelease tag
npm-equal-pkg {featureBranchPreReleaseTag}
It is used to defining 'prerelease' version with some string which is related prerelease tag For example:
- running command
npm-equal-pkg feature-branch-release
- it results querying npm for last prerelease version with prerelease tag
feature-branch-release
- function matches last version like:
1.0.0-feature-branch-release.12
- function set npm version in package.json as last one
This function solves generating new prerelease tags after merging feature branches commited changes in package.json
- Command to upgrade selected company packages to the freshest versions according to passed prerelease tag name.
npm-upgrade-pkg-versions {companyNpmNamespace} {featureBranchPreReleaseTag}
For example:
npm-upgrade-pkg-versions @dac-software feature-branch
- it results querying npm for all packages from passed company for last prerelease version with prerelease tag
- after, it installs new versions, saving changes in package.json / package-lock.json