Skip to content

CyanChanges/only-allow3

Repository files navigation

only-allow3

pnpm's Only Allow with version constraints support 😺.

✨ Usage

Put a preinstall script in your package.json

For example:

{
  "scripts": {
    "preinstall": "npx only-allow3 bun"
  }
}

⭐ Version Constraints

❕ Use bunx instead of npx below cuz i hates npm💢 :(

🎉 SemVer Ranges are supported!

🤔 Additionally, you can add @ after your favorite package manager, and specify the version constraints.

Like:

$ only-allow3 bun@^1.1.45

🟦 A few more examples:

Force Bun ^1.1.45

$ bunx only-allow3 bun@^1.1.45 # Only Bun version matching ^1.1.45 will be allowed 

Force Yarn 4.x

$ bunx only-allow3 yarn@4 # Only Yarn matching v4.x will be allowed 

Force pnpm >= 9

$ bunx only-allow3 pnpm@>=9 # Only pnpm version greater or equal than 9 will be allowed 

About

pnpm's only-allow with version constraints

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published