Skip to content

Commit fd030c8

Browse files
authored
1 parent d315ead commit fd030c8

File tree

4 files changed

+19
-10
lines changed

4 files changed

+19
-10
lines changed

DEPENDENCIES.md

+11-1
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,7 @@ graph LR;
157157
npmcli-arborist-->npmcli-name-from-folder["@npmcli/name-from-folder"];
158158
npmcli-arborist-->npmcli-node-gyp["@npmcli/node-gyp"];
159159
npmcli-arborist-->npmcli-package-json["@npmcli/package-json"];
160+
npmcli-arborist-->npmcli-query["@npmcli/query"];
160161
npmcli-arborist-->npmcli-run-script["@npmcli/run-script"];
161162
npmcli-arborist-->npmcli-template-oss["@npmcli/template-oss"];
162163
npmcli-arborist-->npmlog;
@@ -186,6 +187,8 @@ graph LR;
186187
npmcli-metavuln-calculator-->pacote;
187188
npmcli-metavuln-calculator-->semver;
188189
npmcli-promise-spawn-->infer-owner;
190+
npmcli-query-->npm-package-arg;
191+
npmcli-query-->semver;
189192
npmcli-run-script-->npmcli-node-gyp["@npmcli/node-gyp"];
190193
npmcli-run-script-->npmcli-promise-spawn["@npmcli/promise-spawn"];
191194
npmcli-run-script-->read-package-json-fast;
@@ -567,6 +570,7 @@ graph LR;
567570
npmcli-arborist-->json-parse-even-better-errors;
568571
npmcli-arborist-->json-stringify-nice;
569572
npmcli-arborist-->minify-registry-metadata;
573+
npmcli-arborist-->minimatch;
570574
npmcli-arborist-->mkdirp-infer-owner;
571575
npmcli-arborist-->mkdirp;
572576
npmcli-arborist-->nock;
@@ -583,6 +587,7 @@ graph LR;
583587
npmcli-arborist-->npmcli-name-from-folder["@npmcli/name-from-folder"];
584588
npmcli-arborist-->npmcli-node-gyp["@npmcli/node-gyp"];
585589
npmcli-arborist-->npmcli-package-json["@npmcli/package-json"];
590+
npmcli-arborist-->npmcli-query["@npmcli/query"];
586591
npmcli-arborist-->npmcli-run-script["@npmcli/run-script"];
587592
npmcli-arborist-->npmcli-template-oss["@npmcli/template-oss"];
588593
npmcli-arborist-->npmlog;
@@ -634,6 +639,9 @@ graph LR;
634639
npmcli-move-file-->rimraf;
635640
npmcli-package-json-->json-parse-even-better-errors;
636641
npmcli-promise-spawn-->infer-owner;
642+
npmcli-query-->npm-package-arg;
643+
npmcli-query-->postcss-selector-parser;
644+
npmcli-query-->semver;
637645
npmcli-run-script-->node-gyp;
638646
npmcli-run-script-->npmcli-node-gyp["@npmcli/node-gyp"];
639647
npmcli-run-script-->npmcli-promise-spawn["@npmcli/promise-spawn"];
@@ -669,6 +677,8 @@ graph LR;
669677
parse-conflict-json-->json-parse-even-better-errors;
670678
parse-conflict-json-->just-diff-apply;
671679
parse-conflict-json-->just-diff;
680+
postcss-selector-parser-->cssesc;
681+
postcss-selector-parser-->util-deprecate;
672682
promise-retry-->err-code;
673683
promise-retry-->retry;
674684
promzard-->read;
@@ -742,6 +752,6 @@ packages higher up the chain.
742752
- pacote, libnpmaccess, libnpmhook, libnpmorg, libnpmsearch, libnpmteam, npm-profile
743753
- npm-registry-fetch
744754
- make-fetch-happen, libnpmversion, @npmcli/config, init-package-json
745-
- @npmcli/installed-package-contents, @npmcli/map-workspaces, cacache, @npmcli/git, @npmcli/run-script, npm-packlist, read-package-json, readdir-scoped-modules, promzard
755+
- @npmcli/installed-package-contents, @npmcli/map-workspaces, cacache, @npmcli/git, @npmcli/run-script, npm-packlist, read-package-json, @npmcli/query, readdir-scoped-modules, promzard
746756
- npm-bundled, read-package-json-fast, @npmcli/fs, unique-filename, @npmcli/promise-spawn, npm-package-arg, normalize-package-data, bin-links, nopt, npm-install-checks, npmlog, dezalgo, read
747757
- npm-normalize-package-bin, @npmcli/name-from-folder, semver, @npmcli/move-file, fs-minipass, infer-owner, ssri, unique-slug, proc-log, @npmcli/node-gyp, hosted-git-info, validate-npm-package-name, ignore-walk, minipass-fetch, @npmcli/package-json, cmd-shim, read-cmd-shim, write-file-atomic, abbrev, are-we-there-yet, gauge, parse-conflict-json, wrappy, treeverse, @npmcli/eslint-config, @npmcli/template-oss, @npmcli/disparity-colors, @npmcli/ci-detect, mute-stream, ini, npm-audit-report, npm-user-validate

