Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

@lavamoat/preinstall-always-fail

LavaMoat60.5kMIT2.1.0

Worried about accidentally running yarn or npm with script hooks enabled such as preinstall or postinstall?

readme

Pre-Install Always Fail

Worried about accidentally running yarn or npm with script hooks enabled such as preinstall or postinstall?

Adding this package to a project mitigates the likelihood of running any lifecycle scripts by throwing an error during the preinstall script execution.

Install

yarn add @lavamoat/preinstall-always-fail
npm i @lavamoat/preinstall-always-fail

Usage

If the --ignore-scripts [1] flag is missing, running yarn or npm i will fail. Enable the flag and use in conjunction with Lavamoat's allow-scripts to manually whitelist packages running scripts.

References

[1]: https://docs.npmjs.com/cli/v7/commands/npm-install#ignore-scripts

changelog

Changelog

2.1.0 (2024-07-11)

Features

  • allow-scripts: support Node.js v22 (0c665ec)

2.0.0 (2023-10-18)

⚠ BREAKING CHANGES

  • The minimum supported Node.js version is now v16.20.0.

Bug Fixes

1.0.3 (2023-09-14)

Bug Fixes

  • normalize all package versions (0800c11)