Skip to content
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

Don't remove registry unless it is assigned #118

Closed
joebowbeer opened this issue Mar 1, 2020 · 3 comments
Closed

Don't remove registry unless it is assigned #118

joebowbeer opened this issue Mar 1, 2020 · 3 comments
Labels
bug Something isn't working

Comments

@joebowbeer
Copy link

joebowbeer commented Mar 1, 2020

Given that: If registry-url is specified then a @scope:registry= line will always be added to .npmrc if the registry is npm.pkg.github.com,

I think it's a bug for setup-node to remove the registry= line from .npmrc. In theory this line could be configuring a registry that is totally unrelated to GitHub packages.

In short, setup-node should only remove lines it is replacing.

In addition, I think better doc is needed regarding the use of the https://npm.pkg.github.com/owner proxy registry. Is setup-node compatible with the proxy registry? Or should an explicitly scoped registry always be used?

@shawnmclean
Copy link

Looking at this article, I think I'm hitting the same issue here where I need to set the npmrc in that pattern for proxying to npm to work.

@dmitry-shibanov
Copy link
Contributor

Hello @joebowbeer. Thank you for your report. The setup-node action supports only scoped registry for GitHub packages. If the scope is not provided the action sets the scope automatically for GitHub package registry. I think the action should remove registry line because the .npmrc file can contain any amount of scoped registries but it's limited by common registries.
For now the action supports only scoped registry for GitHub packages. Could you please create a feature request to add support for proxy registry ?
For now I'm going to close the issue. If I'm mistaken could please share the link of the documentation and ping us.

@joebowbeer
Copy link
Author

joebowbeer commented Dec 21, 2021

@dmitry-shibanov Where is the updated documentation for setup-node with registry-url?

This issue is reporting that it is a bug for setup-node to remove the default registry for non-scoped dependencies, as discussed in #87

It is also requesting that the documentation explain when setup-node may remove lines from the .npmrc file.

By the way, I think there is some confusion in terminology.

You refer to the following as a common registry?

https://npm.pkg.github.com/owner proxy registry

deining pushed a commit to deining/setup-node that referenced this issue Nov 9, 2023
* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants