@pnpm/exe 11.0.0-beta.6 → 11.0.0-beta.7

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.
@@ -192,15 +192,14 @@ class AST {
192
192
  }
193
193
  // reconstructs the pattern
194
194
  toString() {
195
- if (this.#toString !== undefined)
196
- return this.#toString;
197
- if (!this.type) {
198
- return (this.#toString = this.#parts.map(p => String(p)).join(''));
199
- }
200
- else {
201
- return (this.#toString =
202
- this.type + '(' + this.#parts.map(p => String(p)).join('|') + ')');
203
- }
195
+ return (this.#toString !== undefined ? this.#toString
196
+ : !this.type ?
197
+ (this.#toString = this.#parts.map(p => String(p)).join(''))
198
+ : (this.#toString =
199
+ this.type +
200
+ '(' +
201
+ this.#parts.map(p => String(p)).join('|') +
202
+ ')'));
204
203
  }
205
204
  #fillNegs() {
206
205
  /* c8 ignore start */
@@ -480,7 +479,7 @@ class AST {
480
479
  }
481
480
  #canUsurpType(c) {
482
481
  const m = usurpMap.get(this.type);
483
- return !!(m?.has(c));
482
+ return !!m?.has(c);
484
483
  }
485
484
  #canUsurp(child) {
486
485
  if (!child ||
@@ -16,7 +16,7 @@ const minimatch = (p, pattern, options = {}) => {
16
16
  };
17
17
  exports.minimatch = minimatch;
18
18
  // Optimized checking for the most common glob patterns.
19
- const starDotExtRE = /^\*+([^+@!?\*\[\(]*)$/;
19
+ const starDotExtRE = /^\*+([^+@!?*[(]*)$/;
20
20
  const starDotExtTest = (ext) => (f) => !f.startsWith('.') && f.endsWith(ext);
21
21
  const starDotExtTestDot = (ext) => (f) => f.endsWith(ext);
22
22
  const starDotExtTestNocase = (ext) => {
@@ -35,7 +35,7 @@ const dotStarTest = (f) => f !== '.' && f !== '..' && f.startsWith('.');
35
35
  const starRE = /^\*+$/;
36
36
  const starTest = (f) => f.length !== 0 && !f.startsWith('.');
37
37
  const starTestDot = (f) => f.length !== 0 && f !== '.' && f !== '..';
38
- const qmarksRE = /^\?+([^+@!?\*\[\(]*)?$/;
38
+ const qmarksRE = /^\?+([^+@!?*[(]*)?$/;
39
39
  const qmarksTestNocase = ([$0, ext = '']) => {
40
40
  const noext = qmarksTestNoExt([$0]);
41
41
  if (!ext)
@@ -267,6 +267,7 @@ class Minimatch {
267
267
  // step 2: expand braces
268
268
  this.globSet = [...new Set(this.braceExpand())];
269
269
  if (options.debug) {
270
+ //oxlint-disable-next-line no-console
270
271
  this.debug = (...args) => console.error(...args);
271
272
  }
272
273
  this.debug(this.pattern, this.globSet);
@@ -329,10 +330,10 @@ class Minimatch {
329
330
  preprocess(globParts) {
330
331
  // if we're not in globstar mode, then turn ** into *
331
332
  if (this.options.noglobstar) {
332
- for (let i = 0; i < globParts.length; i++) {
333
- for (let j = 0; j < globParts[i].length; j++) {
334
- if (globParts[i][j] === '**') {
335
- globParts[i][j] = '*';
333
+ for (const partset of globParts) {
334
+ for (let j = 0; j < partset.length; j++) {
335
+ if (partset[j] === '**') {
336
+ partset[j] = '*';
336
337
  }
337
338
  }
338
339
  }
@@ -420,7 +421,11 @@ class Minimatch {
420
421
  let dd = 0;
421
422
  while (-1 !== (dd = parts.indexOf('..', dd + 1))) {
422
423
  const p = parts[dd - 1];
423
- if (p && p !== '.' && p !== '..' && p !== '**') {
424
+ if (p &&
425
+ p !== '.' &&
426
+ p !== '..' &&
427
+ p !== '**' &&
428
+ !(this.isWindows && /^[a-z]:$/i.test(p))) {
424
429
  didSomething = true;
425
430
  parts.splice(dd - 1, 2);
426
431
  dd -= 2;
@@ -669,15 +674,17 @@ class Minimatch {
669
674
  // split the pattern up into globstar-delimited sections
670
675
  // the tail has to be at the end, and the others just have
671
676
  // to be found in order from the head.
672
- const [head, body, tail] = partial ? [
673
- pattern.slice(patternIndex, firstgs),
674
- pattern.slice(firstgs + 1),
675
- [],
676
- ] : [
677
- pattern.slice(patternIndex, firstgs),
678
- pattern.slice(firstgs + 1, lastgs),
679
- pattern.slice(lastgs + 1),
680
- ];
677
+ const [head, body, tail] = partial ?
678
+ [
679
+ pattern.slice(patternIndex, firstgs),
680
+ pattern.slice(firstgs + 1),
681
+ [],
682
+ ]
683
+ : [
684
+ pattern.slice(patternIndex, firstgs),
685
+ pattern.slice(firstgs + 1, lastgs),
686
+ pattern.slice(lastgs + 1),
687
+ ];
681
688
  // check the head, from the current file/pattern index.
682
689
  if (head.length) {
683
690
  const fileHead = file.slice(fileIndex, fileIndex + head.length);
@@ -1023,7 +1030,7 @@ class Minimatch {
1023
1030
  this.regexp = new RegExp(re, [...flags].join(''));
1024
1031
  /* c8 ignore start */
1025
1032
  }
1026
- catch (ex) {
1033
+ catch {
1027
1034
  // should be impossible
1028
1035
  this.regexp = false;
1029
1036
  }
@@ -1038,7 +1045,7 @@ class Minimatch {
1038
1045
  if (this.preserveMultipleSlashes) {
1039
1046
  return p.split('/');
1040
1047
  }
1041
- else if (this.isWindows && /^\/\/[^\/]+/.test(p)) {
1048
+ else if (this.isWindows && /^\/\/[^/]+/.test(p)) {
1042
1049
  // add an extra '' for the one we lose
1043
1050
  return ['', ...p.split(/\/+/)];
1044
1051
  }
@@ -1080,8 +1087,7 @@ class Minimatch {
1080
1087
  filename = ff[i];
1081
1088
  }
1082
1089
  }
1083
- for (let i = 0; i < set.length; i++) {
1084
- const pattern = set[i];
1090
+ for (const pattern of set) {
1085
1091
  let file = ff;
1086
1092
  if (options.matchBase && pattern.length === 1) {
1087
1093
  file = [filename];
@@ -23,16 +23,16 @@ exports.unescape = void 0;
23
23
  const unescape = (s, { windowsPathsNoEscape = false, magicalBraces = true, } = {}) => {
24
24
  if (magicalBraces) {
25
25
  return windowsPathsNoEscape ?
26
- s.replace(/\[([^\/\\])\]/g, '$1')
26
+ s.replace(/\[([^/\\])\]/g, '$1')
27
27
  : s
28
- .replace(/((?!\\).|^)\[([^\/\\])\]/g, '$1$2')
29
- .replace(/\\([^\/])/g, '$1');
28
+ .replace(/((?!\\).|^)\[([^/\\])\]/g, '$1$2')
29
+ .replace(/\\([^/])/g, '$1');
30
30
  }
31
31
  return windowsPathsNoEscape ?
32
- s.replace(/\[([^\/\\{}])\]/g, '$1')
32
+ s.replace(/\[([^/\\{}])\]/g, '$1')
33
33
  : s
34
- .replace(/((?!\\).|^)\[([^\/\\{}])\]/g, '$1$2')
35
- .replace(/\\([^\/{}])/g, '$1');
34
+ .replace(/((?!\\).|^)\[([^/\\{}])\]/g, '$1$2')
35
+ .replace(/\\([^/{}])/g, '$1');
36
36
  };
37
37
  exports.unescape = unescape;
38
38
  //# sourceMappingURL=unescape.js.map
@@ -189,15 +189,14 @@ export class AST {
189
189
  }
190
190
  // reconstructs the pattern
191
191
  toString() {
192
- if (this.#toString !== undefined)
193
- return this.#toString;
194
- if (!this.type) {
195
- return (this.#toString = this.#parts.map(p => String(p)).join(''));
196
- }
197
- else {
198
- return (this.#toString =
199
- this.type + '(' + this.#parts.map(p => String(p)).join('|') + ')');
200
- }
192
+ return (this.#toString !== undefined ? this.#toString
193
+ : !this.type ?
194
+ (this.#toString = this.#parts.map(p => String(p)).join(''))
195
+ : (this.#toString =
196
+ this.type +
197
+ '(' +
198
+ this.#parts.map(p => String(p)).join('|') +
199
+ ')'));
201
200
  }
202
201
  #fillNegs() {
203
202
  /* c8 ignore start */
@@ -477,7 +476,7 @@ export class AST {
477
476
  }
478
477
  #canUsurpType(c) {
479
478
  const m = usurpMap.get(this.type);
480
- return !!(m?.has(c));
479
+ return !!m?.has(c);
481
480
  }
482
481
  #canUsurp(child) {
483
482
  if (!child ||
@@ -12,7 +12,7 @@ export const minimatch = (p, pattern, options = {}) => {
12
12
  return new Minimatch(pattern, options).match(p);
13
13
  };
14
14
  // Optimized checking for the most common glob patterns.
15
- const starDotExtRE = /^\*+([^+@!?\*\[\(]*)$/;
15
+ const starDotExtRE = /^\*+([^+@!?*[(]*)$/;
16
16
  const starDotExtTest = (ext) => (f) => !f.startsWith('.') && f.endsWith(ext);
17
17
  const starDotExtTestDot = (ext) => (f) => f.endsWith(ext);
18
18
  const starDotExtTestNocase = (ext) => {
@@ -31,7 +31,7 @@ const dotStarTest = (f) => f !== '.' && f !== '..' && f.startsWith('.');
31
31
  const starRE = /^\*+$/;
32
32
  const starTest = (f) => f.length !== 0 && !f.startsWith('.');
33
33
  const starTestDot = (f) => f.length !== 0 && f !== '.' && f !== '..';
34
- const qmarksRE = /^\?+([^+@!?\*\[\(]*)?$/;
34
+ const qmarksRE = /^\?+([^+@!?*[(]*)?$/;
35
35
  const qmarksTestNocase = ([$0, ext = '']) => {
36
36
  const noext = qmarksTestNoExt([$0]);
37
37
  if (!ext)
@@ -258,6 +258,7 @@ export class Minimatch {
258
258
  // step 2: expand braces
259
259
  this.globSet = [...new Set(this.braceExpand())];
260
260
  if (options.debug) {
261
+ //oxlint-disable-next-line no-console
261
262
  this.debug = (...args) => console.error(...args);
262
263
  }
263
264
  this.debug(this.pattern, this.globSet);
@@ -320,10 +321,10 @@ export class Minimatch {
320
321
  preprocess(globParts) {
321
322
  // if we're not in globstar mode, then turn ** into *
322
323
  if (this.options.noglobstar) {
323
- for (let i = 0; i < globParts.length; i++) {
324
- for (let j = 0; j < globParts[i].length; j++) {
325
- if (globParts[i][j] === '**') {
326
- globParts[i][j] = '*';
324
+ for (const partset of globParts) {
325
+ for (let j = 0; j < partset.length; j++) {
326
+ if (partset[j] === '**') {
327
+ partset[j] = '*';
327
328
  }
328
329
  }
329
330
  }
@@ -411,7 +412,11 @@ export class Minimatch {
411
412
  let dd = 0;
412
413
  while (-1 !== (dd = parts.indexOf('..', dd + 1))) {
413
414
  const p = parts[dd - 1];
414
- if (p && p !== '.' && p !== '..' && p !== '**') {
415
+ if (p &&
416
+ p !== '.' &&
417
+ p !== '..' &&
418
+ p !== '**' &&
419
+ !(this.isWindows && /^[a-z]:$/i.test(p))) {
415
420
  didSomething = true;
416
421
  parts.splice(dd - 1, 2);
417
422
  dd -= 2;
@@ -660,15 +665,17 @@ export class Minimatch {
660
665
  // split the pattern up into globstar-delimited sections
661
666
  // the tail has to be at the end, and the others just have
662
667
  // to be found in order from the head.
663
- const [head, body, tail] = partial ? [
664
- pattern.slice(patternIndex, firstgs),
665
- pattern.slice(firstgs + 1),
666
- [],
667
- ] : [
668
- pattern.slice(patternIndex, firstgs),
669
- pattern.slice(firstgs + 1, lastgs),
670
- pattern.slice(lastgs + 1),
671
- ];
668
+ const [head, body, tail] = partial ?
669
+ [
670
+ pattern.slice(patternIndex, firstgs),
671
+ pattern.slice(firstgs + 1),
672
+ [],
673
+ ]
674
+ : [
675
+ pattern.slice(patternIndex, firstgs),
676
+ pattern.slice(firstgs + 1, lastgs),
677
+ pattern.slice(lastgs + 1),
678
+ ];
672
679
  // check the head, from the current file/pattern index.
673
680
  if (head.length) {
674
681
  const fileHead = file.slice(fileIndex, fileIndex + head.length);
@@ -1014,7 +1021,7 @@ export class Minimatch {
1014
1021
  this.regexp = new RegExp(re, [...flags].join(''));
1015
1022
  /* c8 ignore start */
1016
1023
  }
1017
- catch (ex) {
1024
+ catch {
1018
1025
  // should be impossible
1019
1026
  this.regexp = false;
1020
1027
  }
@@ -1029,7 +1036,7 @@ export class Minimatch {
1029
1036
  if (this.preserveMultipleSlashes) {
1030
1037
  return p.split('/');
1031
1038
  }
1032
- else if (this.isWindows && /^\/\/[^\/]+/.test(p)) {
1039
+ else if (this.isWindows && /^\/\/[^/]+/.test(p)) {
1033
1040
  // add an extra '' for the one we lose
1034
1041
  return ['', ...p.split(/\/+/)];
1035
1042
  }
@@ -1071,8 +1078,7 @@ export class Minimatch {
1071
1078
  filename = ff[i];
1072
1079
  }
1073
1080
  }
1074
- for (let i = 0; i < set.length; i++) {
1075
- const pattern = set[i];
1081
+ for (const pattern of set) {
1076
1082
  let file = ff;
1077
1083
  if (options.matchBase && pattern.length === 1) {
1078
1084
  file = [filename];
@@ -20,15 +20,15 @@
20
20
  export const unescape = (s, { windowsPathsNoEscape = false, magicalBraces = true, } = {}) => {
21
21
  if (magicalBraces) {
22
22
  return windowsPathsNoEscape ?
23
- s.replace(/\[([^\/\\])\]/g, '$1')
23
+ s.replace(/\[([^/\\])\]/g, '$1')
24
24
  : s
25
- .replace(/((?!\\).|^)\[([^\/\\])\]/g, '$1$2')
26
- .replace(/\\([^\/])/g, '$1');
25
+ .replace(/((?!\\).|^)\[([^/\\])\]/g, '$1$2')
26
+ .replace(/\\([^/])/g, '$1');
27
27
  }
28
28
  return windowsPathsNoEscape ?
29
- s.replace(/\[([^\/\\{}])\]/g, '$1')
29
+ s.replace(/\[([^/\\{}])\]/g, '$1')
30
30
  : s
31
- .replace(/((?!\\).|^)\[([^\/\\{}])\]/g, '$1$2')
32
- .replace(/\\([^\/{}])/g, '$1');
31
+ .replace(/((?!\\).|^)\[([^/\\{}])\]/g, '$1$2')
32
+ .replace(/\\([^/{}])/g, '$1');
33
33
  };
34
34
  //# sourceMappingURL=unescape.js.map
@@ -2,7 +2,7 @@
2
2
  "author": "Isaac Z. Schlueter <i@izs.me> (http://blog.izs.me)",
3
3
  "name": "minimatch",
4
4
  "description": "a glob matcher in javascript",
5
- "version": "10.2.4",
5
+ "version": "10.2.5",
6
6
  "repository": {
7
7
  "type": "git",
8
8
  "url": "git@github.com:isaacs/minimatch"
@@ -36,18 +36,23 @@
36
36
  "snap": "tap",
37
37
  "format": "prettier --write .",
38
38
  "benchmark": "node benchmark/index.js",
39
- "typedoc": "typedoc --tsconfig .tshy/esm.json ./src/*.ts"
39
+ "typedoc": "typedoc --tsconfig .tshy/esm.json ./src/*.ts",
40
+ "lint": "oxlint --fix src test",
41
+ "postsnap": "npm run lint",
42
+ "postlint": "npm run format"
40
43
  },
41
44
  "engines": {
42
45
  "node": "18 || 20 || >=22"
43
46
  },
44
47
  "devDependencies": {
45
- "@types/node": "^25.3.0",
48
+ "@types/node": "^25.5.0",
46
49
  "mkdirp": "^3.0.1",
47
- "prettier": "^3.6.2",
50
+ "oxlint": "^1.57.0",
51
+ "oxlint-tsgolint": "^0.18.1",
52
+ "prettier": "^3.8.1",
48
53
  "tap": "^21.6.2",
49
- "tshy": "^3.0.2",
50
- "typedoc": "^0.28.5"
54
+ "tshy": "^4.0.0",
55
+ "typedoc": "^0.28.18"
51
56
  },
52
57
  "funding": {
53
58
  "url": "https://github.com/sponsors/isaacs"
@@ -57,11 +62,12 @@
57
62
  "exports": {
58
63
  "./package.json": "./package.json",
59
64
  ".": "./src/index.ts"
60
- }
65
+ },
66
+ "selfLink": false
61
67
  },
62
68
  "type": "module",
63
69
  "module": "./dist/esm/index.js",
64
70
  "dependencies": {
65
- "brace-expansion": "^5.0.2"
71
+ "brace-expansion": "^5.0.5"
66
72
  }
67
73
  }