Skip to content

[Feature] Exclude packages from installation #7088

@tido64

Description

@tido64
  • I'd be willing to implement this feature (contributing guide)
  • This feature is important to have in this repository; a contrib plugin wouldn't do

Describe the user story

Every now and then, I get a security alert for a package or some package pulls in a random, unused dependency that pollutes the repository and the fix is to simply not install the offending package.

Today, we're solving this by creating a stub package and using resolutions + link: (example) to force resolving the package to our stub instead. We're thinking of formalizing this as a plugin, using the ignore: protocol, and was wondering if this would be of interest in Yarn.

Describe the solution you'd like

Upon finding ignore:, Yarn can create a stub package and link it during installation.

Describe the drawbacks of your solution

Obviously, this will break if the package is actually used. But since you've explicitly added ignore:, it should be undoable.

Describe alternatives you've considered

We are implementing this as a plugin in any case but was wondering if this is interesting upstream.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions