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

Parsing NPM registry from .npmrc should support scope-specific registries #3741

Closed
sschuberth opened this issue Mar 9, 2021 · 2 comments
Closed
Labels
analyzer About the analyzer tool enhancement Issues that are considered to be enhancements hacktoberfest An issue suitable for the Hacktoberfest

Comments

@sschuberth
Copy link
Member

sschuberth commented Mar 9, 2021

Currently, readRegistryFromNpmRc() only supports "global" registries:

if (key == "registry") return value

But we should support the syntax for scope-specific registries, too, see

# last modified: 01 Jan 2016
; Set a new registry for a scoped package
@myscope:registry=https://mycustomregistry.example.org
@sschuberth sschuberth added analyzer About the analyzer tool enhancement Issues that are considered to be enhancements labels Mar 9, 2021
@nicorikken
Copy link
Member

nicorikken commented Jun 11, 2021

Ah, thanks for raising this. Now I know why I couldn't get our custom npm package to work. To be explicit ORT is raising the following errors:

14:27:35.485 [DefaultDispatcher-worker-2] INFO  org.ossreviewtoolkit.analyzer.managers.Npm - Could not retrieve package information for '@alliander%2Falliander-plugin-xxx' from NPM registry https://registry.npmjs.org:  (HTTP code 404)

With the .npmrc file:

always-auth=true//npm.pkg.github.com/:_authToken=${NODE_AUTH_TOKEN}
@alliander:registry=https://npm.pkg.github.com/

If I understand it correctly, the npmRegistry variable is global, so this is quite a bit of rework.

@sschuberth sschuberth added the hacktoberfest An issue suitable for the Hacktoberfest label Oct 2, 2021
@sschuberth
Copy link
Member Author

This was obsoleted by #5162 which removed readRegistryFromNpmRc() altogether in favor of a better solution based on npm view.

MarcelBochtler added a commit to boschglobal/oss-review-toolkit that referenced this issue Jul 26, 2022
The issue [1] was resolved.

[1]: oss-review-toolkit#3741

Signed-off-by: Marcel Bochtler <marcel.bochtler@bosch.io>
MarcelBochtler added a commit to boschglobal/oss-review-toolkit that referenced this issue Jul 26, 2022
The issue [1] was resolved.

[1]: oss-review-toolkit#3741

Signed-off-by: Marcel Bochtler <marcel.bochtler@bosch.io>
MarcelBochtler added a commit to boschglobal/oss-review-toolkit that referenced this issue Jul 27, 2022
The issue [1] was resolved.

[1]: oss-review-toolkit#3741

Signed-off-by: Marcel Bochtler <marcel.bochtler@bosch.io>
MarcelBochtler added a commit to boschglobal/oss-review-toolkit that referenced this issue Jul 27, 2022
The issue [1] was resolved.

[1]: oss-review-toolkit#3741

Signed-off-by: Marcel Bochtler <marcel.bochtler@bosch.io>
MarcelBochtler added a commit to boschglobal/oss-review-toolkit that referenced this issue Jul 27, 2022
The issue [1] was resolved.

[1]: oss-review-toolkit#3741

Signed-off-by: Marcel Bochtler <marcel.bochtler@bosch.io>
MarcelBochtler added a commit to boschglobal/oss-review-toolkit that referenced this issue Jul 27, 2022
The issue [1] was resolved.

[1]: oss-review-toolkit#3741

Signed-off-by: Marcel Bochtler <marcel.bochtler@bosch.io>
MarcelBochtler added a commit to boschglobal/oss-review-toolkit that referenced this issue Aug 3, 2022
The issue [1] was resolved.

[1]: oss-review-toolkit#3741

Signed-off-by: Marcel Bochtler <marcel.bochtler@bosch.io>
MarcelBochtler added a commit to boschglobal/oss-review-toolkit that referenced this issue Aug 3, 2022
The issue [1] was resolved.

[1]: oss-review-toolkit#3741

Signed-off-by: Marcel Bochtler <marcel.bochtler@bosch.io>
MarcelBochtler added a commit to boschglobal/oss-review-toolkit that referenced this issue Aug 3, 2022
The issue [1] was resolved.

[1]: oss-review-toolkit#3741

Signed-off-by: Marcel Bochtler <marcel.bochtler@bosch.io>
MarcelBochtler added a commit to boschglobal/oss-review-toolkit that referenced this issue Aug 3, 2022
The issue [1] was resolved.

[1]: oss-review-toolkit#3741

Signed-off-by: Marcel Bochtler <marcel.bochtler@bosch.io>
MarcelBochtler added a commit to boschglobal/oss-review-toolkit that referenced this issue Aug 3, 2022
The issue [1] was resolved.

[1]: oss-review-toolkit#3741

Signed-off-by: Marcel Bochtler <marcel.bochtler@bosch.io>
MarcelBochtler added a commit to boschglobal/oss-review-toolkit that referenced this issue Aug 3, 2022
The issue [1] was resolved.

[1]: oss-review-toolkit#3741

Signed-off-by: Marcel Bochtler <marcel.bochtler@bosch.io>
MarcelBochtler added a commit to boschglobal/oss-review-toolkit that referenced this issue Aug 4, 2022
The issue [1] was resolved.

[1]: oss-review-toolkit#3741

Signed-off-by: Marcel Bochtler <marcel.bochtler@bosch.io>
MarcelBochtler added a commit to boschglobal/oss-review-toolkit that referenced this issue Aug 4, 2022
The issue [1] was resolved.

[1]: oss-review-toolkit#3741

Signed-off-by: Marcel Bochtler <marcel.bochtler@bosch.io>
MarcelBochtler added a commit to boschglobal/oss-review-toolkit that referenced this issue Aug 4, 2022
The issue [1] was resolved.

[1]: oss-review-toolkit#3741

Signed-off-by: Marcel Bochtler <marcel.bochtler@bosch.io>
MarcelBochtler added a commit that referenced this issue Aug 5, 2022
The issue [1] was resolved.

[1]: #3741

Signed-off-by: Marcel Bochtler <marcel.bochtler@bosch.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
analyzer About the analyzer tool enhancement Issues that are considered to be enhancements hacktoberfest An issue suitable for the Hacktoberfest
Projects
None yet
Development

No branches or pull requests

2 participants