Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

assert-pm

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

assert-pm - npm Package Compare versions

Comparing version 1.0.1 to 1.0.2

7

package.json
{
"name": "assert-pm",
"description": "Assert that a package manager was used when running a yarn/npm script.",
"version": "1.0.1",
"description": "Assert that a certain package manager was used when running a yarn/npm script.",
"version": "1.0.2",
"main": "index.js",

@@ -13,3 +13,6 @@ "license": "MIT",

"yargs": "^11.0.0"
},
"scripts": {
"exec": "./index.js"
}
}

@@ -5,3 +5,3 @@ # assert-pm

To avoid contributors accidentally using the "wrong" package manager and getting hard to debug errors, you can use `assert-pm` as a preinstall script. It'll cause the installation to fail and warn the user.
To avoid contributors accidentally using the "wrong" package manager and getting hard to debug errors, you can use `assert-pm` as a postinstall script. It'll cause the installation to fail and warn the user.

@@ -20,7 +20,7 @@ ## Installation

If you are managing your packages with workspaces, you can add it to your parent package.json as preinstall script. Make sure to not add it to packages you do publish as this script will also be run upon installation by users.
If you are managing your packages with workspaces, you can add it to your parent package.json as postinstall script. Make sure to not add it to packages you do publish as this script will also be run upon installation by users.
```
"scripts": {
"preinstall": "assert-pm yarn --message"
"postinstall": "assert-pm yarn --message"
}

@@ -38,3 +38,3 @@ ```

```
pmtest@1.0.0 preinstall
pmtest@1.0.0 postinstall
> assert-pm yarn

@@ -41,0 +41,0 @@

Sorry, the diff of this file is not supported yet

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