Skip to content

Don't remove registry unless it is assigned #118

Closed

Description

@joebowbeer

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?

Activity

  1. shawnmclean commented on Nov 4, 2021

    @shawnmclean

    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.

  2. dmitry-shibanov commented on Dec 21, 2021

    @dmitry-shibanov
    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.

  3. joebowbeer commented on Dec 21, 2021

    @joebowbeer
    Author

    @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

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions