New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

npm-only-allow

Package Overview
Dependencies
Maintainers
1
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

npm-only-allow - npm Package Compare versions

Comparing version 1.1.5 to 1.2.2

6

index.js

@@ -28,5 +28,7 @@ #!/usr/bin/env node

// which script running
const script = process.env.npm_lifecycle_script;
const server = script.includes(ctx.config.PM) ? "install" : "start";
const script = process.argv;
const server = script.includes('--PM') ? "install" : "start";
console.log(process.env)
// do : start or install

@@ -33,0 +35,0 @@ if (server === "install") {

{
"name": "npm-only-allow",
"version": "1.1.5",
"version": "1.2.2",
"description": "Specification package manager",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -8,5 +8,5 @@ # npm-only-allow

# usage
# Usage
Add a `postinstall` script to your project's `package.json`.
Add a `preinstall` script to your project's `package.json`.

@@ -19,3 +19,3 @@ If you want to force `npm|cnpm|pnpm|yarn`, add:

"scripts": {
"postinstall": "npx npm-only-allow@latest --PM yarn",
"preinstall": "npx npm-only-allow@latest --PM yarn",
"start": "npx npm-only-allow@latest && vite"

@@ -26,3 +26,3 @@ }

# params
# Params
* PM

@@ -40,3 +40,3 @@ > Set the package manager

# tips
# Tips
If you are using 'cnpm' as your package manager, try pressing the space bar if loading is going on

@@ -54,3 +54,3 @@

"scripts": {
"postinstall": "npx npm-only-allow@latest --PM yarn",
"preinstall": "npx npm-only-allow@latest --PM yarn",
"start": "npx npm-only-allow@latest && vite"

@@ -112,3 +112,3 @@ }

/**
* cnpm i jquery | pnpm i jquery | cnpm i jquery
* cnpm i jquery | pnpm i jquery | npm i jquery
* => 关闭正在运行的线程

@@ -115,0 +115,0 @@ * => [npm-only-allow]:检测到您可能使用了不匹配的包管理器安装了依赖(jquery),请卸载或使用正确的管理器安装后重试

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