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

just-pnpm

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

just-pnpm

Force the pnpm package manager to be used on a project.

  • 1.0.2
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
2.7K
decreased by-42.03%
Maintainers
1
Weekly downloads
 
Created
Source

just-pnpm

This package utilizes npm package's preinstall and postinstall scrips to restrict that only pnpm package manager could be used on a project.

It's developed as an alternative to npx only-allow pnpm, with some bugs fixed (#15, #2660).

Installation

pnpm add -D just-pnpm

Usage

Add this package to your project's devDependencies and that's it.

If someone executes package installation commands other than pnpm (npm install, yarn, cnpm install, whatever.) on the project, they will get an error instead and installation will not proceed.

{
  "name": "your-project",
  "devDependencies": {
    "just-pnpm": "^1.0.1"
  }
}

For library developers, adding just-pnpm to your package's dependencies will prevent your library from being installed by any package managers except for pnpm. (not recommended though)

Escape Hatches

Set environment variable JUST_PNPM_SKIP_CHECK=true to disable the check temporarily.

Disclaimer

This package relies on NPM lifecycle hooks to work properly.

Although it's tested that the package works on many of popular package managers, a non-standard implementation or misbehavior could possibly break the functionality of package manager restriction.

License

MIT

FAQs

Package last updated on 20 Dec 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