Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade glob@7 to glob@10 to resolve deprecation warnings #1442

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
79 changes: 79 additions & 0 deletions flow-typed/npm/glob_v7.x.x.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
// flow-typed signature: d2a519d7d007e9ba3e5bf2ac3ff76eca
// flow-typed version: f243e51ed7/glob_v7.x.x/flow_>=v0.104.x

declare module "glob" {
declare type MinimatchOptions = {|
debug?: boolean,
nobrace?: boolean,
noglobstar?: boolean,
dot?: boolean,
noext?: boolean,
nocase?: boolean,
nonull?: boolean,
matchBase?: boolean,
nocomment?: boolean,
nonegate?: boolean,
flipNegate?: boolean
|};

declare type Options = {|
...MinimatchOptions,
cwd?: string,
root?: string,
nomount?: boolean,
mark?: boolean,
nosort?: boolean,
stat?: boolean,
silent?: boolean,
strict?: boolean,
cache?: { [path: string]: boolean | "DIR" | "FILE" | $ReadOnlyArray<string>, ... },
statCache?: { [path: string]: boolean | { isDirectory(): boolean, ... } | void, ... },
symlinks?: { [path: string]: boolean | void, ... },
realpathCache?: { [path: string]: string, ... },
sync?: boolean,
nounique?: boolean,
nodir?: boolean,
ignore?: string | $ReadOnlyArray<string>,
follow?: boolean,
realpath?: boolean,
absolute?: boolean
|};

/**
* Called when an error occurs, or matches are found
* err
* matches: filenames found matching the pattern
*/
declare type CallBack = (err: ?Error, matches: Array<string>) => void;

declare class Glob extends events$EventEmitter {
constructor(pattern: string): this;
constructor(pattern: string, callback: CallBack): this;
constructor(pattern: string, options: Options, callback: CallBack): this;

minimatch: {...};
options: Options;
aborted: boolean;
cache: { [path: string]: boolean | "DIR" | "FILE" | $ReadOnlyArray<string>, ... };
statCache: { [path: string]: boolean | { isDirectory(): boolean, ... } | void, ... };
symlinks: { [path: string]: boolean | void, ... };
realpathCache: { [path: string]: string, ... };
found: Array<string>;

pause(): void;
resume(): void;
abort(): void;
}

declare class GlobModule {
Glob: Class<Glob>;

(pattern: string, callback: CallBack): void;
(pattern: string, options: Options, callback: CallBack): void;

hasMagic(pattern: string, options?: Options): boolean;
sync(pattern: string, options?: Options): Array<string>;
}

declare module.exports: GlobModule;
}
Loading