August 20, 2017
When releasing a new version of an open source project, it’s important to make sure a series of things happen in the same order for every release. I’ve attempted to make a “script” I follow for releasing Griddle to npm that helps promote consistent releases and (as much as possible) illuminates any issues before they impact others using the package.
npm publish --tag next(or whatever you want to call your pre-release version). This lets you test your project as a npm package without making it the version that is installed when running
yarn add. In Griddle, we generally run this through
npm run ship-itwhich essentially runs our build script and then pushes the output as a pre-release package. See this blog post for more thoughts on this pre-release strategy.
griddle-docsproject as well as some of my own projects that use the library. I do this to help ensure that there are no known regressions before making this version the
@latesttag in npm.
npm dist-tag firstname.lastname@example.org latest
While following a script doesn’t ensure there will be zero issues, it does help avoid common mistakes or makes things very clear where there is a problem in the process.