Skip to content

[Bug?]: npmPreapprovedPackages not working for private registry #6906

@oblador

Description

@oblador

Self-service

  • I'd be willing to implement a fix

Describe the bug

#6901 introduced a much needed npmMinimalAgeGate setting and npmPreapprovedPackages to opt out of it. However when using a private npm registry for a certain scope, the opt out setting doesn't seem to apply properly. On public packages it works however. I can't really explain why, but maybe this is because it's using meta data from the public registry (where the package doesn't exist)?

To reproduce

# .yarnrc.yml
npmMinimalAgeGate: 10000
npmPreapprovedPackages: 
  - "@some-scope/*"

npmScopes:
  some-scope:
    npmRegistryServer: "https://domain"

Environment

System:
    OS: macOS 15.6.1
    CPU: (10) arm64 Apple M1 Max
  Binaries:
    Node: 22.13.0
    Yarn: 4.10.0
    npm: 10.9.2

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions