From 247220552bc19a5751542289605f38ab9b74e124 Mon Sep 17 00:00:00 2001 From: Gar Date: Fri, 14 Apr 2023 19:15:12 -0700 Subject: [PATCH] deps: npm-registry-fetch@14.0.4 --- node_modules/npm-registry-fetch/lib/clean-url.js | 3 ++- node_modules/npm-registry-fetch/package.json | 9 ++++----- package-lock.json | 8 ++++---- package.json | 2 +- tap-snapshots/test/lib/utils/error-message.js.test.cjs | 2 +- test/lib/cli.js | 2 +- test/lib/utils/exit-handler.js | 2 +- test/lib/utils/replace-info.js | 6 +++--- 8 files changed, 17 insertions(+), 17 deletions(-) diff --git a/node_modules/npm-registry-fetch/lib/clean-url.js b/node_modules/npm-registry-fetch/lib/clean-url.js index a419b47d6a339..0c2656b5653a0 100644 --- a/node_modules/npm-registry-fetch/lib/clean-url.js +++ b/node_modules/npm-registry-fetch/lib/clean-url.js @@ -12,7 +12,8 @@ const cleanUrl = (str) => { try { const url = new URL(str) if (url.password) { - str = str.replace(url.password, replace) + url.password = replace + str = url.toString() } } catch { // ignore errors diff --git a/node_modules/npm-registry-fetch/package.json b/node_modules/npm-registry-fetch/package.json index 89550cee29ae6..1625e91544bfb 100644 --- a/node_modules/npm-registry-fetch/package.json +++ b/node_modules/npm-registry-fetch/package.json @@ -1,6 +1,6 @@ { "name": "npm-registry-fetch", - "version": "14.0.3", + "version": "14.0.4", "description": "Fetch-based http client for use with npm registry APIs", "main": "lib", "files": [ @@ -41,12 +41,10 @@ }, "devDependencies": { "@npmcli/eslint-config": "^4.0.0", - "@npmcli/template-oss": "4.10.0", + "@npmcli/template-oss": "4.13.0", "cacache": "^17.0.0", - "mkdirp": "^1.0.4", "nock": "^13.2.4", "require-inject": "^1.4.4", - "rimraf": "^3.0.2", "ssri": "^10.0.0", "tap": "^16.0.1" }, @@ -63,6 +61,7 @@ }, "templateOSS": { "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", - "version": "4.10.0" + "version": "4.13.0", + "publish": "true" } } diff --git a/package-lock.json b/package-lock.json index 5dd0a5d417782..c42d4c87c80c0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -129,7 +129,7 @@ "npm-package-arg": "^10.1.0", "npm-pick-manifest": "^8.0.1", "npm-profile": "^7.0.1", - "npm-registry-fetch": "^14.0.3", + "npm-registry-fetch": "^14.0.4", "npm-user-validate": "^2.0.0", "npmlog": "^7.0.1", "p-map": "^4.0.0", @@ -9341,9 +9341,9 @@ } }, "node_modules/npm-registry-fetch": { - "version": "14.0.3", - "resolved": "https://registry.npmjs.org/npm-registry-fetch/-/npm-registry-fetch-14.0.3.tgz", - "integrity": "sha512-YaeRbVNpnWvsGOjX2wk5s85XJ7l1qQBGAp724h8e2CZFFhMSuw9enom7K1mWVUtvXO1uUSFIAPofQK0pPN0ZcA==", + "version": "14.0.4", + "resolved": "https://registry.npmjs.org/npm-registry-fetch/-/npm-registry-fetch-14.0.4.tgz", + "integrity": "sha512-pMS2DRkwg+M44ct65zrN/Cr9IHK1+n6weuefAo6Er4lc+/8YBCU0Czq04H3ZiSigluh7pb2rMM5JpgcytctB+Q==", "inBundle": true, "dependencies": { "make-fetch-happen": "^11.0.0", diff --git a/package.json b/package.json index 6cce6437003a4..5b839c379a3af 100644 --- a/package.json +++ b/package.json @@ -98,7 +98,7 @@ "npm-package-arg": "^10.1.0", "npm-pick-manifest": "^8.0.1", "npm-profile": "^7.0.1", - "npm-registry-fetch": "^14.0.3", + "npm-registry-fetch": "^14.0.4", "npm-user-validate": "^2.0.0", "npmlog": "^7.0.1", "p-map": "^4.0.0", diff --git a/tap-snapshots/test/lib/utils/error-message.js.test.cjs b/tap-snapshots/test/lib/utils/error-message.js.test.cjs index 35d7003853edb..7c155cb16687f 100644 --- a/tap-snapshots/test/lib/utils/error-message.js.test.cjs +++ b/tap-snapshots/test/lib/utils/error-message.js.test.cjs @@ -190,7 +190,7 @@ Object { "r", "g", "s", - "https://evil:***@npmjs.org", + "https://evil:***@npmjs.org/", ], Array [ "", diff --git a/test/lib/cli.js b/test/lib/cli.js index 28640a226065e..cafd13feabe93 100644 --- a/test/lib/cli.js +++ b/test/lib/cli.js @@ -98,7 +98,7 @@ t.test('logged argv is sanitized with equals', async t => { }) await cli(process) - t.match(logsBy('argv'), [['"version" "--registry" "https://u:***@npmjs.org"']]) + t.match(logsBy('argv'), [['"version" "--registry" "https://u:***@npmjs.org/"']]) }) t.test('print usage if no params provided', async t => { diff --git a/test/lib/utils/exit-handler.js b/test/lib/utils/exit-handler.js index 969bd05a98cea..8942d90922597 100644 --- a/test/lib/utils/exit-handler.js +++ b/test/lib/utils/exit-handler.js @@ -549,7 +549,7 @@ t.test('uses all err special properties', async t => { t.test('verbose logs replace info on err props', async t => { const { exitHandler, logs } = await mockExitHandler(t) - const keys = ['type', 'stack', 'statusCode', 'pkgid'] + const keys = ['type', 'stack', 'pkgid'] const properties = keys.reduce((acc, k) => { acc[k] = `${k}-https://user:pass@registry.npmjs.org/` return acc diff --git a/test/lib/utils/replace-info.js b/test/lib/utils/replace-info.js index c7fffdb544096..c1e77e943b491 100644 --- a/test/lib/utils/replace-info.js +++ b/test/lib/utils/replace-info.js @@ -57,7 +57,7 @@ t.equal( t.equal( replaceInfo('https://user:pass@registry.npmjs.org/ http://a:b@reg.github.com'), - 'https://user:***@registry.npmjs.org/ http://a:***@reg.github.com', + 'https://user:***@registry.npmjs.org/ http://a:***@reg.github.com/', 'should replace multiple items on a string' ) @@ -81,7 +81,7 @@ t.same( ]), [ 'Something https://user:***@registry.npmjs.org/ foo bar', - 'http://foo:***@registry.npmjs.org', + 'http://foo:***@registry.npmjs.org/', 'http://example.npmjs.org', ], 'should replace items in an array' @@ -95,7 +95,7 @@ t.same( ]), [ 'Something --x=https://user:***@registry.npmjs.org/ foo bar', - '--url=http://foo:***@registry.npmjs.org', + '--url=http://foo:***@registry.npmjs.org/', '--url=http://example.npmjs.org', ], 'should replace items in an array with equals'