Use the Node.js version used by ci-operator-buildroot image.
To check if the current installed version is outdated:
npm outdated -g npmTo install the latest version:
npm install -g npm@VERSIONMake sure you're in sync with the upstream main branch:
git fetch upstream && git rebase upstream/mainTo update dependencies and build all distributable SDK packages:
yarn install
yarn build-libsAlternatively, you can build a specific SDK package:
(cd ./packages/PKG_DIR ; yarn build)Make sure the version field in the relevant package.json file(s) has the right value:
jq -r .version < ./packages/PKG_DIR/package.json
npm pkg set version=NEW_VERSION -workspace ./packages/PKG_DIRSince our packages adhere to Semantic Versioning specification, any backwards incompatible API changes must be published under a new major version.
If present, make sure the CHANGELOG.md file of the given package(s) is up to date:
- Each changelog entry describes a notable change that may impact consumers of the package.
- Each version section may contain a notice with additional information, e.g. how to upgrade from a previous version.
See Common Changelog for details on good changelog practices.
Only members of npmjs openshift organization can publish packages maintained in this repo.
npm login --scope=@openshiftTo see the latest published version of the given package:
npm view $(jq -r .name < ./packages/PKG_DIR/package.json) dist-tags.latestTo verify the package before publishing:
npm publish ./packages/PKG_DIR --no-git-tag-version --dry-runTo publish the package, run the above command without --dry-run parameter.