@npmcli/arborist 5.0.4 → 5.0.5

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.
package/README.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # @npmcli/arborist
2
2
 
3
+ [![npm version](https://img.shields.io/npm/v/@npmcli/arborist.svg)](https://npm.im/@npmcli/arborist)
4
+ [![license](https://img.shields.io/npm/l/@npmcli/arborist.svg)](https://npm.im/@npmcli/arborist)
5
+ [![CI - @npmcli/arborist](https://github.com/npm/cli/actions/workflows/ci-npmcli-arborist.yml/badge.svg)](https://github.com/npm/cli/actions/workflows/ci-npmcli-arborist.yml)
6
+
3
7
  Inspect and manage `node_modules` trees.
4
8
 
5
9
  ![a tree with the word ARBORIST superimposed on it](https://raw.githubusercontent.com/npm/arborist/main/docs/logo.svg?sanitize=true)
@@ -7,7 +7,7 @@ const pathSafeHash = s =>
7
7
  .update(s)
8
8
  .digest('base64')
9
9
  .replace(/[^a-zA-Z0-9]+/g, '')
10
- .substr(0, 8)
10
+ .slice(0, 8)
11
11
 
12
12
  const retirePath = from => {
13
13
  const d = dirname(from)
package/lib/shrinkwrap.js CHANGED
@@ -807,7 +807,7 @@ class Shrinkwrap {
807
807
  const pathFixed = !resolved ? null
808
808
  : !/^file:/.test(resolved) ? resolved
809
809
  // resolve onto the metadata path
810
- : `file:${resolve(this.path, resolved.substr(5))}`
810
+ : `file:${resolve(this.path, resolved.slice(5))}`
811
811
 
812
812
  // if we have one, only set the other if it matches
813
813
  // otherwise it could be for a completely different thing.
@@ -1056,7 +1056,7 @@ class Shrinkwrap {
1056
1056
  // turn absolute file: paths into relative paths from the node
1057
1057
  // this especially shows up with workspace edges when the root
1058
1058
  // node is also a workspace in the set.
1059
- const p = resolve(node.realpath, spec.substr('file:'.length))
1059
+ const p = resolve(node.realpath, spec.slice('file:'.length))
1060
1060
  set[k] = `file:${relpath(node.realpath, p)}`
1061
1061
  } else {
1062
1062
  set[k] = spec
@@ -16,7 +16,7 @@ module.exports = (name, tgz) => {
16
16
  // basename checking. Note that registries can
17
17
  // be mounted below the root url, so /a/b/-/x/y/foo/-/foo-1.2.3.tgz
18
18
  // is a potential option.
19
- const tfsplit = u.path.substr(1).split('/-/')
19
+ const tfsplit = u.path.slice(1).split('/-/')
20
20
  if (tfsplit.length > 1) {
21
21
  const afterTF = tfsplit.pop()
22
22
  if (afterTF === base) {
package/package.json CHANGED
@@ -1,16 +1,16 @@
1
1
  {
2
2
  "name": "@npmcli/arborist",
3
- "version": "5.0.4",
3
+ "version": "5.0.5",
4
4
  "description": "Manage node_modules trees",
5
5
  "dependencies": {
6
6
  "@isaacs/string-locale-compare": "^1.1.0",
7
7
  "@npmcli/installed-package-contents": "^1.0.7",
8
8
  "@npmcli/map-workspaces": "^2.0.0",
9
9
  "@npmcli/metavuln-calculator": "^3.0.1",
10
- "@npmcli/move-file": "^1.1.0",
10
+ "@npmcli/move-file": "^2.0.0",
11
11
  "@npmcli/name-from-folder": "^1.0.1",
12
- "@npmcli/node-gyp": "^1.0.3",
13
- "@npmcli/package-json": "^1.0.1",
12
+ "@npmcli/node-gyp": "^2.0.0",
13
+ "@npmcli/package-json": "^2.0.0",
14
14
  "@npmcli/run-script": "^3.0.0",
15
15
  "bin-links": "^3.0.0",
16
16
  "cacache": "^16.0.0",
@@ -20,7 +20,7 @@
20
20
  "mkdirp": "^1.0.4",
21
21
  "mkdirp-infer-owner": "^2.0.0",
22
22
  "nopt": "^5.0.0",
23
- "npm-install-checks": "^4.0.0",
23
+ "npm-install-checks": "^5.0.0",
24
24
  "npm-package-arg": "^9.0.0",
25
25
  "npm-pick-manifest": "^7.0.0",
26
26
  "npm-registry-fetch": "^13.0.0",
@@ -34,18 +34,18 @@
34
34
  "readdir-scoped-modules": "^1.1.0",
35
35
  "rimraf": "^3.0.2",
36
36
  "semver": "^7.3.5",
37
- "ssri": "^8.0.1",
38
- "treeverse": "^1.0.4",
37
+ "ssri": "^9.0.0",
38
+ "treeverse": "^2.0.0",
39
39
  "walk-up-path": "^1.0.0"
40
40
  },
41
41
  "devDependencies": {
42
42
  "@npmcli/eslint-config": "^3.0.1",
43
- "@npmcli/template-oss": "3.2.2",
43
+ "@npmcli/template-oss": "3.3.2",
44
44
  "benchmark": "^2.1.4",
45
45
  "chalk": "^4.1.0",
46
46
  "minify-registry-metadata": "^2.1.0",
47
47
  "nock": "^13.2.0",
48
- "tap": "^15.1.2",
48
+ "tap": "^16.0.1",
49
49
  "tcompare": "^5.0.6"
50
50
  },
51
51
  "scripts": {
@@ -101,6 +101,6 @@
101
101
  },
102
102
  "templateOSS": {
103
103
  "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.",
104
- "version": "3.2.2"
104
+ "version": "3.3.2"
105
105
  }
106
106
  }