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

Add support for custom npm registry url #513

Merged
merged 4 commits into from
Jan 31, 2022

Conversation

ghengeveld
Copy link
Member

Fixes #512

This attempts to retrieve the current registry url using npm config get registry or the Yarn equivalent. Failing that, it falls back to the default registry url for npm.

@linear
Copy link

linear bot commented Jan 31, 2022

CH-1486 CLI custom npm registry support

#512

The company I work for disables access to the public registry, so that we use our internal registry instead - which includes a mirror of the public registry.

This causes checkForUpdates to fail with the following message:

Could not retrieve package info from registry; skipping update check

Ideally chromatic would automatically use the registry in my closest .npmrc. Alternatively this could be set with a CLI flag and/or env var.

@ghengeveld ghengeveld requested a review from a team January 31, 2022 12:17
@ghengeveld ghengeveld merged commit ae23b1c into main Jan 31, 2022
@ghengeveld ghengeveld deleted the ghengeveld/ch-1486-cli-custom-npm-registry-support branch January 31, 2022 12:48
@ghengeveld
Copy link
Member Author

Released in 6.5.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Feature Request: Custom npm registry support
2 participants