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

fix: default auth-type to legacy if otp is configured #6044

Merged
merged 1 commit into from Jan 12, 2023

Conversation

wraithgar
Copy link
Member

@wraithgar wraithgar commented Jan 11, 2023

@wraithgar wraithgar requested a review from a team as a code owner January 11, 2023 17:05
@npm-cli-bot
Copy link
Collaborator

found 2 benchmarks with statistically significant performance improvements

  • app-large: no-clean:audit
  • app-medium: clean
timing results
app-large clean lock-only cache-only cache-only
peer-deps
modules-only no-lock no-cache no-modules no-clean no-clean
audit
npm@8 39.138 ±0.63 15.639 ±0.05 14.517 ±0.06 18.524 ±3.02 2.806 ±0.13 2.649 ±0.02 2.175 ±0.03 10.059 ±0.13 2.180 ±0.04 4.092 ±0.35
#6044 37.253 ±0.78 15.622 ±0.40 14.095 ±0.10 17.101 ±1.16 2.652 ±0.01 2.669 ±0.01 2.048 ±0.01 9.798 ±0.19 2.132 ±0.03 3.550 ±0.14
app-medium clean lock-only cache-only cache-only
peer-deps
modules-only no-lock no-cache no-modules no-clean no-clean
audit
npm@8 26.925 ±0.25 12.531 ±0.09 11.141 ±0.09 12.220 ±0.11 2.408 ±0.01 2.423 ±0.02 2.186 ±0.04 7.656 ±0.05 2.074 ±0.04 4.977 ±2.46
#6044 23.652 ±1.46 11.829 ±0.20 10.869 ±0.07 11.821 ±0.01 2.431 ±0.03 2.441 ±0.02 2.110 ±0.04 7.547 ±0.00 1.987 ±0.03 4.361 ±1.82

@ljharb
Copy link
Collaborator

ljharb commented Jan 11, 2023

So would this be otp = true instead of auth-type = legacy in .npmrc?

@wraithgar
Copy link
Member Author

I wouldn't recommend that, otp is a type [null, String] so it would coerce otp to "true" and send that as an otp value. If you're setting config just set your auth-type.

@ljharb
Copy link
Collaborator

ljharb commented Jan 11, 2023

ah, thanks, that clears up my confusion.

@lukekarrys lukekarrys merged commit cf175fb into latest Jan 12, 2023
@lukekarrys lukekarrys deleted the gar/otp-legacy branch January 12, 2023 04:15
@github-actions github-actions bot mentioned this pull request Jan 12, 2023
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.

[BUG] --otp should infer--auth-type=legacy
4 participants