Skip to content

Commit 7563a94

Browse files
committed
chore: manually hoist latest versions of some of our deps
I manually installed `@npmcli/fs` and `minipass-fetch` to the root of our the dependency tree so that the deduped version would now live at the root of `node_modules/` and any conflicting versions would be deduped inside of its nested parent `node_modules/` directory. Once this was locked in `package-lock.json` removing them from the `package.json` does not undo the hoisting and deduping. This has no effect on the resolved versions bundled with `npm` but it does make it easier to visually scan the output of `query` commands to be sure we are not inadvertently deduping dependencies in the future.
1 parent 6a27a7b commit 7563a94

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+117
-1734
lines changed

node_modules/.gitignore

+2-11
Original file line numberDiff line numberDiff line change
@@ -55,11 +55,6 @@
5555
!/brace-expansion
5656
!/builtins
5757
!/cacache
58-
!/cacache/node_modules/
59-
/cacache/node_modules/*
60-
!/cacache/node_modules/@npmcli/
61-
/cacache/node_modules/@npmcli/*
62-
!/cacache/node_modules/@npmcli/fs
6358
!/chalk
6459
!/chownr
6560
!/cidr-regex
@@ -142,9 +137,6 @@
142137
!/libnpmversion
143138
!/lru-cache
144139
!/make-fetch-happen
145-
!/make-fetch-happen/node_modules/
146-
/make-fetch-happen/node_modules/*
147-
!/make-fetch-happen/node_modules/minipass-fetch
148140
!/minimatch
149141
!/minipass-collect
150142
!/minipass-fetch
@@ -163,6 +155,7 @@
163155
/node-gyp/node_modules/*
164156
!/node-gyp/node_modules/@npmcli/
165157
/node-gyp/node_modules/@npmcli/*
158+
!/node-gyp/node_modules/@npmcli/fs
166159
!/node-gyp/node_modules/@npmcli/move-file
167160
!/node-gyp/node_modules/are-we-there-yet
168161
!/node-gyp/node_modules/brace-expansion
@@ -176,6 +169,7 @@
176169
!/node-gyp/node_modules/glob
177170
!/node-gyp/node_modules/make-fetch-happen
178171
!/node-gyp/node_modules/minimatch
172+
!/node-gyp/node_modules/minipass-fetch
179173
!/node-gyp/node_modules/nopt
180174
!/node-gyp/node_modules/npmlog
181175
!/node-gyp/node_modules/ssri
@@ -192,9 +186,6 @@
192186
!/npm-pick-manifest
193187
!/npm-profile
194188
!/npm-registry-fetch
195-
!/npm-registry-fetch/node_modules/
196-
/npm-registry-fetch/node_modules/*
197-
!/npm-registry-fetch/node_modules/minipass-fetch
198189
!/npm-user-validate
199190
!/npmlog
200191
!/once
File renamed without changes.

node_modules/@npmcli/fs/lib/cp/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
const fs = require('../fs.js')
1+
const fs = require('fs/promises')
22
const getOptions = require('../common/get-options.js')
33
const node = require('../common/node.js')
44
const polyfill = require('./polyfill.js')

node_modules/@npmcli/fs/lib/cp/polyfill.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ const {
2323
ERR_FS_CP_UNKNOWN,
2424
ERR_FS_EISDIR,
2525
ERR_INVALID_ARG_TYPE,
26-
} = require('../errors.js')
26+
} = require('./errors.js')
2727
const {
2828
constants: {
2929
errno: {
@@ -45,7 +45,7 @@ const {
4545
symlink,
4646
unlink,
4747
utimes,
48-
} = require('../fs.js')
48+
} = require('fs/promises')
4949
const {
5050
dirname,
5151
isAbsolute,

node_modules/@npmcli/fs/lib/index.js

+7-10
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,9 @@
1+
'use strict'
2+
3+
const cp = require('./cp/index.js')
4+
const withTempDir = require('./with-temp-dir.js')
5+
16
module.exports = {
2-
...require('./fs.js'),
3-
copyFile: require('./copy-file.js'),
4-
cp: require('./cp/index.js'),
5-
mkdir: require('./mkdir.js'),
6-
mkdtemp: require('./mkdtemp.js'),
7-
rm: require('./rm/index.js'),
8-
withTempDir: require('./with-temp-dir.js'),
9-
withOwner: require('./with-owner.js'),
10-
withOwnerSync: require('./with-owner-sync.js'),
11-
writeFile: require('./write-file.js'),
7+
cp,
8+
withTempDir,
129
}

node_modules/@npmcli/fs/lib/with-temp-dir.js

+4-6
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
const { join, sep } = require('path')
22

33
const getOptions = require('./common/get-options.js')
4-
const mkdir = require('./mkdir.js')
5-
const mkdtemp = require('./mkdtemp.js')
6-
const rm = require('./rm/index.js')
4+
const { mkdir, mkdtemp, rm } = require('fs/promises')
75

86
// create a temp directory, ensure its permissions match its parent, then call
97
// the supplied function passing it the path to the directory. clean up after
@@ -12,10 +10,10 @@ const withTempDir = async (root, fn, opts) => {
1210
const options = getOptions(opts, {
1311
copy: ['tmpPrefix'],
1412
})
15-
// create the directory, and fix its ownership
16-
await mkdir(root, { recursive: true, owner: 'inherit' })
13+
// create the directory
14+
await mkdir(root, { recursive: true })
1715

18-
const target = await mkdtemp(join(`${root}${sep}`, options.tmpPrefix || ''), { owner: 'inherit' })
16+
const target = await mkdtemp(join(`${root}${sep}`, options.tmpPrefix || ''))
1917
let err
2018
let result
2119

node_modules/@npmcli/fs/package.json

+10-8
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,13 @@
11
{
22
"name": "@npmcli/fs",
3-
"version": "2.1.2",
3+
"version": "3.0.0",
44
"description": "filesystem utilities for the npm cli",
55
"main": "lib/index.js",
66
"files": [
77
"bin/",
88
"lib/"
99
],
1010
"scripts": {
11-
"preversion": "npm test",
12-
"postversion": "npm publish",
13-
"prepublishOnly": "git push origin --follow-tags",
1411
"snap": "tap",
1512
"test": "tap",
1613
"npmclilint": "npmcli-lint",
@@ -33,18 +30,23 @@
3330
"license": "ISC",
3431
"devDependencies": {
3532
"@npmcli/eslint-config": "^3.0.1",
36-
"@npmcli/template-oss": "3.5.0",
33+
"@npmcli/template-oss": "4.5.1",
3734
"tap": "^16.0.1"
3835
},
3936
"dependencies": {
40-
"@gar/promisify": "^1.1.3",
4137
"semver": "^7.3.5"
4238
},
4339
"engines": {
44-
"node": "^12.13.0 || ^14.15.0 || >=16.0.0"
40+
"node": "^14.17.0 || ^16.13.0 || >=18.0.0"
4541
},
4642
"templateOSS": {
4743
"//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.",
48-
"version": "3.5.0"
44+
"version": "4.5.1"
45+
},
46+
"tap": {
47+
"nyc-arg": [
48+
"--exclude",
49+
"tap-snapshots/**"
50+
]
4951
}
5052
}

node_modules/cacache/node_modules/@npmcli/fs/lib/index.js

-9
This file was deleted.

node_modules/minipass-fetch/lib/body.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,8 @@ class Body {
7272
}
7373

7474
async json () {
75+
const buf = await this[CONSUME_BODY]()
7576
try {
76-
const buf = await this[CONSUME_BODY]()
7777
return JSON.parse(buf.toString())
7878
} catch (er) {
7979
throw new FetchError(

node_modules/minipass-fetch/package.json

+10-10
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,29 @@
11
{
22
"name": "minipass-fetch",
3-
"version": "2.1.1",
3+
"version": "3.0.0",
44
"description": "An implementation of window.fetch in Node.js using Minipass streams",
55
"license": "MIT",
66
"main": "lib/index.js",
77
"scripts": {
88
"test": "tap",
99
"snap": "tap",
10-
"preversion": "npm test",
11-
"postversion": "npm publish",
12-
"postpublish": "git push origin --follow-tags",
1310
"lint": "eslint \"**/*.js\"",
1411
"postlint": "template-oss-check",
1512
"lintfix": "npm run lint -- --fix",
16-
"prepublishOnly": "git push origin --follow-tags",
1713
"posttest": "npm run lint",
1814
"template-oss-apply": "template-oss-apply --force"
1915
},
2016
"tap": {
2117
"coverage-map": "map.js",
22-
"check-coverage": true
18+
"check-coverage": true,
19+
"nyc-arg": [
20+
"--exclude",
21+
"tap-snapshots/**"
22+
]
2323
},
2424
"devDependencies": {
25-
"@npmcli/eslint-config": "^3.0.1",
26-
"@npmcli/template-oss": "3.5.0",
25+
"@npmcli/eslint-config": "^3.1.0",
26+
"@npmcli/template-oss": "4.5.1",
2727
"@ungap/url-search-params": "^0.2.2",
2828
"abort-controller": "^3.0.0",
2929
"abortcontroller-polyfill": "~1.7.3",
@@ -57,11 +57,11 @@
5757
"lib/"
5858
],
5959
"engines": {
60-
"node": "^12.13.0 || ^14.15.0 || >=16.0.0"
60+
"node": "^14.17.0 || ^16.13.0 || >=18.0.0"
6161
},
6262
"author": "GitHub Inc.",
6363
"templateOSS": {
6464
"//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.",
65-
"version": "3.5.0"
65+
"version": "4.5.1"
6666
}
6767
}

