Skip to content

Commit ceae674

Browse files
committed
deps: @npmcli/package-json@7.0.1
1 parent 1eedf82 commit ceae674

File tree

148 files changed

+25840
-216
lines changed

Some content is hidden

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

148 files changed

+25840
-216
lines changed

DEPENDENCIES.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,6 @@
5858
"bin-links",
5959
"nopt",
6060
"parse-conflict-json",
61-
"read-package-json-fast",
6261
"@npmcli/mock-globals",
6362
"read",
6463
"normalize-package-data"

DEPENDENCIES.md

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ graph LR;
3838
libnpmexec-->npmcli-template-oss["@npmcli/template-oss"];
3939
libnpmexec-->pacote;
4040
libnpmexec-->proc-log;
41-
libnpmexec-->read-package-json-fast;
4241
libnpmexec-->read;
4342
libnpmexec-->semver;
4443
libnpmfund-->npmcli-arborist["@npmcli/arborist"];
@@ -178,7 +177,6 @@ graph LR;
178177
npmcli-arborist-->parse-conflict-json;
179178
npmcli-arborist-->proc-log;
180179
npmcli-arborist-->proggy;
181-
npmcli-arborist-->read-package-json-fast;
182180
npmcli-arborist-->semver;
183181
npmcli-arborist-->ssri;
184182
npmcli-config-->ini;
@@ -248,8 +246,6 @@ graph LR;
248246
parse-conflict-json-->json-parse-even-better-errors;
249247
promzard-->read;
250248
read-->mute-stream;
251-
read-package-json-fast-->json-parse-even-better-errors;
252-
read-package-json-fast-->npm-normalize-package-bin;
253249
unique-filename-->unique-slug;
254250
```
255251

@@ -350,7 +346,6 @@ graph LR;
350346
libnpmexec-->pacote;
351347
libnpmexec-->proc-log;
352348
libnpmexec-->promise-retry;
353-
libnpmexec-->read-package-json-fast;
354349
libnpmexec-->read;
355350
libnpmexec-->semver;
356351
libnpmexec-->signal-exit;
@@ -593,7 +588,6 @@ graph LR;
593588
npmcli-arborist-->proggy;
594589
npmcli-arborist-->promise-all-reject-late;
595590
npmcli-arborist-->promise-call-limit;
596-
npmcli-arborist-->read-package-json-fast;
597591
npmcli-arborist-->semver;
598592
npmcli-arborist-->ssri;
599593
npmcli-arborist-->tap;
@@ -710,8 +704,6 @@ graph LR;
710704
promise-retry-->retry;
711705
promzard-->read;
712706
read-->mute-stream;
713-
read-package-json-fast-->json-parse-even-better-errors;
714-
read-package-json-fast-->npm-normalize-package-bin;
715707
shebang-command-->shebang-regex;
716708
sigstore-->sigstore-bundle["@sigstore/bundle"];
717709
sigstore-->sigstore-core["@sigstore/core"];
@@ -787,5 +779,5 @@ packages higher up the chain.
787779
- @npmcli/package-json, npm-registry-fetch
788780
- @npmcli/git, make-fetch-happen
789781
- @npmcli/smoke-tests, @npmcli/installed-package-contents, npm-pick-manifest, cacache, promzard
790-
- @npmcli/docs, @npmcli/fs, npm-bundled, @npmcli/promise-spawn, npm-install-checks, npm-package-arg, unique-filename, npm-packlist, bin-links, nopt, parse-conflict-json, read-package-json-fast, @npmcli/mock-globals, read, normalize-package-data
782+
- @npmcli/docs, @npmcli/fs, npm-bundled, @npmcli/promise-spawn, npm-install-checks, npm-package-arg, unique-filename, npm-packlist, bin-links, nopt, parse-conflict-json, @npmcli/mock-globals, read, normalize-package-data
791783
- @npmcli/eslint-config, @npmcli/template-oss, ignore-walk, semver, npm-normalize-package-bin, @npmcli/name-from-folder, which, ini, hosted-git-info, proc-log, validate-npm-package-name, json-parse-even-better-errors, ssri, unique-slug, @npmcli/node-gyp, @npmcli/redact, @npmcli/agent, minipass-fetch, @npmcli/query, cmd-shim, read-cmd-shim, write-file-atomic, abbrev, proggy, minify-registry-metadata, mute-stream, npm-audit-report, npm-user-validate

node_modules/.gitignore

Lines changed: 35 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
# Allow all bundled deps
66
!/@isaacs/
77
/@isaacs/*
8+
!/@isaacs/balanced-match
9+
!/@isaacs/brace-expansion
810
!/@isaacs/cliui
911
!/@isaacs/cliui/node_modules/
1012
/@isaacs/cliui/node_modules/*
@@ -21,14 +23,37 @@
2123
!/@npmcli/git
2224
!/@npmcli/installed-package-contents
2325
!/@npmcli/map-workspaces
26+
!/@npmcli/map-workspaces/node_modules/
27+
/@npmcli/map-workspaces/node_modules/*
28+
!/@npmcli/map-workspaces/node_modules/@npmcli/
29+
/@npmcli/map-workspaces/node_modules/@npmcli/*
30+
!/@npmcli/map-workspaces/node_modules/@npmcli/package-json
2431
!/@npmcli/metavuln-calculator
2532
!/@npmcli/name-from-folder
2633
!/@npmcli/node-gyp
2734
!/@npmcli/package-json
35+
!/@npmcli/package-json/node_modules/
36+
/@npmcli/package-json/node_modules/*
37+
!/@npmcli/package-json/node_modules/@npmcli/
38+
/@npmcli/package-json/node_modules/@npmcli/*
39+
!/@npmcli/package-json/node_modules/@npmcli/git
40+
!/@npmcli/package-json/node_modules/glob
41+
!/@npmcli/package-json/node_modules/hosted-git-info
42+
!/@npmcli/package-json/node_modules/jackspeak
43+
!/@npmcli/package-json/node_modules/lru-cache
44+
!/@npmcli/package-json/node_modules/minimatch
45+
!/@npmcli/package-json/node_modules/npm-package-arg
46+
!/@npmcli/package-json/node_modules/npm-pick-manifest
47+
!/@npmcli/package-json/node_modules/path-scurry
2848
!/@npmcli/promise-spawn
2949
!/@npmcli/query
3050
!/@npmcli/redact
3151
!/@npmcli/run-script
52+
!/@npmcli/run-script/node_modules/
53+
/@npmcli/run-script/node_modules/*
54+
!/@npmcli/run-script/node_modules/@npmcli/
55+
/@npmcli/run-script/node_modules/@npmcli/*
56+
!/@npmcli/run-script/node_modules/@npmcli/package-json
3257
!/@pkgjs/
3358
/@pkgjs/*
3459
!/@pkgjs/parseargs
@@ -98,6 +123,11 @@
98123
!/imurmurhash
99124
!/ini
100125
!/init-package-json
126+
!/init-package-json/node_modules/
127+
/init-package-json/node_modules/*
128+
!/init-package-json/node_modules/@npmcli/
129+
/init-package-json/node_modules/@npmcli/*
130+
!/init-package-json/node_modules/@npmcli/package-json
101131
!/ip-address
102132
!/ip-regex
103133
!/is-cidr
@@ -167,6 +197,11 @@
167197
!/p-map
168198
!/package-json-from-dist
169199
!/pacote
200+
!/pacote/node_modules/
201+
/pacote/node_modules/*
202+
!/pacote/node_modules/@npmcli/
203+
/pacote/node_modules/@npmcli/*
204+
!/pacote/node_modules/@npmcli/package-json
170205
!/parse-conflict-json
171206
!/path-key
172207
!/path-scurry
@@ -179,7 +214,6 @@
179214
!/promzard
180215
!/qrcode-terminal
181216
!/read-cmd-shim
182-
!/read-package-json-fast
183217
!/read
184218
!/retry
185219
!/safer-buffer
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
(MIT)
2+
3+
Original code Copyright Julian Gruber <julian@juliangruber.com>
4+
5+
Port to TypeScript Copyright Isaac Z. Schlueter <i@izs.me>
6+
7+
Permission is hereby granted, free of charge, to any person obtaining a copy of
8+
this software and associated documentation files (the "Software"), to deal in
9+
the Software without restriction, including without limitation the rights to
10+
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
11+
of the Software, and to permit persons to whom the Software is furnished to do
12+
so, subject to the following conditions:
13+
14+
The above copyright notice and this permission notice shall be included in all
15+
copies or substantial portions of the Software.
16+
17+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23+
SOFTWARE.
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
"use strict";
2+
Object.defineProperty(exports, "__esModule", { value: true });
3+
exports.range = exports.balanced = void 0;
4+
const balanced = (a, b, str) => {
5+
const ma = a instanceof RegExp ? maybeMatch(a, str) : a;
6+
const mb = b instanceof RegExp ? maybeMatch(b, str) : b;
7+
const r = ma !== null && mb != null && (0, exports.range)(ma, mb, str);
8+
return (r && {
9+
start: r[0],
10+
end: r[1],
11+
pre: str.slice(0, r[0]),
12+
body: str.slice(r[0] + ma.length, r[1]),
13+
post: str.slice(r[1] + mb.length),
14+
});
15+
};
16+
exports.balanced = balanced;
17+
const maybeMatch = (reg, str) => {
18+
const m = str.match(reg);
19+
return m ? m[0] : null;
20+
};
21+
const range = (a, b, str) => {
22+
let begs, beg, left, right = undefined, result;
23+
let ai = str.indexOf(a);
24+
let bi = str.indexOf(b, ai + 1);
25+
let i = ai;
26+
if (ai >= 0 && bi > 0) {
27+
if (a === b) {
28+
return [ai, bi];
29+
}
30+
begs = [];
31+
left = str.length;
32+
while (i >= 0 && !result) {
33+
if (i === ai) {
34+
begs.push(i);
35+
ai = str.indexOf(a, i + 1);
36+
}
37+
else if (begs.length === 1) {
38+
const r = begs.pop();
39+
if (r !== undefined)
40+
result = [r, bi];
41+
}
42+
else {
43+
beg = begs.pop();
44+
if (beg !== undefined && beg < left) {
45+
left = beg;
46+
right = bi;
47+
}
48+
bi = str.indexOf(b, i + 1);
49+
}
50+
i = ai < bi && ai >= 0 ? ai : bi;
51+
}
52+
if (begs.length && right !== undefined) {
53+
result = [left, right];
54+
}
55+
}
56+
return result;
57+
};
58+
exports.range = range;
59+
//# sourceMappingURL=index.js.map
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"type": "commonjs"
3+
}
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
export const balanced = (a, b, str) => {
2+
const ma = a instanceof RegExp ? maybeMatch(a, str) : a;
3+
const mb = b instanceof RegExp ? maybeMatch(b, str) : b;
4+
const r = ma !== null && mb != null && range(ma, mb, str);
5+
return (r && {
6+
start: r[0],
7+
end: r[1],
8+
pre: str.slice(0, r[0]),
9+
body: str.slice(r[0] + ma.length, r[1]),
10+
post: str.slice(r[1] + mb.length),
11+
});
12+
};
13+
const maybeMatch = (reg, str) => {
14+
const m = str.match(reg);
15+
return m ? m[0] : null;
16+
};
17+
export const range = (a, b, str) => {
18+
let begs, beg, left, right = undefined, result;
19+
let ai = str.indexOf(a);
20+
let bi = str.indexOf(b, ai + 1);
21+
let i = ai;
22+
if (ai >= 0 && bi > 0) {
23+
if (a === b) {
24+
return [ai, bi];
25+
}
26+
begs = [];
27+
left = str.length;
28+
while (i >= 0 && !result) {
29+
if (i === ai) {
30+
begs.push(i);
31+
ai = str.indexOf(a, i + 1);
32+
}
33+
else if (begs.length === 1) {
34+
const r = begs.pop();
35+
if (r !== undefined)
36+
result = [r, bi];
37+
}
38+
else {
39+
beg = begs.pop();
40+
if (beg !== undefined && beg < left) {
41+
left = beg;
42+
right = bi;
43+
}
44+
bi = str.indexOf(b, i + 1);
45+
}
46+
i = ai < bi && ai >= 0 ? ai : bi;
47+
}
48+
if (begs.length && right !== undefined) {
49+
result = [left, right];
50+
}
51+
}
52+
return result;
53+
};
54+
//# sourceMappingURL=index.js.map
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"type": "module"
3+
}
Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
{
2+
"name": "@isaacs/balanced-match",
3+
"description": "Match balanced character pairs, like \"{\" and \"}\"",
4+
"version": "4.0.1",
5+
"files": [
6+
"dist"
7+
],
8+
"repository": {
9+
"type": "git",
10+
"url": "git://github.com/isaacs/balanced-match.git"
11+
},
12+
"exports": {
13+
"./package.json": "./package.json",
14+
".": {
15+
"import": {
16+
"types": "./dist/esm/index.d.ts",
17+
"default": "./dist/esm/index.js"
18+
},
19+
"require": {
20+
"types": "./dist/commonjs/index.d.ts",
21+
"default": "./dist/commonjs/index.js"
22+
}
23+
}
24+
},
25+
"type": "module",
26+
"scripts": {
27+
"preversion": "npm test",
28+
"postversion": "npm publish",
29+
"prepublishOnly": "git push origin --follow-tags",
30+
"prepare": "tshy",
31+
"pretest": "npm run prepare",
32+
"presnap": "npm run prepare",
33+
"test": "tap",
34+
"snap": "tap",
35+
"format": "prettier --write . --loglevel warn",
36+
"benchmark": "node benchmark/index.js",
37+
"typedoc": "typedoc --tsconfig .tshy/esm.json ./src/*.ts"
38+
},
39+
"prettier": {
40+
"semi": false,
41+
"printWidth": 80,
42+
"tabWidth": 2,
43+
"useTabs": false,
44+
"singleQuote": true,
45+
"jsxSingleQuote": false,
46+
"bracketSameLine": true,
47+
"arrowParens": "avoid",
48+
"endOfLine": "lf"
49+
},
50+
"devDependencies": {
51+
"@types/brace-expansion": "^1.1.2",
52+
"@types/node": "^24.0.0",
53+
"mkdirp": "^3.0.1",
54+
"prettier": "^3.3.2",
55+
"tap": "^21.1.0",
56+
"tshy": "^3.0.2",
57+
"typedoc": "^0.28.5"
58+
},
59+
"keywords": [
60+
"match",
61+
"regexp",
62+
"test",
63+
"balanced",
64+
"parse"
65+
],
66+
"license": "MIT",
67+
"engines": {
68+
"node": "20 || >=22"
69+
},
70+
"tshy": {
71+
"exports": {
72+
"./package.json": "./package.json",
73+
".": "./src/index.ts"
74+
}
75+
},
76+
"main": "./dist/commonjs/index.js",
77+
"types": "./dist/commonjs/index.d.ts",
78+
"module": "./dist/esm/index.js"
79+
}
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
MIT License
2+
3+
Copyright Julian Gruber <julian@juliangruber.com>
4+
5+
TypeScript port Copyright Isaac Z. Schlueter <i@izs.me>
6+
7+
Permission is hereby granted, free of charge, to any person obtaining a copy
8+
of this software and associated documentation files (the "Software"), to deal
9+
in the Software without restriction, including without limitation the rights
10+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11+
copies of the Software, and to permit persons to whom the Software is
12+
furnished to do so, subject to the following conditions:
13+
14+
The above copyright notice and this permission notice shall be included in all
15+
copies or substantial portions of the Software.
16+
17+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23+
SOFTWARE.

0 commit comments

Comments
 (0)