Skip to content

OIDC should be exported and available in libnpmpublish #9503

@ghiscoding

Description

@ghiscoding

The OIDC function from oidc.js is not currently exported neither available from the libnpmpublish package. This mean that to get it working in Lerna/Lerna-Lite (I maintain the latter), we had to copy and reimplement the oidc.js into Lerna/Lerna-Lite to make it work.

There's 2 obvious issues related to this approach:

  1. duplicate code increasing Lerna/Lerna-Lite project size
  2. any changes made in oidc.js needs to be resync manually in external projects like Lerna/Lerna-Lite
    • for example adding OIDC CircleCI support was added much later and this wasn't synched back to Lerna which means it doesn't currently work in Lerna (I did synch it myself in Lerna-Lite though)
    • ref: Lerna oidc.ts and Lerna-Lite oidc.ts

libnpmpublish only exports 2 functions (publish and unpublish)

module.exports = {
publish: require('./publish.js'),
unpublish: require('./unpublish.js'),
}

I mention Lerna/Lerna-Lite in here, but I'm sure there's few hundred projects that would benefit from having OIDC available directly in libnpmpublish

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