Socket
Socket
Sign inDemoInstall

@lavamoat/allow-scripts

Package Overview
Dependencies
Maintainers
2
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@lavamoat/allow-scripts

a tool for only running dependency lifecycle hooks specified in an allowlist


Version published
Maintainers
2
Created
Source

@lavamoat/allow-scripts

a tool for only running dependency lifecycle hooks specified in an allowlist

install

add the package to start using it in your project. be sure to include the @lavamoat/ namespace in the package name

yarn add -D @lavamoat/allow-scripts

configure

automatically generate a configuration (that skips all lifecycle scripts) and write into package.json. edit as necesary.

yarn allow-scripts auto

configuration goes in package.json

{
  "lavamoat": {
    "allowScripts": {
      "keccak": true,
      "core-js": false
    }
  }
}

disable scripts

disable all scripts by default inside .yarnrc or .npmrc

ignore-scripts true

consider adding @lavamoat/preinstall-always-fail to ensure you never accidently run install scripts

yarn add -D @lavamoat/preinstall-always-fail

run

run all lifecycle scripts for packages specified in package.json

yarn allow-scripts

debug

prints comprehension of configuration and dependencies with lifecycle scripts

yarn allow-scripts list

workflow

consider adding a "setup" npm script for all your post-install steps. no magic here, this is just a regular script. but using this will ensure you run your allowed scripts. its also a good place to add other post-processing commands you use. In the future when you add additional post-processing scripts, e.g. patch-package, you can add them to this "setup" script.

you will need to make an effort to remember to run yarn setup instead of just yarn :lotus_position:

{
  "scripts": {
    "setup": "yarn install && yarn allow-scripts && ..."
  }
}

FAQs

Package last updated on 19 May 2021

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