@npmcli/arborist 7.4.0 → 7.4.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -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,
package/lib/place-dep.js CHANGED
@@ -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
@@ -257,7 +257,12 @@ class Results {
257
257
  for (const edge of node.edgesOut.values()) {
258
258
  if (edge.missing) {
259
259
  const pkg = { name: edge.name, version: edge.spec }
260
- res.push(new this.#targetNode.constructor({ pkg }))
260
+ const item = new this.#targetNode.constructor({ pkg })
261
+ item.queryContext = {
262
+ missing: true,
263
+ }
264
+ item.edgesIn = new Set([edge])
265
+ res.push(item)
261
266
  }
262
267
  }
263
268
  return res
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@npmcli/arborist",
3
- "version": "7.4.0",
3
+ "version": "7.4.2",
4
4
  "description": "Manage node_modules trees",
5
5
  "dependencies": {
6
6
  "@isaacs/string-locale-compare": "^1.1.0",
@@ -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",
@@ -19,12 +20,12 @@
19
20
  "hosted-git-info": "^7.0.1",
20
21
  "json-parse-even-better-errors": "^3.0.0",
21
22
  "json-stringify-nice": "^1.1.4",
22
- "minimatch": "^9.0.0",
23
+ "minimatch": "^9.0.4",
23
24
  "nopt": "^7.0.0",
24
25
  "npm-install-checks": "^6.2.0",
25
26
  "npm-package-arg": "^11.0.1",
26
27
  "npm-pick-manifest": "^9.0.0",
27
- "npm-registry-fetch": "^16.0.0",
28
+ "npm-registry-fetch": "^16.2.0",
28
29
  "npmlog": "^7.0.1",
29
30
  "pacote": "^17.0.4",
30
31
  "parse-conflict-json": "^3.0.0",