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

Suggestion: follow the user's npmrc config by default #689

Merged
merged 2 commits into from
Sep 5, 2024

Conversation

tweettypography
Copy link
Contributor

Looks up the registry url and authorization details from the npmrc file if they are not included in the config. Hardcoding registries and tokens in the config is not desirable if it can be avoided. Also drops tokens from logs / files to reduce the risk of leaking.

registry = config.npmRegistry ?? 'https://registry.npmjs.org',
timeoutInDays = 60,
registry = config.npmRegistry ?? getRegistryUrl(scope), // Use custom registry or fallback to 1) registry set for the scope, 2) default registry in the npmrc, or 3) the default registry
timeoutInDays = 7,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why change the default timeoutInDays?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fair question as it's not really relevant to this change in general, but this felt like a much more reasonable default for most tools. It's configurable so not a big deal but two months is a long time to wait (by default) to notify users of a new version.

@mdonnalley mdonnalley added the enhancement New feature or request label Sep 4, 2024
Copy link

git2gus bot commented Sep 4, 2024

This issue has been linked to a new work item: W-16659727

@mdonnalley mdonnalley merged commit 94be8f5 into oclif:main Sep 5, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla:signed enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants