@types/picomatch 2.2.6 → 2.3.1

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.
picomatch/LICENSE CHANGED
File without changes
picomatch/README.md CHANGED
@@ -8,9 +8,9 @@ This package contains type definitions for picomatch (https://github.com/microma
8
8
  Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/picomatch.
9
9
 
10
10
  ### Additional Details
11
- * Last updated: Tue, 27 Jul 2021 02:31:19 GMT
11
+ * Last updated: Sun, 24 Sep 2023 06:37:28 GMT
12
12
  * Dependencies: none
13
13
  * Global values: none
14
14
 
15
15
  # Credits
16
- These definitions were written by [Patrick](https://github.com/p-kuen), and [Daniel Tschinder](https://github.com/danez).
16
+ These definitions were written by [Patrick](https://github.com/p-kuen), [Daniel Tschinder](https://github.com/danez), and [Piotr Błażejewicz](https://github.com/peterblazejewicz).
picomatch/index.d.ts CHANGED
@@ -1,10 +1,10 @@
1
- // Type definitions for picomatch 2.2
1
+ // Type definitions for picomatch 2.3
2
2
  // Project: https://github.com/micromatch/picomatch
3
3
  // Definitions by: Patrick <https://github.com/p-kuen>
4
4
  // Daniel Tschinder <https://github.com/danez>
5
+ // Piotr Błażejewicz <https://github.com/peterblazejewicz>
5
6
  // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
6
- // Minimum TypeScript Version: 3.0
7
7
 
8
- import picomatch = require('./lib/picomatch');
8
+ import picomatch = require("./lib/picomatch");
9
9
 
10
10
  export = picomatch;
@@ -15,6 +15,7 @@ declare const POSIX_CHARS: {
15
15
  STAR: string;
16
16
  START_ANCHOR: string;
17
17
  };
18
+
18
19
  /**
19
20
  * Windows glob regex
20
21
  */
@@ -30,29 +31,26 @@ declare const WINDOWS_CHARS: {
30
31
  QMARK_NO_DOT: string;
31
32
  START_ANCHOR: string;
32
33
  END_ANCHOR: string;
33
- DOT_LITERAL: string;
34
- PLUS_LITERAL: string;
35
- QMARK_LITERAL: string;
36
- ONE_CHAR: string;
37
- };
34
+ } & typeof POSIX_CHARS;
35
+
38
36
  /**
39
37
  * POSIX Bracket Regex
40
38
  */
41
39
  declare const POSIX_REGEX_SOURCE: {
42
- alnum: 'a-zA-Z0-9';
43
- alpha: 'a-zA-Z';
44
- ascii: '\\x00-\\x7F';
45
- blank: ' \\t';
46
- cntrl: '\\x00-\\x1F\\x7F';
47
- digit: '0-9';
48
- graph: '\\x21-\\x7E';
49
- lower: 'a-z';
50
- print: '\\x20-\\x7E ';
51
- punct: '\\-!"#$%&\'()\\*+,./:;<=>?@[\\]^_`{|}~';
52
- space: ' \\t\\r\\n\\v\\f';
53
- upper: 'A-Z';
54
- word: 'A-Za-z0-9_';
55
- xdigit: 'A-Fa-f0-9';
40
+ alnum: "a-zA-Z0-9";
41
+ alpha: "a-zA-Z";
42
+ ascii: "\\x00-\\x7F";
43
+ blank: " \\t";
44
+ cntrl: "\\x00-\\x1F\\x7F";
45
+ digit: "0-9";
46
+ graph: "\\x21-\\x7E";
47
+ lower: "a-z";
48
+ print: "\\x20-\\x7E ";
49
+ punct: "\\-!\"#$%&'()\\*+,./:;<=>?@[\\]^_`{|}~";
50
+ space: " \\t\\r\\n\\v\\f";
51
+ upper: "A-Z";
52
+ word: "A-Za-z0-9_";
53
+ xdigit: "A-Fa-f0-9";
56
54
  };
57
55
 
58
56
  declare const constants: {
@@ -68,9 +66,9 @@ declare const constants: {
68
66
  REGEX_REMOVE_BACKSLASH: RegExp;
69
67
 
70
68
  REPLACEMENTS: {
71
- '***': '*';
72
- '**/**': '**';
73
- '**/**/**': '**';
69
+ "***": "*";
70
+ "**/**": "**";
71
+ "**/**/**": "**";
74
72
  };
75
73
 
76
74
  // Digits
picomatch/lib/parse.d.ts CHANGED
File without changes
@@ -1,6 +1,6 @@
1
- import constantsImport = require('./constants');
2
- import parseImport = require('./parse');
3
- import scanImport = require('./scan');
1
+ import constantsImport = require("./constants");
2
+ import parseImport = require("./parse");
3
+ import scanImport = require("./scan");
4
4
 
5
5
  /**
6
6
  * Creates a matcher function from one or more glob patterns. The
@@ -21,7 +21,7 @@ import scanImport = require('./scan');
21
21
  * @return Returns a matcher function.
22
22
  * @api public
23
23
  */
24
- declare function picomatch<T extends true | false>(
24
+ declare function picomatch<T extends true | false = false>(
25
25
  glob: picomatch.Glob,
26
26
  options?: picomatch.PicomatchOptions,
27
27
  returnState?: T,
@@ -45,8 +45,8 @@ declare namespace picomatch {
45
45
  posix: boolean;
46
46
  input: string;
47
47
  output: string;
48
- match: ReturnType<typeof test>['match'];
49
- isMatch: ReturnType<typeof test>['isMatch'];
48
+ match: ReturnType<typeof test>["match"];
49
+ isMatch: ReturnType<typeof test>["isMatch"];
50
50
  }
51
51
 
52
52
  interface PicomatchOptions {
@@ -96,7 +96,7 @@ declare namespace picomatch {
96
96
  /**
97
97
  * Regex flags to use in the generated regex. If defined, the `nocase` option will be overridden.
98
98
  */
99
- flags?: boolean | undefined;
99
+ flags?: string | undefined;
100
100
  /**
101
101
  * Custom function for formatting the returned string. This is useful for removing leading slashes, converting Windows paths to Posix paths, etc.
102
102
  */
@@ -243,7 +243,9 @@ declare namespace picomatch {
243
243
  returnState?: boolean,
244
244
  ): ReturnType<typeof compileRe>;
245
245
 
246
- function toRegex(source: string | RegExp, options?: { flags?: string | undefined; nocase?: boolean | undefined; debug?: boolean | undefined }): RegExp;
246
+ type ToRegexOptions = Pick<PicomatchOptions, "flags" | "nocase" | "debug">;
247
+
248
+ function toRegex(source: string | RegExp, options?: ToRegexOptions): RegExp;
247
249
 
248
250
  const constants: typeof constantsImport;
249
251
  }
picomatch/lib/scan.d.ts CHANGED
File without changes
picomatch/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/picomatch",
3
- "version": "2.2.6",
3
+ "version": "2.3.1",
4
4
  "description": "TypeScript definitions for picomatch",
5
5
  "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/picomatch",
6
6
  "license": "MIT",
@@ -14,6 +14,11 @@
14
14
  "name": "Daniel Tschinder",
15
15
  "url": "https://github.com/danez",
16
16
  "githubUsername": "danez"
17
+ },
18
+ {
19
+ "name": "Piotr Błażejewicz",
20
+ "url": "https://github.com/peterblazejewicz",
21
+ "githubUsername": "peterblazejewicz"
17
22
  }
18
23
  ],
19
24
  "main": "",
@@ -25,6 +30,6 @@
25
30
  },
26
31
  "scripts": {},
27
32
  "dependencies": {},
28
- "typesPublisherContentHash": "ea1d62d31fbc8580126746639f6e00087583932c7e1388d890b2a9f3ea895d95",
29
- "typeScriptVersion": "3.6"
33
+ "typesPublisherContentHash": "ac74187ba035621c3c3a3baeeb4ea598beefe48b308db300c86a5fcf8c511df9",
34
+ "typeScriptVersion": "4.5"
30
35
  }