GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Add auth support by damccorm · Pull Request #21 · actions/setup-node

Conversation

@damccorm

@damccorm damccorm commented Aug 5, 2019

Copy link
Copy Markdown
Contributor

No description provided.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Danny McCormick added 8 commits August 5, 2019 11:35
Danny McCormick
Updates
2b9c956
Danny McCormick
Update
409b7df
Danny McCormick
Update
0930c11
Danny McCormick
Update
dd1cda5
Danny McCormick
Update
287437b
Danny McCormick
Yarn sometimes prefers npmrc, so use same token
9776256
Danny McCormick
Description
f338d85
Danny McCormick
Update readme
8e12aec
@damccorm
damccorm requested review from bryanmacfarlane, chrispat and stephenmichaelf August 5, 2019 16:03
@chrispat
chrispat requested a review from arcanis August 5, 2019 16:10
@chrispat

chrispat commented Aug 5, 2019

Copy link
Copy Markdown
Contributor

@arcanis could you review this and make sure this will work for pulling and pushing packages to private registries with YARN?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

stephenmichaelf
stephenmichaelf reviewed Aug 5, 2019
View reviewed changes
Comment thread src/authutil.ts Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread src/authutil.ts Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread src/authutil.ts Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread src/authutil.ts Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread src/authutil.ts Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread src/authutil.ts Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread src/authutil.ts Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread src/authutil.ts Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread src/setup-node.ts Resolved

Uh oh!

There was an error while loading. Please reload this page.

arcanis
arcanis reviewed Aug 5, 2019
View reviewed changes
Comment thread README.md Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread src/authutil.ts Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread src/authutil.ts Resolved

Uh oh!

There was an error while loading. Please reload this page.

Danny McCormick added 3 commits August 5, 2019 13:12
Danny McCormick
Feedback
920661f
Danny McCormick
Add type
a9f1343
Danny McCormick
new toolkit and scoped registries
feb12fe
@bdougie bdougie mentioned this pull request Aug 5, 2019
node-setup@v1 permission denied, mkdir '/home/actions' when checking cach #23
Closed
Danny McCormick and others added 7 commits August 5, 2019 21:33
Danny McCormick
Merge branch 'master' into auth
6b65ca8
Danny McCormick
Merge branch 'master' of https://github.com/actions/setup-node into auth
1be350f
Danny McCormick
npmrc in RUNNER_TEMP
985b557
Danny McCormick
Dont always auth
c09ef15
Danny McCormick
Try exporting blank token
3c9d735
Danny McCormick
Get auth working for now pending runner changes
da3e599
Iheanyi Ekechukwu
Fix string interpolation for auth token.
f20c85e
@iheanyi
iheanyi force-pushed the auth branch from 706f892 to f20c85e Compare August 6, 2019 15:42
Danny McCormick and others added 3 commits August 6, 2019 11:52
Danny McCormick
Don't export both userconfigs
ff5ec86
Danny McCormick
Update authutil.js
e7609c8
@iheanyi
Add single quotes for authString
c970c05
iheanyi and others added 7 commits August 6, 2019 12:23
@iheanyi
Fix the registry string.
b9164e8
Danny McCormick
Use userconfig and append trailing slash
4d381b1
Danny McCormick
Keep in root of repo
0dfe4cf
Danny McCormick
Try just adding auth token
d157c73
Danny McCormick
Remove auth token
869ebd9
Danny McCormick
Try changes again
f1da8b8
Danny McCormick
Add tests
40a00ae
@damccorm

damccorm commented Aug 6, 2019 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor Author

This should be good to go, I verified it works for both GPR and npmjs for Yarn and npm. Note that there are a lot of file changes because I added the github package and lots of node_modules changed as a result. That's not super important though.

Files you should be looking at for this review are

  • src/setup-node.ts
  • src/authutil.ts
  • README.md
  • __tests__/authutil.test.ts
  • __tests__/__snapshots__/authutil.test.ts.snap
  • __tests__/installer.test.ts
  • action.yml
Edgarruiz85 reacted with heart emoji
All reactions
  • ❤️ 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@jclem

jclem commented Aug 6, 2019

Copy link
Copy Markdown

Can we remove the need to specify registry-url in order to get publishing to NPM working?

