minimatch 5.1.3 → 6.0.0

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.
package/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  The ISC License
2
2
 
3
- Copyright (c) 2011-2022 Isaac Z. Schlueter and Contributors
3
+ Copyright (c) 2011-2023 Isaac Z. Schlueter and Contributors
4
4
 
5
5
  Permission to use, copy, modify, and/or distribute this software for any
6
6
  purpose with or without fee is hereby granted, provided that the above
package/README.md CHANGED
@@ -2,9 +2,6 @@
2
2
 
3
3
  A minimal matching utility.
4
4
 
5
- [![Build Status](https://travis-ci.org/isaacs/minimatch.svg?branch=master)](http://travis-ci.org/isaacs/minimatch)
6
-
7
-
8
5
  This is the matching library used internally by npm.
9
6
 
10
7
  It works by converting glob expressions into JavaScript `RegExp`
@@ -12,8 +9,11 @@ objects.
12
9
 
13
10
  ## Usage
14
11
 
15
- ```javascript
16
- var minimatch = require("minimatch")
12
+ ```js
13
+ // hybrid module, load with require() or import
14
+ import minimatch from 'minimatch'
15
+ // or:
16
+ const minimatch = require("minimatch").default
17
17
 
18
18
  minimatch("bar.foo", "*.foo") // true!
19
19
  minimatch("bar.foo", "*.bar") // false!
@@ -0,0 +1,67 @@
1
+ export interface MinimatchOptions {
2
+ nobrace?: boolean;
3
+ nocomment?: boolean;
4
+ nonegate?: boolean;
5
+ debug?: boolean;
6
+ noglobstar?: boolean;
7
+ noext?: boolean;
8
+ nonull?: boolean;
9
+ windowsPathsNoEscape?: boolean;
10
+ allowWindowsEscape?: boolean;
11
+ partial?: boolean;
12
+ dot?: boolean;
13
+ nocase?: boolean;
14
+ matchBase?: boolean;
15
+ flipNegate?: boolean;
16
+ }
17
+ export declare const minimatch: {
18
+ (p: string, pattern: string, options?: MinimatchOptions): boolean;
19
+ sep: string;
20
+ GLOBSTAR: typeof GLOBSTAR;
21
+ filter: (pattern: string, options?: MinimatchOptions) => (p: string) => boolean;
22
+ defaults: (def: MinimatchOptions) => typeof minimatch;
23
+ braceExpand: (pattern: string, options?: MinimatchOptions) => string[];
24
+ makeRe: (pattern: string, options?: MinimatchOptions) => false | MMRegExp;
25
+ match: (list: string[], pattern: string, options?: MinimatchOptions) => string[];
26
+ Minimatch: typeof Minimatch;
27
+ };
28
+ export default minimatch;
29
+ export declare const sep: string;
30
+ export declare const GLOBSTAR: unique symbol;
31
+ export declare const filter: (pattern: string, options?: MinimatchOptions) => (p: string) => boolean;
32
+ export declare const defaults: (def: MinimatchOptions) => typeof minimatch;
33
+ export declare const braceExpand: (pattern: string, options?: MinimatchOptions) => string[];
34
+ declare const SUBPARSE: unique symbol;
35
+ export declare const makeRe: (pattern: string, options?: MinimatchOptions) => false | MMRegExp;
36
+ export declare const match: (list: string[], pattern: string, options?: MinimatchOptions) => string[];
37
+ type MMRegExp = RegExp & {
38
+ _src?: string;
39
+ _glob?: string;
40
+ };
41
+ type SubparseReturn = [string, boolean];
42
+ type ParseReturnFiltered = string | MMRegExp | typeof GLOBSTAR;
43
+ type ParseReturn = ParseReturnFiltered | false;
44
+ export declare class Minimatch {
45
+ options: MinimatchOptions;
46
+ set: ParseReturnFiltered[][];
47
+ pattern: string;
48
+ windowsPathsNoEscape: boolean;
49
+ nonegate: boolean;
50
+ negate: boolean;
51
+ comment: boolean;
52
+ empty: boolean;
53
+ partial: boolean;
54
+ globSet?: string[];
55
+ globParts?: string[][];
56
+ regexp: false | null | MMRegExp;
57
+ constructor(pattern: string, options?: MinimatchOptions);
58
+ debug(..._: any[]): void;
59
+ make(): void;
60
+ parseNegate(): void;
61
+ matchOne(file: string[], pattern: ParseReturn[], partial?: boolean): boolean;
62
+ braceExpand(): string[];
63
+ parse(pattern: string, isSub?: typeof SUBPARSE): ParseReturn | SubparseReturn;
64
+ makeRe(): false | MMRegExp;
65
+ match(f: string, partial?: boolean): boolean;
66
+ static defaults(def: MinimatchOptions): typeof Minimatch;
67
+ }