Use the Bulletproof Git Workflow, and before code review:
Publish a pre-release version of the package:
npm publish my-package@1.0.0-my-work
Create a branch in sites that use the package to test integration with the pre-release package:
git checkout -b feature/use-my-work
npm install my-package@1.0.0-my-work --save
git add package.json
git commit -m 'use package/@1.0.0-my-work for testing'
Test each of the sites locally; observe passed unit tests and expected functional changes manually:
npm install
npm run build
npm test
npm start
Fix any issues, follow the Bulletproof Git Workflow and re-release the pre-release package to retest changes:
npm unpublish my-package@1.0.0-my-work
npm publish my-package@1.0.0-my-work
Then in site:
rm -rf ./node_modules/my-package
npm install my-package@1.0.0-my-work
If new functional automation tests are needed, add them to the site branch using the Bulletproof Git Workflow.
Run functional automation tests on the branch.
Proceed with "code review" and "review feedback" using the Bulletproof Git Workflow and when done, manage the release:
- Create the package Release Notes (use Github Release Notes).
- Update the UPGRADE.md file with detailed upgrade instructions.
- Check that artifacts and dot files are npmignored or gitignored as appropriate.
.babelrc
and.eslintrc
can be particularly problematic.
Always gitignore dependencies, build output and logs. Always npmignore gitignored files and dev configs that may intefere with parent folder dev configs such as .babelrc, .eslintrc, .nvmrc.
Release the package where <release-type>
is major
, minor
or patch
. When starting a new package, start from v1.0.0 to simplify and standardise the semver behaviour in NPM.
npm run release <release-type>
# eg. npm run release minor
Post notes to relevant slack channels.
Use the Bulletproof Git Workflow to update each site that uses the package.
Thank you for this! Question, is
not the same as
?