minimatch 6.2.1 → 6.2.2

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.
Files changed (51) hide show
  1. package/changelog.md +61 -0
  2. package/dist/cjs/assert-valid-pattern.d.ts +2 -0
  3. package/dist/cjs/assert-valid-pattern.d.ts.map +1 -0
  4. package/dist/cjs/assert-valid-pattern.js +14 -0
  5. package/dist/cjs/assert-valid-pattern.js.map +1 -0
  6. package/dist/cjs/ast.d.ts +25 -0
  7. package/dist/cjs/ast.d.ts.map +1 -0
  8. package/dist/cjs/ast.js +719 -0
  9. package/dist/cjs/ast.js.map +1 -0
  10. package/dist/cjs/brace-expressions.d.ts +8 -0
  11. package/dist/cjs/brace-expressions.d.ts.map +1 -0
  12. package/dist/cjs/brace-expressions.js +152 -0
  13. package/dist/cjs/brace-expressions.js.map +1 -0
  14. package/dist/cjs/escape.d.ts +12 -0
  15. package/dist/cjs/escape.d.ts.map +1 -0
  16. package/dist/cjs/escape.js +22 -0
  17. package/dist/cjs/escape.js.map +1 -0
  18. package/dist/cjs/index-cjs.d.ts.map +1 -0
  19. package/dist/cjs/index.d.ts +5 -0
  20. package/dist/cjs/index.d.ts.map +1 -0
  21. package/dist/cjs/index.js +144 -96
  22. package/dist/cjs/index.js.map +1 -1
  23. package/dist/cjs/unescape.d.ts +17 -0
  24. package/dist/cjs/unescape.d.ts.map +1 -0
  25. package/dist/cjs/unescape.js +24 -0
  26. package/dist/cjs/unescape.js.map +1 -0
  27. package/dist/mjs/assert-valid-pattern.d.ts +2 -0
  28. package/dist/mjs/assert-valid-pattern.d.ts.map +1 -0
  29. package/dist/mjs/assert-valid-pattern.js +10 -0
  30. package/dist/mjs/assert-valid-pattern.js.map +1 -0
  31. package/dist/mjs/ast.d.ts +25 -0
  32. package/dist/mjs/ast.d.ts.map +1 -0
  33. package/dist/mjs/ast.js +715 -0
  34. package/dist/mjs/ast.js.map +1 -0
  35. package/dist/mjs/brace-expressions.d.ts +8 -0
  36. package/dist/mjs/brace-expressions.d.ts.map +1 -0
  37. package/dist/mjs/brace-expressions.js +148 -0
  38. package/dist/mjs/brace-expressions.js.map +1 -0
  39. package/dist/mjs/escape.d.ts +12 -0
  40. package/dist/mjs/escape.d.ts.map +1 -0
  41. package/dist/mjs/escape.js +18 -0
  42. package/dist/mjs/escape.js.map +1 -0
  43. package/dist/mjs/index.d.ts +5 -0
  44. package/dist/mjs/index.d.ts.map +1 -0
  45. package/dist/mjs/index.js +144 -96
  46. package/dist/mjs/index.js.map +1 -1
  47. package/dist/mjs/unescape.d.ts +17 -0
  48. package/dist/mjs/unescape.d.ts.map +1 -0
  49. package/dist/mjs/unescape.js +20 -0
  50. package/dist/mjs/unescape.js.map +1 -0
  51. package/package.json +1 -1
