Socket
Socket
Sign inDemoInstall

safe-publish-latest

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

safe-publish-latest

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


Version published
Weekly downloads
27K
increased by207.17%
Maintainers
1
Weekly downloads
 
Created
Source

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

Keywords

FAQs

Package last updated on 19 Sep 2016

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

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc