这是indexloc提供的服务,不要输入任何密码
Skip to content

[create-turbo] Remove registry argument to install. #1742

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

Merged
merged 1 commit into from
Aug 23, 2022

Conversation

nathanhammond
Copy link
Contributor

@nathanhammond nathanhammond commented Aug 23, 2022

The registry argument is being read from the configuration paths and then being passed back in via --registry which is entirely unnecessary. The package managers already default to deferring to system-configured registries.

This was added in #885, but is unnecessary.

The registry argument is being read from the configuration paths and then being passed back in via `--registry` which is entirely unnecessary. The package managers already default to deferring to system-configured registries.
@nathanhammond nathanhammond requested a review from a team as a code owner August 23, 2022 04:14
@vercel
Copy link

vercel bot commented Aug 23, 2022

@nathanhammond is attempting to deploy a commit to the Vercel Team on Vercel.

A member of the Team first needs to authorize it.

@nathanhammond nathanhammond changed the title Remove registry argument. [create-turbo] Remove registry argument to install. Aug 23, 2022
@vercel
Copy link

vercel bot commented Aug 23, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
turbo-site ✅ Ready (Inspect) Visit Preview Aug 23, 2022 at 4:15AM (UTC)

@nathanhammond
Copy link
Contributor Author

nathanhammond commented Aug 23, 2022

create-turbo does not accept a registry argument, which means that (for example) yarn get config registry will return the same information that would be used by the package manager to begin with. Unnecessary, redundant, and unnecessary.

~/foo$ yarn config delete registry

yarn config v1.22.19
success Deleted "registry".
✨  Done in 0.01s.
~/foo$ yarn config get registry

https://registry.yarnpkg.com
~/foo$ cat ~/.yarnrc

# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
# yarn lockfile v1


lastUpdateCheck 1661227145239
~/foo$ yarn config set registry https://registry.npmjs.org/

yarn config v1.22.19
success Set "registry" to "https://registry.npmjs.org/".
✨  Done in 0.01s.
~/foo$ yarn install --verbose
yarn install v1.22.19
verbose 0.102622833 Checking for configuration file "/Users/nathanhammond/foo/.npmrc".
verbose 0.102778166 Checking for configuration file "/Users/nathanhammond/.npmrc".
verbose 0.102885125 Found configuration file "/Users/nathanhammond/.npmrc".
verbose 0.103009125 Checking for configuration file "/Users/nathanhammond/.nvm/versions/node/v16.16.0/etc/npmrc".
verbose 0.103133166 Checking for configuration file "/Users/nathanhammond/foo/.npmrc".
verbose 0.103252291 Checking for configuration file "/Users/nathanhammond/.npmrc".
verbose 0.103350583 Found configuration file "/Users/nathanhammond/.npmrc".
verbose 0.103518958 Checking for configuration file "/Users/.npmrc".
verbose 0.104174166 Checking for configuration file "/Users/nathanhammond/foo/.yarnrc".
verbose 0.104224416 Checking for configuration file "/Users/nathanhammond/.yarnrc".
verbose 0.104341458 Found configuration file "/Users/nathanhammond/.yarnrc".
verbose 0.104461125 Checking for configuration file "/Users/nathanhammond/.nvm/versions/node/v16.16.0/etc/yarnrc".
verbose 0.104525916 Checking for configuration file "/Users/nathanhammond/foo/.yarnrc".
verbose 0.10466425 Checking for configuration file "/Users/nathanhammond/.yarnrc".
verbose 0.104712166 Found configuration file "/Users/nathanhammond/.yarnrc".
verbose 0.104810541 Checking for configuration file "/Users/.yarnrc".
verbose 0.105868375 current time: 2022-08-23T04:05:24.028Z
info No lockfile found.
[1/4] 🔍  Resolving packages...
verbose 0.122696125 Performing "GET" request to "https://registry.npmjs.org/left-pad"
                                                         ^^^^^^^^^^^^^^^^^^

@tknickman
Copy link
Member

I'm in favor of this, it's unnecessary complexity that makes extending to additional package managers particularly brittle.

@tknickman tknickman merged commit bca1776 into vercel:main Aug 23, 2022
@nathanhammond nathanhammond deleted the remove-registry branch August 23, 2022 14:09
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.

2 participants