node_modules/npm-profile/lib/index.js

+4-5
Original file line numberDiff line numberDiff line change
@@ -56,13 +56,11 @@ const webAuth = (opener, opts, body) => {
5656
const { hostname } = opts
5757
body.hostname = hostname || os.hostname()
5858
const target = '/-/v1/login'
59+
const doneEmitter = new EventEmitter()
5960
return fetch(target, {
6061
...opts,
6162
method: 'POST',
6263
body,
63-
headers: {
64-
'npm-use-webauthn': opts.authType === 'webauthn',
65-
},
6664
}).then(res => {
6765
return Promise.all([res, res.json()])
6866
}).then(([res, content]) => {
@@ -75,8 +73,6 @@ const webAuth = (opener, opts, body) => {
7573
}).then(({ doneUrl, loginUrl }) => {
7674
log.verbose('web auth', 'opening url pair')
7775

78-
const doneEmitter = new EventEmitter()
79-
8076
const openPromise = opener(loginUrl, doneEmitter)
8177
const webAuthCheckPromise = webAuthCheckLogin(doneUrl, { ...opts, cache: false })
8278
.then(authResult => {
@@ -93,6 +89,9 @@ const webAuth = (opener, opts, body) => {
9389
([, authResult]) => authResult
9490
)
9591
}).catch(er => {
92+
// cancel open prompt if it's present
93+
doneEmitter.emit('abort')
94+
9695
if ((er.statusCode >= 400 && er.statusCode <= 499) || er.statusCode === 500) {
9796
throw new WebLoginNotSupported('POST', {
9897
status: er.statusCode,

node_modules/npm-profile/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "npm-profile",
3-
"version": "6.2.0",
3+
"version": "6.2.1",
44
"description": "Library for updating an npmjs.com profile",
55
"keywords": [],
66
"author": "GitHub Inc.",

package-lock.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -5199,9 +5199,9 @@
51995199
}
52005200
},
52015201
"node_modules/npm-profile": {
5202-
"version": "6.2.0",
5203-
"resolved": "https://registry.npmjs.org/npm-profile/-/npm-profile-6.2.0.tgz",
5204-
"integrity": "sha512-wG7ZAsLvhqDc2b9COAuGUJgPRUfvCnQI8NEYeifSHZpSYXAgTsHu5812kkcwZeX/5WPd/ARX/MJRWTBFjlUxvg==",
5202+
"version": "6.2.1",
5203+
"resolved": "https://registry.npmjs.org/npm-profile/-/npm-profile-6.2.1.tgz",
5204+
"integrity": "sha512-Tlu13duByHyDd4Xy0PgroxzxnBYWbGGL5aZifNp8cx2DxUrHSoETXtPKg38aRPsBWMRfDtvcvVfJNasj7oImQQ==",
52055205
"inBundle": true,
52065206
"dependencies": {
52075207
"npm-registry-fetch": "^13.0.1",

0 commit comments

Comments
 (0)