-
Notifications
You must be signed in to change notification settings - Fork 35
Open
Description
As per the docs, to prevent other package managers , I used this preinstall script to your package.json:
{
"scripts": {
"preinstall": "npx only-allow pnpm"
}
}
Its expected behavior is to block these edge cases (and thus only allow PNPM):
npm inpm i packagenpm i -D package
However, its observed behavior blocks npm i from running, but allows npm i package and npm i -D package to run.
Even though only-allow blocks npm i from running, npm i still creates package-lock.json.
I tried different variations of the preinstall script, which all fail to block the aforementioned edge cases:
npx only-allow pnpmnpx -y only-allow pnpm(I'm using version[email protected])only-allow pnpm(afterpnpm add -D only-allow)
Unfortunately—until this problem is fixed—I cannot rely on the package only-allow!
Are there any workarounds? If so, I'd appreciate them in the documentation–I can help!
spanishpear
Metadata
Metadata
Assignees
Labels
No labels