Skip to content

Expose OIDC and staging signals in packument #9397

@43081j

Description

@43081j

Many tools in the ecosystem use the _npmUser of a packument to know if a package was created via trusted publishing or not.

When it is, the npm user is the oidc user.

However, now that staging is a thing - the npm user will correctly be the human who approved the publish rather than the automation.

This means there's no longer any way to determine if a package was published via oidc or not.

Due to this, many existing tools in the ecosystem break when encountering staged packages. (e.g. pnpm).

Solution

I think we just need two signals instead of inferring this stuff:

  1. Whether OIDC was used or not
  2. Whether staged publishing was used or not

e.g. {_npmMeta: {staged: true, oidc: true}}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions