Skip to content

Separate lifecycle script contexts #50

@wraithgar

Description

@wraithgar

In current package.json setups there is a "script" entry that has certain lifecycle events defined. These are things like "install" and "publish". The context for these is not very discrete. For example, if I have an "install" script defined in my package.json that will be run when I type npm install, but it will ALSO be ran when that same package is installed as a dependency.

Folks can currently disable all scripts, but this does not allow for the ones defined in my root package.json to still run. We need a way to separate "user/project" level context from "dependency" context.

A solution has been wanted for quite some time, and I think the interop group here is the right place to figure it out.

Consideration: the current "scripts" lifecycle, especially for packages being installed, is something that is quite possibly unable to ever change. It's been like this for too long.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions