Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

shelljs-release

shelljs7.3kMIT0.5.3

A handy release script, using shelljs

release, package, shelljs, script

readme

release

npm version npm downloads

A simple NodeJS script to help make npm releases.

Installation and setup

npm install --save-dev shelljs-release

Also, make sure your primary/main branch has upstream-tracking set-up:

# Assuming your primary branch is named 'main':
git push --set-upstream origin main

Now, add some scripts to package.json like so:

  "scripts": {
    "test": "... whatever you had here before ...",
    "release:major": "shelljs-release major",
    "release:minor": "shelljs-release minor",
    "release:patch": "shelljs-release patch"
  },

Alright, you're good to go!

Usage example

If you made some commits to your project and now want to release a new update, with a bump in the patch number (i.e. from v1.2.6 to v1.2.7), run this command:

$ npm run release:patch

This will:

  • Bump the version & commit for you
  • Create the corresponding git tag
  • Push your commit and tags upstream
  • Release to npm!

Cool!

Similarly, if you want to jump from v1.2.6 to v1.3.0, or from v1.2.6 to v2.0.0, you can run npm run release:minor or npm run release:major respectively.

Two Factor Authentication (2FA, OTP)

Newer versions of npm support Two Factor Authentication (2FA) for added security. We've added support passing OTPs on the commandline:

$ npm run release:patch -- --otp=123456
$ # Substitute "123456" for your actual OTP from a supported app.

changelog

Change Log

v0.5.1 (2022-01-08)

Full Changelog

v0.5.0 (2021-12-12)

Full Changelog

Merged pull requests:

v0.4.1 (2021-03-21)

Full Changelog

v0.4.0 (2020-10-26)

Full Changelog

Implemented enhancements:

  • feat: add option to specify release branch #11 (nfischer)

Closed issues:

  • Allow --release-branch arg #9

v0.3.1 (2018-11-13)

Full Changelog

v0.3.0 (2018-05-08)

Full Changelog

Implemented enhancements:

  • Only allow releases from the master branch #4
  • Broken for initial release #3
  • Upstream tracking is necessary #2
  • feat: only allow releases from master branch #8 (nfischer)
  • feat: add otp flag for 2FA #7 (nfischer)

Fixed bugs:

  • Support npm's 2FA (via OTP) #5

Merged pull requests:

  • refactor: change order for publishing #6 (nfischer)

v0.2.0 (2016-06-15)

Full Changelog

v0.1.5 (2016-06-10)

Full Changelog

v0.1.4 (2016-06-10)

Full Changelog

v0.1.3 (2016-06-10)

Full Changelog

v0.1.2 (2016-06-10)

Full Changelog

v0.1.1 (2016-06-10)

Closed issues:

  • Include usage example #1

* This Change Log was automatically generated by github_changelog_generator