Skip to content

Commit 092f41f

Browse files
committed
deps: update [email protected]
1 parent 50a7bc8 commit 092f41f

File tree

29 files changed

+609
-102
lines changed

29 files changed

+609
-102
lines changed

node_modules/.gitignore

+7-5
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,11 @@
2424
!/@npmcli/git/node_modules/@npmcli/
2525
/@npmcli/git/node_modules/@npmcli/*
2626
!/@npmcli/git/node_modules/@npmcli/promise-spawn
27+
!/@npmcli/git/node_modules/hosted-git-info
2728
!/@npmcli/git/node_modules/ini
29+
!/@npmcli/git/node_modules/npm-install-checks
30+
!/@npmcli/git/node_modules/npm-package-arg
31+
!/@npmcli/git/node_modules/npm-pick-manifest
2832
!/@npmcli/installed-package-contents
2933
!/@npmcli/map-workspaces
3034
!/@npmcli/map-workspaces/node_modules/
@@ -51,8 +55,6 @@
5155
/@npmcli/package-json/node_modules/@npmcli/*
5256
!/@npmcli/package-json/node_modules/@npmcli/git
5357
!/@npmcli/package-json/node_modules/isexe
54-
!/@npmcli/package-json/node_modules/npm-normalize-package-bin
55-
!/@npmcli/package-json/node_modules/npm-pick-manifest
5658
!/@npmcli/package-json/node_modules/proc-log
5759
!/@npmcli/package-json/node_modules/which
5860
!/@npmcli/promise-spawn
@@ -239,9 +241,7 @@
239241
!/npm-pick-manifest
240242
!/npm-pick-manifest/node_modules/
241243
/npm-pick-manifest/node_modules/*
242-
!/npm-pick-manifest/node_modules/hosted-git-info
243-
!/npm-pick-manifest/node_modules/npm-install-checks
244-
!/npm-pick-manifest/node_modules/npm-package-arg
244+
!/npm-pick-manifest/node_modules/npm-normalize-package-bin
245245
!/npm-profile
246246
!/npm-registry-fetch
247247
!/npm-registry-fetch/node_modules/
@@ -273,7 +273,9 @@
273273
!/pacote/node_modules/hosted-git-info
274274
!/pacote/node_modules/json-parse-even-better-errors
275275
!/pacote/node_modules/normalize-package-data
276+
!/pacote/node_modules/npm-install-checks
276277
!/pacote/node_modules/npm-package-arg
278+
!/pacote/node_modules/npm-pick-manifest
277279
!/pacote/node_modules/unique-filename
278280
!/pacote/node_modules/unique-slug
279281
!/parse-conflict-json
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "npm-pick-manifest",
3-
"version": "10.0.0",
3+
"version": "9.1.0",
44
"description": "Resolves a matching manifest from a package metadata document according to standard npm semver resolution rules.",
55
"main": "./lib",
66
"files": [
@@ -9,14 +9,13 @@
99
],
1010
"scripts": {
1111
"coverage": "tap",
12-
"lint": "npm run eslint",
12+
"lint": "eslint \"**/*.{js,cjs,ts,mjs,jsx,tsx}\"",
1313
"test": "tap",
1414
"posttest": "npm run lint",
1515
"postlint": "template-oss-check",
16-
"lintfix": "npm run eslint -- --fix",
16+
"lintfix": "npm run lint -- --fix",
1717
"snap": "tap",
18-
"template-oss-apply": "template-oss-apply --force",
19-
"eslint": "eslint \"**/*.{js,cjs,ts,mjs,jsx,tsx}\""
18+
"template-oss-apply": "template-oss-apply --force"
2019
},
2120
"repository": {
2221
"type": "git",
@@ -30,14 +29,14 @@
3029
"author": "GitHub Inc.",
3130
"license": "ISC",
3231
"dependencies": {
33-
"npm-install-checks": "^7.1.0",
34-
"npm-normalize-package-bin": "^4.0.0",
35-
"npm-package-arg": "^12.0.0",
32+
"npm-install-checks": "^6.0.0",
33+
"npm-normalize-package-bin": "^3.0.0",
34+
"npm-package-arg": "^11.0.0",
3635
"semver": "^7.3.5"
3736
},
3837
"devDependencies": {
39-
"@npmcli/eslint-config": "^5.0.0",
40-
"@npmcli/template-oss": "4.23.3",
38+
"@npmcli/eslint-config": "^4.0.0",
39+
"@npmcli/template-oss": "4.22.0",
4140
"tap": "^16.0.1"
4241
},
4342
"tap": {
@@ -48,11 +47,11 @@
4847
]
4948
},
5049
"engines": {
51-
"node": "^18.17.0 || >=20.5.0"
50+
"node": "^16.14.0 || >=18.0.0"
5251
},
5352
"templateOSS": {
5453
"//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.",
55-
"version": "4.23.3",
54+
"version": "4.22.0",
5655
"publish": true
5756
}
5857
}
+12-11
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "npm-pick-manifest",
3-
"version": "9.1.0",
3+
"version": "10.0.0",
44
"description": "Resolves a matching manifest from a package metadata document according to standard npm semver resolution rules.",
55
"main": "./lib",
66
"files": [
@@ -9,13 +9,14 @@
99
],
1010
"scripts": {
1111
"coverage": "tap",
12-
"lint": "eslint \"**/*.{js,cjs,ts,mjs,jsx,tsx}\"",
12+
"lint": "npm run eslint",
1313
"test": "tap",
1414
"posttest": "npm run lint",
1515
"postlint": "template-oss-check",
16-
"lintfix": "npm run lint -- --fix",
16+
"lintfix": "npm run eslint -- --fix",
1717
"snap": "tap",
18-
"template-oss-apply": "template-oss-apply --force"
18+
"template-oss-apply": "template-oss-apply --force",
19+
"eslint": "eslint \"**/*.{js,cjs,ts,mjs,jsx,tsx}\""
1920
},
2021
"repository": {
2122
"type": "git",
@@ -29,14 +30,14 @@
2930
"author": "GitHub Inc.",
3031
"license": "ISC",
3132
"dependencies": {
32-
"npm-install-checks": "^6.0.0",
33-
"npm-normalize-package-bin": "^3.0.0",
34-
"npm-package-arg": "^11.0.0",
33+
"npm-install-checks": "^7.1.0",
34+
"npm-normalize-package-bin": "^4.0.0",
35+
"npm-package-arg": "^12.0.0",
3536
"semver": "^7.3.5"
3637
},
3738
"devDependencies": {
38-
"@npmcli/eslint-config": "^4.0.0",
39-
"@npmcli/template-oss": "4.22.0",
39+
"@npmcli/eslint-config": "^5.0.0",
40+
"@npmcli/template-oss": "4.23.3",
4041
"tap": "^16.0.1"
4142
},
4243
"tap": {
@@ -47,11 +48,11 @@
4748
]
4849
},
4950
"engines": {
50-
"node": "^16.14.0 || >=18.0.0"
51+
"node": "^18.17.0 || >=20.5.0"
5152
},
5253
"templateOSS": {
5354
"//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.",
54-
"version": "4.22.0",
55+
"version": "4.23.3",
5556
"publish": true
5657
}
5758
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
Copyright (c) Robert Kowalski and Isaac Z. Schlueter ("Authors")
2+
All rights reserved.
3+
4+
The BSD License
5+
6+
Redistribution and use in source and binary forms, with or without
7+
modification, are permitted provided that the following conditions
8+
are met:
9+
10+
1. Redistributions of source code must retain the above copyright
11+
notice, this list of conditions and the following disclaimer.
12+
13+
2. Redistributions in binary form must reproduce the above copyright
14+
notice, this list of conditions and the following disclaimer in the
15+
documentation and/or other materials provided with the distribution.
16+
17+
THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND
18+
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
20+
PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS
21+
BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
22+
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
23+
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
24+
BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
25+
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
26+
OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
27+
IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
const semver = require('semver')
2+
3+
const checkEngine = (target, npmVer, nodeVer, force = false) => {
4+
const nodev = force ? null : nodeVer
5+
const eng = target.engines
6+
const opt = { includePrerelease: true }
7+
if (!eng) {
8+
return
9+
}
10+
11+
const nodeFail = nodev && eng.node && !semver.satisfies(nodev, eng.node, opt)
12+
const npmFail = npmVer && eng.npm && !semver.satisfies(npmVer, eng.npm, opt)
13+
if (nodeFail || npmFail) {
14+
throw Object.assign(new Error('Unsupported engine'), {
15+
pkgid: target._id,
16+
current: { node: nodeVer, npm: npmVer },
17+
required: eng,
18+
code: 'EBADENGINE',
19+
})
20+
}
21+
}
22+
23+
const isMusl = (file) => file.includes('libc.musl-') || file.includes('ld-musl-')
24+
25+
const checkPlatform = (target, force = false, environment = {}) => {
26+
if (force) {
27+
return
28+
}
29+
30+
const platform = environment.os || process.platform
31+
const arch = environment.cpu || process.arch
32+
const osOk = target.os ? checkList(platform, target.os) : true
33+
const cpuOk = target.cpu ? checkList(arch, target.cpu) : true
34+
35+
let libcOk = true
36+
let libcFamily = null
37+
if (target.libc) {
38+
// libc checks only work in linux, any value is a failure if we aren't
39+
if (environment.libc) {
40+
libcOk = checkList(environment.libc, target.libc)
41+
} else if (platform !== 'linux') {
42+
libcOk = false
43+
} else {
44+
const report = process.report.getReport()
45+
if (report.header?.glibcVersionRuntime) {
46+
libcFamily = 'glibc'
47+
} else if (Array.isArray(report.sharedObjects) && report.sharedObjects.some(isMusl)) {
48+
libcFamily = 'musl'
49+
}
50+
libcOk = libcFamily ? checkList(libcFamily, target.libc) : false
51+
}
52+
}
53+
54+
if (!osOk || !cpuOk || !libcOk) {
55+
throw Object.assign(new Error('Unsupported platform'), {
56+
pkgid: target._id,
57+
current: {
58+
os: platform,
59+
cpu: arch,
60+
libc: libcFamily,
61+
},
62+
required: {
63+
os: target.os,
64+
cpu: target.cpu,
65+
libc: target.libc,
66+
},
67+
code: 'EBADPLATFORM',
68+
})
69+
}
70+
}
71+
72+
const checkList = (value, list) => {
73+
if (typeof list === 'string') {
74+
list = [list]
75+
}
76+
if (list.length === 1 && list[0] === 'any') {
77+
return true
78+
}
79+
// match none of the negated values, and at least one of the
80+
// non-negated values, if any are present.
81+
let negated = 0
82+
let match = false
83+
for (const entry of list) {
84+
const negate = entry.charAt(0) === '!'
85+
const test = negate ? entry.slice(1) : entry
86+
if (negate) {
87+
negated++
88+
if (value === test) {
89+
return false
90+
}
91+
} else {
92+
match = match || value === test
93+
}
94+
}
95+
return match || negated === list.length
96+
}
97+
98+
module.exports = {
99+
checkEngine,
100+
checkPlatform,
101+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
{
2+
"name": "npm-install-checks",
3+
"version": "6.3.0",
4+
"description": "Check the engines and platform fields in package.json",
5+
"main": "lib/index.js",
6+
"dependencies": {
7+
"semver": "^7.1.1"
8+
},
9+
"devDependencies": {
10+
"@npmcli/eslint-config": "^4.0.0",
11+
"@npmcli/template-oss": "4.19.0",
12+
"tap": "^16.0.1"
13+
},
14+
"scripts": {
15+
"test": "tap",
16+
"lint": "eslint \"**/*.js\"",
17+
"postlint": "template-oss-check",
18+
"template-oss-apply": "template-oss-apply --force",
19+
"lintfix": "npm run lint -- --fix",
20+
"snap": "tap",
21+
"posttest": "npm run lint"
22+
},
23+
"repository": {
24+
"type": "git",
25+
"url": "https://github.com/npm/npm-install-checks.git"
26+
},
27+
"keywords": [
28+
"npm,",
29+
"install"
30+
],
31+
"license": "BSD-2-Clause",
32+
"files": [
33+
"bin/",
34+
"lib/"
35+
],
36+
"engines": {
37+
"node": "^14.17.0 || ^16.13.0 || >=18.0.0"
38+
},
39+
"author": "GitHub Inc.",
40+
"templateOSS": {
41+
"//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.",
42+
"version": "4.19.0",
43+
"publish": "true"
44+
},
45+
"tap": {
46+
"nyc-arg": [
47+
"--exclude",
48+
"tap-snapshots/**"
49+
]
50+
}
51+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
ISC License
2+
3+
Copyright (c) npm, Inc.
4+
5+
Permission to use, copy, modify, and/or distribute this software for
6+
any purpose with or without fee is hereby granted, provided that the
7+
above copyright notice and this permission notice appear in all copies.
8+
9+
THE SOFTWARE IS PROVIDED "AS IS" AND THE COPYRIGHT HOLDER DISCLAIMS
10+
ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
11+
WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
12+
COPYRIGHT HOLDER BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR
13+
CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
14+
OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
15+
OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE
16+
USE OR PERFORMANCE OF THIS SOFTWARE.

0 commit comments

Comments
 (0)