diff --git a/DEPENDENCIES.md b/DEPENDENCIES.md index 421efae116298..5fc3ac432104d 100644 --- a/DEPENDENCIES.md +++ b/DEPENDENCIES.md @@ -157,6 +157,7 @@ graph LR; npmcli-arborist-->npmcli-name-from-folder["@npmcli/name-from-folder"]; npmcli-arborist-->npmcli-node-gyp["@npmcli/node-gyp"]; npmcli-arborist-->npmcli-package-json["@npmcli/package-json"]; + npmcli-arborist-->npmcli-query["@npmcli/query"]; npmcli-arborist-->npmcli-run-script["@npmcli/run-script"]; npmcli-arborist-->npmcli-template-oss["@npmcli/template-oss"]; npmcli-arborist-->npmlog; @@ -186,6 +187,8 @@ graph LR; npmcli-metavuln-calculator-->pacote; npmcli-metavuln-calculator-->semver; npmcli-promise-spawn-->infer-owner; + npmcli-query-->npm-package-arg; + npmcli-query-->semver; npmcli-run-script-->npmcli-node-gyp["@npmcli/node-gyp"]; npmcli-run-script-->npmcli-promise-spawn["@npmcli/promise-spawn"]; npmcli-run-script-->read-package-json-fast; @@ -567,6 +570,7 @@ graph LR; npmcli-arborist-->json-parse-even-better-errors; npmcli-arborist-->json-stringify-nice; npmcli-arborist-->minify-registry-metadata; + npmcli-arborist-->minimatch; npmcli-arborist-->mkdirp-infer-owner; npmcli-arborist-->mkdirp; npmcli-arborist-->nock; @@ -583,6 +587,7 @@ graph LR; npmcli-arborist-->npmcli-name-from-folder["@npmcli/name-from-folder"]; npmcli-arborist-->npmcli-node-gyp["@npmcli/node-gyp"]; npmcli-arborist-->npmcli-package-json["@npmcli/package-json"]; + npmcli-arborist-->npmcli-query["@npmcli/query"]; npmcli-arborist-->npmcli-run-script["@npmcli/run-script"]; npmcli-arborist-->npmcli-template-oss["@npmcli/template-oss"]; npmcli-arborist-->npmlog; @@ -634,6 +639,9 @@ graph LR; npmcli-move-file-->rimraf; npmcli-package-json-->json-parse-even-better-errors; npmcli-promise-spawn-->infer-owner; + npmcli-query-->npm-package-arg; + npmcli-query-->postcss-selector-parser; + npmcli-query-->semver; npmcli-run-script-->node-gyp; npmcli-run-script-->npmcli-node-gyp["@npmcli/node-gyp"]; npmcli-run-script-->npmcli-promise-spawn["@npmcli/promise-spawn"]; @@ -669,6 +677,8 @@ graph LR; parse-conflict-json-->json-parse-even-better-errors; parse-conflict-json-->just-diff-apply; parse-conflict-json-->just-diff; + postcss-selector-parser-->cssesc; + postcss-selector-parser-->util-deprecate; promise-retry-->err-code; promise-retry-->retry; promzard-->read; @@ -742,6 +752,6 @@ packages higher up the chain. - pacote, libnpmaccess, libnpmhook, libnpmorg, libnpmsearch, libnpmteam, npm-profile - npm-registry-fetch - make-fetch-happen, libnpmversion, @npmcli/config, init-package-json - - @npmcli/installed-package-contents, @npmcli/map-workspaces, cacache, @npmcli/git, @npmcli/run-script, npm-packlist, read-package-json, readdir-scoped-modules, promzard + - @npmcli/installed-package-contents, @npmcli/map-workspaces, cacache, @npmcli/git, @npmcli/run-script, npm-packlist, read-package-json, @npmcli/query, readdir-scoped-modules, promzard - 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 - 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 \ No newline at end of file diff --git a/node_modules/npm-profile/lib/index.js b/node_modules/npm-profile/lib/index.js index e4ac5622e0d5c..ce78882a55438 100644 --- a/node_modules/npm-profile/lib/index.js +++ b/node_modules/npm-profile/lib/index.js @@ -56,13 +56,11 @@ const webAuth = (opener, opts, body) => { const { hostname } = opts body.hostname = hostname || os.hostname() const target = '/-/v1/login' + const doneEmitter = new EventEmitter() return fetch(target, { ...opts, method: 'POST', body, - headers: { - 'npm-use-webauthn': opts.authType === 'webauthn', - }, }).then(res => { return Promise.all([res, res.json()]) }).then(([res, content]) => { @@ -75,8 +73,6 @@ const webAuth = (opener, opts, body) => { }).then(({ doneUrl, loginUrl }) => { log.verbose('web auth', 'opening url pair') - const doneEmitter = new EventEmitter() - const openPromise = opener(loginUrl, doneEmitter) const webAuthCheckPromise = webAuthCheckLogin(doneUrl, { ...opts, cache: false }) .then(authResult => { @@ -93,6 +89,9 @@ const webAuth = (opener, opts, body) => { ([, authResult]) => authResult ) }).catch(er => { + // cancel open prompt if it's present + doneEmitter.emit('abort') + if ((er.statusCode >= 400 && er.statusCode <= 499) || er.statusCode === 500) { throw new WebLoginNotSupported('POST', { status: er.statusCode, diff --git a/node_modules/npm-profile/package.json b/node_modules/npm-profile/package.json index bd4ebd3176115..457a1fb0988fb 100644 --- a/node_modules/npm-profile/package.json +++ b/node_modules/npm-profile/package.json @@ -1,6 +1,6 @@ { "name": "npm-profile", - "version": "6.2.0", + "version": "6.2.1", "description": "Library for updating an npmjs.com profile", "keywords": [], "author": "GitHub Inc.", diff --git a/package-lock.json b/package-lock.json index 3eba393001c46..f947eef55389a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -5199,9 +5199,9 @@ } }, "node_modules/npm-profile": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/npm-profile/-/npm-profile-6.2.0.tgz", - "integrity": "sha512-wG7ZAsLvhqDc2b9COAuGUJgPRUfvCnQI8NEYeifSHZpSYXAgTsHu5812kkcwZeX/5WPd/ARX/MJRWTBFjlUxvg==", + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/npm-profile/-/npm-profile-6.2.1.tgz", + "integrity": "sha512-Tlu13duByHyDd4Xy0PgroxzxnBYWbGGL5aZifNp8cx2DxUrHSoETXtPKg38aRPsBWMRfDtvcvVfJNasj7oImQQ==", "inBundle": true, "dependencies": { "npm-registry-fetch": "^13.0.1",