Introducing Socket Firewall: Free, Proactive Protection for Your Software Supply Chain.Learn More
Socket
Book a DemoInstallSign in
Socket

npm-hg-version

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

npm-hg-version

Tag Mercurial repository on npm version

latest
Source
npmnpm
Version
0.9.2
Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created
Source

Mercurial support for npm version

This module tags your Mercurial repository as a result of doing npm version.

To your package.json, add:

  scripts: {
    "preversion": "node ./node_modules/npm-hg-version/hg-version.js",
    "postversion": "node ./node_modules/npm-hg-version/hg-version.js"
  }

You can now do npm version patch && npm publish.

Note that this module does not exactly mimic the git behaviour in npm version. In particular, it:

  • refuses to operate on a repository with modifications
  • will not add package.json/npm-shrinkwrap.json for you

If you want to force a tag despite modifications, use npm version --ignore-modifications. This will still bail if package.json (or npm-shrinkwrap.json) is modified, so as to stop you from accidentally committing e.g. dependency changes as a version bump.

Keywords

mercurial

FAQs

Package last updated on 02 Jul 2015

Did you know?

Socket

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