A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/npm/cli/commit/ef381b1449c99e174437665aa767e7a9b60edf22 below:

use @npmcli/redact for url cleaning (#7363) · npm/cli@ef381b1 · GitHub

File tree Expand file treeCollapse file tree 7 files changed

+12

-7

lines changed

Filter options

Expand file treeCollapse file tree 7 files changed

+12

-7

lines changed Original file line number Diff line number Diff line change

@@ -177,6 +177,7 @@ graph LR;

177 177

npmcli-arborist-->npmcli-node-gyp["@npmcli/node-gyp"];

178 178

npmcli-arborist-->npmcli-package-json["@npmcli/package-json"];

179 179

npmcli-arborist-->npmcli-query["@npmcli/query"];

180 +

npmcli-arborist-->npmcli-redact["@npmcli/redact"];

180 181

npmcli-arborist-->npmcli-run-script["@npmcli/run-script"];

181 182

npmcli-arborist-->npmcli-template-oss["@npmcli/template-oss"];

182 183

npmcli-arborist-->npmlog;

@@ -623,6 +624,7 @@ graph LR;

623 624

npmcli-arborist-->npmcli-node-gyp["@npmcli/node-gyp"];

624 625

npmcli-arborist-->npmcli-package-json["@npmcli/package-json"];

625 626

npmcli-arborist-->npmcli-query["@npmcli/query"];

627 +

npmcli-arborist-->npmcli-redact["@npmcli/redact"];

626 628

npmcli-arborist-->npmcli-run-script["@npmcli/run-script"];

627 629

npmcli-arborist-->npmcli-template-oss["@npmcli/template-oss"];

628 630

npmcli-arborist-->npmlog;

Original file line number Diff line number Diff line change

@@ -5,6 +5,7 @@ const log = require('../utils/log-shim')

5 5

const otplease = require('../utils/otplease.js')

6 6

const pkgJson = require('@npmcli/package-json')

7 7

const BaseCommand = require('../base-command.js')

8 +

const { redact } = require('@npmcli/redact')

8 9 9 10

const readJson = async (path) => {

10 11

try {

@@ -119,7 +120,7 @@ class Owner extends BaseCommand {

119 120

this.npm.output(maintainers.map(m => `${m.name} <${m.email}>`).join('\n'))

120 121

}

121 122

} catch (err) {

122 -

log.error('owner ls', "Couldn't get owner data", npmFetch.cleanUrl(pkg))

123 +

log.error('owner ls', "Couldn't get owner data", redact(pkg))

123 124

throw err

124 125

}

125 126

}

Original file line number Diff line number Diff line change

@@ -1,4 +1,4 @@

1 -

const { cleanUrl } = require('npm-registry-fetch')

1 +

const { redact } = require('@npmcli/redact')

2 2

const log = require('../utils/log-shim')

3 3

const pingUtil = require('../utils/ping.js')

4 4

const BaseCommand = require('../base-command.js')

@@ -9,7 +9,7 @@ class Ping extends BaseCommand {

9 9

static name = 'ping'

10 10 11 11

async exec (args) {

12 -

const cleanRegistry = cleanUrl(this.npm.config.get('registry'))

12 +

const cleanRegistry = redact(this.npm.config.get('registry'))

13 13

log.notice('PING', cleanRegistry)

14 14

const start = Date.now()

15 15

const details = await pingUtil({ ...this.npm.flatOptions })

Original file line number Diff line number Diff line change

@@ -16130,6 +16130,7 @@

16130 16130

"@npmcli/node-gyp": "^3.0.0",

16131 16131

"@npmcli/package-json": "^5.0.0",

16132 16132

"@npmcli/query": "^3.1.0",

16133 +

"@npmcli/redact": "^1.1.0",

16133 16134

"@npmcli/run-script": "^7.0.2",

16134 16135

"bin-links": "^4.0.1",

16135 16136

"cacache": "^18.0.0",

Original file line number Diff line number Diff line change

@@ -12,7 +12,7 @@ const { readdirScoped } = require('@npmcli/fs')

12 12

const { lstat, readlink } = require('fs/promises')

13 13

const { depth } = require('treeverse')

14 14

const log = require('proc-log')

15 -

const { cleanUrl } = require('npm-registry-fetch')

15 +

const { redact } = require('@npmcli/redact')

16 16 17 17

const {

18 18

OK,

@@ -1213,7 +1213,7 @@ This is a one-time fix-up, please be patient...

1213 1213

if (this.#manifests.has(spec.raw)) {

1214 1214

return this.#manifests.get(spec.raw)

1215 1215

} else {

1216 -

const cleanRawSpec = cleanUrl(spec.rawSpec)

1216 +

const cleanRawSpec = redact(spec.rawSpec)

1217 1217

log.silly('fetch manifest', spec.raw.replace(spec.rawSpec, cleanRawSpec))

1218 1218

const o = {

1219 1219

...options,

Original file line number Diff line number Diff line change

@@ -9,7 +9,7 @@

9 9 10 10

const localeCompare = require('@isaacs/string-locale-compare')('en')

11 11

const log = require('proc-log')

12 -

const { cleanUrl } = require('npm-registry-fetch')

12 +

const { redact } = require('@npmcli/redact')

13 13

const deepestNestingTarget = require('./deepest-nesting-target.js')

14 14

const CanPlaceDep = require('./can-place-dep.js')

15 15

const {

@@ -188,7 +188,7 @@ class PlaceDep {

188 188

`${this.dep.name}@${this.dep.version}`,

189 189

this.canPlace.description,

190 190

`for: ${this.edge.from.package._id || this.edge.from.location}`,

191 -

`want: ${cleanUrl(this.edge.spec || '*')}`

191 +

`want: ${redact(this.edge.spec || '*')}`

192 192

)

193 193 194 194

const placementType = this.canPlace.canPlace === CONFLICT

Original file line number Diff line number Diff line change

@@ -12,6 +12,7 @@

12 12

"@npmcli/node-gyp": "^3.0.0",

13 13

"@npmcli/package-json": "^5.0.0",

14 14

"@npmcli/query": "^3.1.0",

15 +

"@npmcli/redact": "^1.1.0",

15 16

"@npmcli/run-script": "^7.0.2",

16 17

"bin-links": "^4.0.1",

17 18

"cacache": "^18.0.0",

You can’t perform that action at this time.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4