Skip to content

Commit

Permalink
deps: npm-profile@6.2.1 (#5245)
Browse files Browse the repository at this point in the history
  • Loading branch information
nlf committed Aug 2, 2022
1 parent d315ead commit fd030c8
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 10 deletions.
12 changes: 11 additions & 1 deletion DEPENDENCIES.md
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand All @@ -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;
Expand Down Expand Up @@ -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"];
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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
9 changes: 4 additions & 5 deletions node_modules/npm-profile/lib/index.js
Expand Up @@ -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]) => {
Expand All @@ -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 => {
Expand All @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion 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.",
Expand Down
6 changes: 3 additions & 3 deletions package-lock.json
Expand Up @@ -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",
Expand Down

0 comments on commit fd030c8

Please sign in to comment.