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

only-allow

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

only-allow

Force a specific package manager to be used on a project

  • 1.2.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
359K
decreased by-4.5%
Maintainers
1
Weekly downloads
 
Created

What is only-allow?

The 'only-allow' npm package is used to enforce the use of a specific package manager in a project. This ensures that all contributors use the same package manager, which can help avoid issues related to package-lock files and dependency management.

What are only-allow's main functionalities?

Enforce npm usage

This feature ensures that npm is the only package manager allowed for the project. If a user tries to install dependencies using a different package manager, the installation will fail.

/* Add this to your package.json file */
{
  "scripts": {
    "preinstall": "npx only-allow npm"
  }
}

Enforce yarn usage

This feature ensures that yarn is the only package manager allowed for the project. If a user tries to install dependencies using a different package manager, the installation will fail.

/* Add this to your package.json file */
{
  "scripts": {
    "preinstall": "npx only-allow yarn"
  }
}

Enforce pnpm usage

This feature ensures that pnpm is the only package manager allowed for the project. If a user tries to install dependencies using a different package manager, the installation will fail.

/* Add this to your package.json file */
{
  "scripts": {
    "preinstall": "npx only-allow pnpm"
  }
}
0

Keywords

FAQs

Package last updated on 03 Oct 2023

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