safe-publish-latest
Ensure that when you `npm publish`, the "latest" tag is only set for the truly latest version.
Last updated 9 months ago by ljharb .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install safe-publish-latest 
SYNC missed versions from official npm registry.

safe-publish-latest Version Badge

Build Status dependency status dev dependency status License Downloads

npm badge

Ensure that when you npm publish, the "latest" tag is only set for the truly latest version.

Usage

Add "safe-publish-latest" to your package.json's "prepublish" script.

It will only activate during an actual npm publish - it will silently do nothing during installs, and will error when run directly.

Example package.json excerpt with no other prepublish commands:

{
	"scripts": {
		"prepublish": "safe-publish-latest"
	}
}

Example package.json excerpt with another prepublish command:

{
	"scripts": {
		"prepublish": "safe-publish-latest && npm run build"
	}
}

Tests

Simply clone the repo, npm install, and run npm test

Current Tags

  • 1.1.4                                ...           latest (9 months ago)

7 Versions

  • 1.1.4                                ...           9 months ago
  • 1.1.3                                ...           a year ago
  • 1.1.2                                ...           2 years ago
  • 1.1.1                                ...           4 years ago
  • 1.1.0                                ...           4 years ago
  • 1.0.1                                ...           4 years ago
  • 1.0.0                                ...           4 years ago
Maintainers (1)
Downloads
Today 4
This Week 4
This Month 29
Last Day 0
Last Week 23
Last Month 123
Dependencies (3)
Dev Dependencies (5)

Copyright 2014 - 2016 © taobao.org |