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

feat: separate login/adduser, remove auth types #5550

Merged
merged 1 commit into from
Sep 21, 2022

Conversation

wraithgar
Copy link
Member

@wraithgar wraithgar commented Sep 21, 2022

BREAKING CHANGE: This removes all auth-type configs except web and
legacy.

BREAKING CHANGE: Finally, login and adduser are now separate
commands that send different data to the registry.

BREAKING CHANGE: auth-type config values web and legacy only try
their respective methods, npm no longer tries them all and waits to see
which one doesn't fail.

The difference between adduser and login depends on the auth-type.

  • web: the POST to /-/v1/login contains a { create: true } value
    in its payload for adduser
  • legacy the PUT request to /-/user/org.couchdb.user:${username}
    contains an email value in its payload for adduser.

@wraithgar wraithgar requested a review from a team as a code owner September 21, 2022 16:46
BREAKING CHANGE: This removes all `auth-type` configs except `web` and
`legacy`.

BREAKING CHANGE: Finally, `login` and `adduser` are now separate
commands that send different data to the registry.

BREAKING CHANGE: `auth-type` config values `web` and `legacy` only try
their respective methods, npm no longer tries them all and waits to see
which one doesn't fail.

The difference between `adduser` and `login` depends on the `auth-type`.

 - `web`: the POST to `/-/v1/login` contains a `{ create: true }` value
   in its payload for `adduser`
 - `legacy` the `PUT` request  to `/-/user/org.couchdb.user:${username}`
   contains an `email` value in its payload for `adduser`.
@wraithgar
Copy link
Member Author

Closes npm/statusboard#452
Closes npm/statusboard#453
Closes npm/statusboard#451

@npm-cli-bot
Copy link
Collaborator

npm-cli-bot commented Sep 21, 2022

found 1 benchmarks with statistically significant performance regressions

  • 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 49.806 ±6.73 18.299 ±0.07 16.361 ±0.02 19.402 ±0.19 2.999 ±0.02 2.962 ±0.03 2.440 ±0.09 11.203 ±0.07 2.420 ±0.02 4.171 ±0.86
#5550 48.315 ±0.69 19.498 ±0.07 17.401 ±0.18 20.332 ±0.92 3.129 ±0.10 3.079 ±0.03 2.498 ±0.01 12.083 ±0.09 2.436 ±0.01 3.596 ±0.02
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 30.832 ±0.32 14.216 ±0.00 12.557 ±0.04 13.541 ±0.48 2.735 ±0.04 2.680 ±0.00 2.442 ±0.05 8.519 ±0.04 2.280 ±0.02 3.043 ±0.01
#5550 35.663 ±1.14 14.619 ±0.09 13.232 ±0.07 13.852 ±0.74 2.701 ±0.00 2.742 ±0.03 2.552 ±0.08 8.953 ±0.08 2.345 ±0.03 3.230 ±0.02

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.

3 participants