-
-
Notifications
You must be signed in to change notification settings - Fork 141
Support installation from custom NPM registry via .npmrc
#179
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
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.
❤️ Love this.
My opinion doesn't matter a great deal, but I'm going to give it anyway 😜
3ea717c
to
eee93a8
Compare
@zkochan @KSXGitHub would you mind taking a look when you get a chance, thanks! |
I have an environment where using the public registry is not an option due to security constraints, so being able to configure this installation to use our private registry is essential so thanks for doing this! |
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.
Alternatively, pnpm itself uses the package ini
(with @types/ini
for typing) to parse INI. That could be used instead of trying to reinvent the parser.
Just copy the |
copy .npmrc from GitHub workspace if it exists so that PNPM respects custom registry configurations when self-installing
eee93a8
to
0ca63ec
Compare
Thank you everyone for taking a look, and thank you for the feedback!
That's so much more elegant, thank you for the suggestion! |
Related to #177.
This PR adds support for custom NPM registry configurations, allowing the action to install PNPM from there.
With this, the action copies a potential
.npmrc
into the destination directory from where PNPM runs self-install, respecting potential custom registry configurations.Note
I was also considering an action parameter, but this feels more natural - if you are already using a custom registry via
.npmrc
, then you'll likely want your package manager to be fetched form there as well.But I could also see a parameter being helpful for some setups, perhaps even acting as an override to the
.npmrc
registry configuration. Maybe as a follow-up?Any feedback is greatly appreciated!