Basic New NPM Version Workflow
I currently have one published NPM package: the S3 Bulk Redirector. It’s a very simple package for a very specific use case. I only update it when the dependent packages need updating, which is not that often. I recently had to this and, in that process, I realized I didn’t have a coherent workflow for releasing a new NPM version. I had to review terminal command history to see what I did and then replicated it all.
To make sure I never had to do that again, I wrote down the general steps I take to release a new NPM version for the S3 Bulk Redirector package. Below are those basic steps:
- Update the version number in the script and add it to the changelog (with appropriate comments). Commit the change to
npm versionto bump the version number appropriately.
git push origin main&&
git push --tags- Push up the changes to GitHub.
npm publish --dry-runand confirm that everything looks correct in the package contents.
And it’s published! After that’s done, I make a release in GitHub using the tag the
npm version command created so the new version shows on the GitHub sidebar.
And that’s it.
With the new version fully published, it can thus be downloaded and used in projects. I have a few personal projects that use the package, so after releasing a new version I immediately go and update them. Once updated, I test out the bulk redirection. It’s a smoke test of sorts to make sure it truly works in the wild.
All in all, this is pretty simple workflow, but there are multiple steps to it that shouldn’t be forgotten. It’s a small package, but I want everything to be accurate and up to date which means remembering to do all of this each time I upgrade it.
Expo + React Native as a Beginner
12/02/2021 - Jonathan Wang
If you told me that in the first 6 months of my 1st development job that I would be working with mobile development, I would have thought there was no way possible since I had little to no knowledge of...
4 Areas to Master for New Developers!
06/21/2021 - Jonathan Wang
Coming from a 16-week full-stack coding bootcamp, I learned a bunch of skills and technologies jammed into such a short time. I learned and used several modern programming languages, frameworks, databases and other important pieces of tech. I spent time...