package/changelog.md ADDED
@@ -0,0 +1,61 @@
1
+ # change log
2
+
3
+ ## 6.1
4
+
5
+ - Handle UNC paths on Windows
6
+
7
+ This adds some slightly modified behavior when a pattern or path starts
8
+ with `//` on Windows.
9
+
10
+ - In the case of `//?/<drive letter>:/...`, the `?` is treated as a
11
+ literal character, rather than a wildcard. That is, `//?/c:` will
12
+ _not_ match `//x/c:`.
13
+ - UNC patterns starting with `//?/<drive letter>:/` will match file paths
14
+ starting with `<drive letter>:` if the drive letters match
15
+ case-insensitively.
16
+ - File paths starting with `//?/<drive letter>:/` will match file
17
+ patterns starting with `<drive letter>:` if the drive letters match
18
+ case-insensitively.
19
+
20
+ - Add `{preserveMultipleSlashes:true}` option to suppress the
21
+ behavior where multiple consecutive `/` characters would be
22
+ effectively coerced into a single path portion separator.
23
+
24
+ ## 6.0
25
+
26
+ - hybrid module supporting both `require()` and `import`
27
+ - exported types
28
+
29
+ ## 5.1
30
+
31
+ - use windowsPathNoEscape/allowWindowsEscape opts
32
+ - make character classes more faithful to bash glob behavior
33
+ - fix handling of escapes
34
+ - treat invalid character classes as non-matching pattern
35
+ rather than escaped literals
36
+
37
+ ## 5.0
38
+
39
+ - brace-expansion: ignore only blocks that begins with $
40
+ - Expect exclusively forward slash as path sep, same as node-glob
41
+
42
+ ## 4.2
43
+
44
+ - makeRe: globstar should match zero+ path portions
45
+ - Fix bug with escaped '@' in patterns
46
+
47
+ ## 4.1
48
+
49
+ - treat `nocase:true` as always having magic
50
+ - expose GLOBSTAR marker
51
+
52
+ ## 4.0
53
+
54
+ - Update to modern JS syntax
55
+ - Add `allowWindowsEscape` option
56
+
57
+ ## 3.x
58
+
59
+ - Added basic redos protection
60
+ - Handle unfinished `!(` extglob patterns
61
+ - Add `partial: true` option
@@ -0,0 +1,2 @@
1
+ export declare const assertValidPattern: (pattern: any) => void;
2
+ //# sourceMappingURL=assert-valid-pattern.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"assert-valid-pattern.d.ts","sourceRoot":"","sources":["../../src/assert-valid-pattern.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,kBAAkB,EAAE,CAAC,OAAO,EAAE,GAAG,KAAK,IAUlD,CAAA"}
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.assertValidPattern = void 0;
4
+ const MAX_PATTERN_LENGTH = 1024 * 64;
5
+ const assertValidPattern = (pattern) => {
6
+ if (typeof pattern !== 'string') {
7
+ throw new TypeError('invalid pattern');
8
+ }
9
+ if (pattern.length > MAX_PATTERN_LENGTH) {
10
+ throw new TypeError('pattern is too long');
11
+ }
12
+ };
13
+ exports.assertValidPattern = assertValidPattern;
14
+ //# sourceMappingURL=assert-valid-pattern.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"assert-valid-pattern.js","sourceRoot":"","sources":["../../src/assert-valid-pattern.ts"],"names":[],"mappings":";;;AAAA,MAAM,kBAAkB,GAAG,IAAI,GAAG,EAAE,CAAA;AAC7B,MAAM,kBAAkB,GAA2B,CACxD,OAAY,EACe,EAAE;IAC7B,IAAI,OAAO,OAAO,KAAK,QAAQ,EAAE;QAC/B,MAAM,IAAI,SAAS,CAAC,iBAAiB,CAAC,CAAA;KACvC;IAED,IAAI,OAAO,CAAC,MAAM,GAAG,kBAAkB,EAAE;QACvC,MAAM,IAAI,SAAS,CAAC,qBAAqB,CAAC,CAAA;KAC3C;AACH,CAAC,CAAA;AAVY,QAAA,kBAAkB,sBAU9B","sourcesContent":["const MAX_PATTERN_LENGTH = 1024 * 64\nexport const assertValidPattern: (pattern: any) => void = (\n pattern: any\n): asserts pattern is string => {\n if (typeof pattern !== 'string') {\n throw new TypeError('invalid pattern')\n }\n\n if (pattern.length > MAX_PATTERN_LENGTH) {\n throw new TypeError('pattern is too long')\n }\n}\n"]}
@@ -0,0 +1,25 @@
1
+ import { MinimatchOptions, MMRegExp } from './index.js';
2
+ export type ExtglobType = '!' | '?' | '+' | '*' | '@';
3
+ export declare class AST {
4
+ #private;
5
+ type: ExtglobType | null;
6
+ constructor(type: ExtglobType | null, parent?: AST, options?: MinimatchOptions);
7
+ get hasMagic(): boolean | undefined;
8
+ toString(): string;
9
+ push(...parts: (string | AST)[]): void;
10
+ toJSON(): any[];
11
+ isStart(): boolean;
12
+ isEnd(): boolean;
13
+ copyIn(part: AST | string): void;
14
+ clone(parent: AST): AST;
15
+ static fromGlob(pattern: string, options?: MinimatchOptions): AST;
16
+ toMMPattern(): MMRegExp | string;
17
+ get options(): MinimatchOptions;
18
+ toRegExpSource(): [
19
+ re: string,
20
+ body: string,
21
+ hasMagic: boolean,
22
+ uflag: boolean
23
+ ];
24
+ }
25
+ //# sourceMappingURL=ast.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ast.d.ts","sourceRoot":"","sources":["../../src/ast.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,gBAAgB,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AAyCvD,MAAM,MAAM,WAAW,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,CAAA;AAiErD,qBAAa,GAAG;;IACd,IAAI,EAAE,WAAW,GAAG,IAAI,CAAA;gBAiBtB,IAAI,EAAE,WAAW,GAAG,IAAI,EACxB,MAAM,CAAC,EAAE,GAAG,EACZ,OAAO,GAAE,gBAAqB;IAahC,IAAI,QAAQ,IAAI,OAAO,GAAG,SAAS,CAUlC;IAGD,QAAQ,IAAI,MAAM;IA+ClB,IAAI,CAAC,GAAG,KAAK,EAAE,CAAC,MAAM,GAAG,GAAG,CAAC,EAAE;IAY/B,MAAM;IAgBN,OAAO,IAAI,OAAO;IAgBlB,KAAK,IAAI,OAAO;IAYhB,MAAM,CAAC,IAAI,EAAE,GAAG,GAAG,MAAM;IAKzB,KAAK,CAAC,MAAM,EAAE,GAAG;IA0RjB,MAAM,CAAC,QAAQ,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,GAAE,gBAAqB;IAQ/D,WAAW,IAAI,QAAQ,GAAG,MAAM;IA2BhC,IAAI,OAAO,qBAEV;IAuED,cAAc,IAAI;QAChB,EAAE,EAAE,MAAM;QACV,IAAI,EAAE,MAAM;QACZ,QAAQ,EAAE,OAAO;QACjB,KAAK,EAAE,OAAO;KACf;CA4KF"}