node_modules/cacache/node_modules/@npmcli/fs/lib/cp/index.js node_modules/node-gyp/node_modules/@npmcli/fs/lib/cp/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
const fs = require('fs/promises')
1+
const fs = require('../fs.js')
22
const getOptions = require('../common/get-options.js')
33
const node = require('../common/node.js')
44
const polyfill = require('./polyfill.js')

node_modules/cacache/node_modules/@npmcli/fs/lib/cp/polyfill.js node_modules/node-gyp/node_modules/@npmcli/fs/lib/cp/polyfill.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ const {
2323
ERR_FS_CP_UNKNOWN,
2424
ERR_FS_EISDIR,
2525
ERR_INVALID_ARG_TYPE,
26-
} = require('./errors.js')
26+
} = require('../errors.js')
2727
const {
2828
constants: {
2929
errno: {
@@ -45,7 +45,7 @@ const {
4545
symlink,
4646
unlink,
4747
utimes,
48-
} = require('fs/promises')
48+
} = require('../fs.js')
4949
const {
5050
dirname,
5151
isAbsolute,
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
module.exports = {
2+
...require('./fs.js'),
3+
copyFile: require('./copy-file.js'),
4+
cp: require('./cp/index.js'),
5+
mkdir: require('./mkdir.js'),
6+
mkdtemp: require('./mkdtemp.js'),
7+
rm: require('./rm/index.js'),
8+
withTempDir: require('./with-temp-dir.js'),
9+
withOwner: require('./with-owner.js'),
10+
withOwnerSync: require('./with-owner-sync.js'),
11+
writeFile: require('./write-file.js'),
12+
}

node_modules/cacache/node_modules/@npmcli/fs/lib/with-temp-dir.js node_modules/node-gyp/node_modules/@npmcli/fs/lib/with-temp-dir.js

+6-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
const { join, sep } = require('path')
22

33
const getOptions = require('./common/get-options.js')
4-
const { mkdir, mkdtemp, rm } = require('fs/promises')
4+
const mkdir = require('./mkdir.js')
5+
const mkdtemp = require('./mkdtemp.js')
6+
const rm = require('./rm/index.js')
57

68
// create a temp directory, ensure its permissions match its parent, then call
79
// the supplied function passing it the path to the directory. clean up after
@@ -10,10 +12,10 @@ const withTempDir = async (root, fn, opts) => {
1012
const options = getOptions(opts, {
1113
copy: ['tmpPrefix'],
1214
})
13-
// create the directory
14-
await mkdir(root, { recursive: true })
15+
// create the directory, and fix its ownership
16+
await mkdir(root, { recursive: true, owner: 'inherit' })
1517

16-
const target = await mkdtemp(join(`${root}${sep}`, options.tmpPrefix || ''))
18+
const target = await mkdtemp(join(`${root}${sep}`, options.tmpPrefix || ''), { owner: 'inherit' })
1719
let err
1820
let result
1921

node_modules/cacache/node_modules/@npmcli/fs/package.json node_modules/node-gyp/node_modules/@npmcli/fs/package.json

+8-10
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,16 @@
11
{
22
"name": "@npmcli/fs",
3-
"version": "3.0.0",
3+
"version": "2.1.2",
44
"description": "filesystem utilities for the npm cli",
55
"main": "lib/index.js",
66
"files": [
77
"bin/",
88
"lib/"
99
],
1010
"scripts": {
11+
"preversion": "npm test",
12+
"postversion": "npm publish",
13+
"prepublishOnly": "git push origin --follow-tags",
1114
"snap": "tap",
1215
"test": "tap",
1316
"npmclilint": "npmcli-lint",
@@ -30,23 +33,18 @@
3033
"license": "ISC",
3134
"devDependencies": {
3235
"@npmcli/eslint-config": "^3.0.1",
33-
"@npmcli/template-oss": "4.5.1",
36+
"@npmcli/template-oss": "3.5.0",
3437
"tap": "^16.0.1"
3538
},
3639
"dependencies": {
40+
"@gar/promisify": "^1.1.3",
3741
"semver": "^7.3.5"
3842
},
3943
"engines": {
40-
"node": "^14.17.0 || ^16.13.0 || >=18.0.0"
44+
"node": "^12.13.0 || ^14.15.0 || >=16.0.0"
4145
},
4246
"templateOSS": {
4347
"//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.",
44-
"version": "4.5.1"
45-
},
46-
"tap": {
47-
"nyc-arg": [
48-
"--exclude",
49-
"tap-snapshots/**"
50-
]
48+
"version": "3.5.0"
5149
}
5250
}

node_modules/make-fetch-happen/node_modules/minipass-fetch/package.json node_modules/node-gyp/node_modules/minipass-fetch/package.json

+10-10
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,29 @@
11
{
22
"name": "minipass-fetch",
3-
"version": "3.0.0",
3+
"version": "2.1.2",
44
"description": "An implementation of window.fetch in Node.js using Minipass streams",
55
"license": "MIT",
66
"main": "lib/index.js",
77
"scripts": {
88
"test": "tap",
99
"snap": "tap",
10+
"preversion": "npm test",
11+
"postversion": "npm publish",
12+
"postpublish": "git push origin --follow-tags",
1013
"lint": "eslint \"**/*.js\"",
1114
"postlint": "template-oss-check",
1215
"lintfix": "npm run lint -- --fix",
16+
"prepublishOnly": "git push origin --follow-tags",
1317
"posttest": "npm run lint",
1418
"template-oss-apply": "template-oss-apply --force"
1519
},
1620
"tap": {
1721
"coverage-map": "map.js",
18-
"check-coverage": true,
19-
"nyc-arg": [
20-
"--exclude",
21-
"tap-snapshots/**"
22-
]
22+
"check-coverage": true
2323
},
2424
"devDependencies": {
25-
"@npmcli/eslint-config": "^3.1.0",
26-
"@npmcli/template-oss": "4.5.1",
25+
"@npmcli/eslint-config": "^3.0.1",
26+
"@npmcli/template-oss": "3.5.0",
2727
"@ungap/url-search-params": "^0.2.2",
2828
"abort-controller": "^3.0.0",
2929
"abortcontroller-polyfill": "~1.7.3",
@@ -57,11 +57,11 @@
5757
"lib/"
5858
],
5959
"engines": {
60-
"node": "^14.17.0 || ^16.13.0 || >=18.0.0"
60+
"node": "^12.13.0 || ^14.15.0 || >=16.0.0"
6161
},
6262
"author": "GitHub Inc.",
6363
"templateOSS": {
6464
"//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.",
65-
"version": "4.5.1"
65+
"version": "3.5.0"
6666
}
6767
}

0 commit comments

Comments
 (0)