Socket
Socket
Sign inDemoInstall

shelljs-release

Package Overview
Dependencies
32
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

shelljs-release

A handy release script, using shelljs


Version published
Maintainers
1
Weekly downloads
1,414
increased by33.52%
Install size
713 kB

Weekly downloads

Readme

Source

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.

Keywords

FAQs

Last updated on 10 Jan 2022

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc