Skip to content

feat: enable to check auth token to github packages#219

Open
LiKang6688 wants to merge 1 commit into
changesets:mainfrom
LiKang6688:feat/auth-token
Open

feat: enable to check auth token to github packages#219
LiKang6688 wants to merge 1 commit into
changesets:mainfrom
LiKang6688:feat/auth-token

Conversation

@LiKang6688

Copy link
Copy Markdown

solve #178

@changeset-bot

changeset-bot Bot commented Oct 4, 2022

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: cf0d585

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@changesets/action Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@iansan5653 iansan5653 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need this too -- our npmrc has a line that looks like:

//npm.pkg.github.com/:_authToken=${PACKAGES_TOKEN}

@Netail

Netail commented Jan 28, 2023

Copy link
Copy Markdown

Time to merge?

Note: it would be nice to create a new .npmrc file with publishConfig.registry from the package.json if the .npmrc file doesn't exist, with the NPM registry being the default if a custom registry is not defined.

@claudiocantara

Copy link
Copy Markdown

Would you guys please merge this?
I need it too.

@JasperAlexander

Copy link
Copy Markdown

I need it too. Please merge if it works!

@MarekSyk

MarekSyk commented Mar 25, 2023 via email

Copy link
Copy Markdown

@leojuriolli7

Copy link
Copy Markdown

I need this as well. Would you guys please consider merging this?

@pleerock

pleerock commented Aug 7, 2023

Copy link
Copy Markdown

This one is critical to have, any estimates to accept this PR / or propose alternatives?

@peschee

peschee commented Aug 25, 2023

Copy link
Copy Markdown

Is there any chance this gets merged? Currently, it seems that GitHub Packages as NPM registry are not supported.

Comment thread src/index.ts
return /^\s*\/\/registry\.npmjs\.org\/:[_-]authToken=/i.test(line);
// npm Registry: check based on https://github.com/npm/cli/blob/8f8f71e4dd5ee66b3b17888faad5a7bf6c657eed/test/lib/adduser.js#L103-L105
// GitHub Packages: check based on https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-npm-registry#authenticating-with-a-personal-access-token
return /^\s*\/\/registry\.npmjs\.org\/:[_-]authToken=/i.test(line) || /^\s*\/\/npm\.pkg\.github\.com\/:[_-]authToken=/i.test(line)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't the regex here not be registry-specific but rather look for something more generic like just the :_authToken= part?

@belfz

belfz commented Oct 17, 2025

Copy link
Copy Markdown

Any chance this will be merged soon?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

10 participants