Edgarruiz85 reacted with heart emoji
All reactions
  • ❤️ 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@damccorm

damccorm commented Aug 6, 2019 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor Author

@jclem, as mentioned elsewhere that would cause auth to get configured by default. With that said, I think it would be nice to somehow configure this by default for npm users - are you ok pushing this off til past 8/8 though? Can at the very least include an example of authenticating against npm and GPR in the README for this pr though.

EDIT: Added some examples to the readme of publishing to npmjs and GPR

Edgarruiz85 reacted with heart emoji
All reactions
  • ❤️ 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

Danny McCormick
Npm and GPR samples
6b34be1
stephenmichaelf
stephenmichaelf reviewed Aug 6, 2019
View reviewed changes
Comment thread src/authutil.ts Outdated
}

function writeRegistryToFile(registryUrl: string, fileLocation: string) {
let scope = core.getInput('scope');

@stephenmichaelf stephenmichaelf Aug 6, 2019

Copy link
Copy Markdown

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Const + type

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@damccorm damccorm Aug 6, 2019

Copy link
Copy Markdown
Contributor Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

It gets modified so it needs to be let. Added types

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
stephenmichaelf
stephenmichaelf approved these changes Aug 6, 2019
View reviewed changes
Danny McCormick
Add types
6e4a792
@damccorm

damccorm commented Aug 6, 2019

Copy link
Copy Markdown
Contributor Author

@jclem I'm going to merge. If we decide we need something different for npm users we can add a follow up PR

Edgarruiz85 reacted with heart emoji
All reactions
  • ❤️ 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@damccorm
damccorm merged commit 78148da into master Aug 6, 2019
@damccorm
damccorm deleted the auth branch September 10, 2019 17:32
joebowbeer
joebowbeer reviewed Feb 27, 2020
View reviewed changes
Comment thread lib/authutil.js
const curContents = fs.readFileSync(fileLocation, 'utf8');
curContents.split(os.EOL).forEach((line) => {
// Add current contents unless they are setting the registry
if (!line.toLowerCase().startsWith('registry')) {

@joebowbeer joebowbeer Feb 27, 2020 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

This doesn't seem right. Only the line(s) that is being redefined should be removed.

registry defines the default registry for unscoped dependencies, whereas if scope is provided this function is (re)defining a scoped registry.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@stephenmichaelf stephenmichaelf Feb 27, 2020

Copy link
Copy Markdown

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

FYI @hross

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@yaacovCR yaacovCR mentioned this pull request Feb 24, 2023
question: secrets to file system changesets/action#262
Closed
krzyk pushed a commit to krzyk/setup-node that referenced this pull request Apr 11, 2023
@bradforj287
Merge pull request actions#21 from akamai/apiPathChange
ccc15f4
sandbox-api path change
deining pushed a commit to deining/setup-node that referenced this pull request Nov 9, 2023
@dependabot
Bump acorn from 7.1.0 to 7.1.1 (actions#21)
30030e8
Bumps [acorn](https://github.com/acornjs/acorn) from 7.1.0 to 7.1.1.
- [Release notes](https://github.com/acornjs/acorn/releases)
- [Commits](acornjs/acorn@7.1.0...7.1.1)

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
@aguilarj0987-oss

aguilarj0987-oss commented Nov 6, 2025

Copy link
Copy Markdown

yes>

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

pelonducks25-crypto
pelonducks25-crypto approved these changes Aug 1, 2026
View reviewed changes
@krzysdz krzysdz mentioned this pull request Sep 7, 2026
chore(ci): npm-publish via reusable workflows expressjs/body-parser#766
Merged
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@stephenmichaelf stephenmichaelf stephenmichaelf approved these changes
@chrispat chrispat Awaiting requested review from chrispat
@bryanmacfarlane bryanmacfarlane Awaiting requested review from bryanmacfarlane
+3 more reviewers
@joebowbeer joebowbeer joebowbeer left review comments
@arcanis arcanis arcanis left review comments
@pelonducks25-crypto pelonducks25-crypto pelonducks25-crypto approved these changes
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

10 participants

@damccorm @chrispat @jclem @aguilarj0987-oss @joebowbeer @stephenmichaelf @arcanis @deviddevil @pelonducks25-crypto @iheanyi
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.