Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F32179211
D15005.1765072647.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
7 KB
Referenced Files
None
Subscribers
None
D15005.1765072647.diff
View Options
diff --git a/lib/flow-typed/npm/webpack_v5.x.x.js b/lib/flow-typed/npm/webpack_v5.x.x.js
--- a/lib/flow-typed/npm/webpack_v5.x.x.js
+++ b/lib/flow-typed/npm/webpack_v5.x.x.js
@@ -1,5 +1,5 @@
-// flow-typed signature: 029c45f838294c42f5621a2fbc0e2222
-// flow-typed version: d55f290df6/webpack_v5.x.x/flow_>=v0.104.x
+// flow-typed signature: 1ba8ade30b849c0d757d83265696dc84
+// flow-typed version: f7fd492eb0/webpack_v5.x.x/flow_>=v0.104.x
declare module 'webpack' {
import typeof { Server } from 'http';
@@ -13,11 +13,34 @@
declare type WebpackError = $WebpackError;
+ declare type WebpackLogger = {|
+ getChildLogger: (arg0: string | (() => string)) => WebpackLogger,
+ error(...args: $ReadOnlyArray<any>): void,
+ warn(...args: $ReadOnlyArray<any>): void,
+ info(...args: $ReadOnlyArray<any>): void,
+ log(...args: $ReadOnlyArray<any>): void,
+ debug(...args: $ReadOnlyArray<any>): void,
+ assert(assertion: any, ...args: $ReadOnlyArray<any>): void,
+ trace(): void,
+ clear(): void,
+ status(...args: $ReadOnlyArray<any>): void,
+ group(...args: $ReadOnlyArray<any>): void,
+ groupCollapsed(...args: $ReadOnlyArray<any>): void,
+ groupEnd(...args: $ReadOnlyArray<any>): void,
+ profile(label?: any): void,
+ profileEnd(label?: any): void,
+ time(label?: any): void,
+ timeLog(label?: any): void,
+ timeEnd(label?: any): void,
+ timeAggregate(label?: any): void,
+ timeAggregateEnd(label?: any): void,
+ |};
+
declare interface Stats {
hasErrors(): boolean;
hasWarnings(): boolean;
toJson(options?: StatsOptions): any;
- toString(options?: { ...StatsOptions, colors?: boolean, ... }): string;
+ toString(options?: { ...StatsOptionsObject, colors?: boolean, ... }): string;
}
declare type Callback = (error: WebpackError, stats: Stats) => void;
@@ -192,11 +215,10 @@
declare type WebpackPluginFunction = (compiler: WebpackCompiler) => void;
- declare type WebpackPluginInstance = {
- [k: string]: any,
- apply: WebpackPluginFunction,
- ...
- };
+ declare interface WebpackPluginInstance {
+ apply: WebpackPluginFunction;
+ [k: string]: any;
+ }
declare type OptimizationSplitChunksOptions = {
automaticNameDelimiter?: string,
@@ -378,10 +400,7 @@
declare type FilterTypes = FilterItemTypes | Array<FilterItemTypes>;
- declare type StatsOptions =
- | boolean
- | ('none' | 'errors-only' | 'minimal' | 'normal' | 'detailed' | 'verbose')
- | {
+ declare type StatsOptionsObject = {
all?: boolean,
assets?: boolean,
assetsSort?: string,
@@ -436,6 +455,11 @@
...
};
+ declare type StatsOptions =
+ | boolean
+ | ('none' | 'errors-only' | 'minimal' | 'normal' | 'detailed' | 'verbose')
+ | StatsOptionsObject;
+
declare type WatchOptions = {
aggregateTimeout?: number,
ignored?: { [k: string]: any, ... },
@@ -613,27 +637,18 @@
};
declare class EnvironmentPlugin {
- constructor(env: { [string]: mixed, ... } | string[]): $ElementType<
- $NonMaybeType<$PropertyType<ResolveOptions, 'plugins'>>,
- number
- >;
+ constructor(env: { [string]: mixed, ... } | string[]): $NonMaybeType<ResolveOptions['plugins']>[number];
}
declare class DefinePlugin {
- constructor({ [string]: string, ... }): $ElementType<
- $NonMaybeType<$PropertyType<ResolveOptions, 'plugins'>>,
- number
- >;
+ constructor({ [string]: string, ... }): $NonMaybeType<ResolveOptions['plugins']>[number];
}
declare class IgnorePlugin {
constructor(RegExp | {|
resourceRegExp: RegExp,
contextRegExp?: RegExp,
- |}, void | RegExp): $ElementType<
- $NonMaybeType<$PropertyType<ResolveOptions, 'plugins'>>,
- number
- >;
+ |}, void | RegExp): $NonMaybeType<ResolveOptions['plugins']>[number];
}
declare class SourceMapDevToolPlugin {
@@ -656,27 +671,114 @@
noSources?: ?boolean,
publicPath?: ?string,
fileContext?: ?string,
- |}): $ElementType<
- $NonMaybeType<$PropertyType<ResolveOptions, 'plugins'>>,
- number
- >;
+ |}): $NonMaybeType<ResolveOptions['plugins']>[number];
}
declare class HotModuleReplacementPlugin {
- constructor(): $ElementType<
- $NonMaybeType<$PropertyType<ResolveOptions, 'plugins'>>,
- number
- >;
+ constructor(): $NonMaybeType<ResolveOptions['plugins']>[number];
}
declare class ContextReplacementPlugin {
constructor(
resourceRegExp: RegExp,
newContentRegExp?: RegExp
- ): $ElementType<
- $NonMaybeType<$PropertyType<ResolveOptions, 'plugins'>>,
- number
- >;
+ ): $NonMaybeType<ResolveOptions['plugins']>[number];
+ }
+
+ declare type ProgressHandler = (percentage: number, msg: string, ...args: $ReadOnlyArray<string>) => void;
+
+ /**
+ * Options object for the ProgressPlugin.
+ */
+ declare type ProgressPluginOptions = {|
+ /**
+ * Show active modules count and one active module in progress message.
+ */
+ activeModules?: boolean,
+
+ /**
+ * Show dependencies count in progress message.
+ */
+ dependencies?: boolean,
+
+ /**
+ * Minimum dependencies count to start with. For better progress calculation. Default: 10000.
+ */
+ dependenciesCount?: number,
+
+ /**
+ * Show entries count in progress message.
+ */
+ entries?: boolean,
+
+ /**
+ * Function that executes for every progress step.
+ */
+ handler?: ProgressHandler,
+
+ /**
+ * Show modules count in progress message.
+ */
+ modules?: boolean,
+
+ /**
+ * Minimum modules count to start with. For better progress calculation. Default: 5000.
+ */
+ modulesCount?: number,
+
+ /**
+ * Collect percent algorithm. By default it calculates by a median from modules, entries and dependencies percent.
+ */
+ percentBy?: null | "entries" | "modules" | "dependencies",
+
+ /**
+ * Collect profile data for progress steps. Default: false.
+ */
+ profile?: null | boolean,
+ |};
+
+ declare type ProgressPluginArgument =
+ | ProgressPluginOptions
+ | ProgressHandler;
+
+ declare class ProgressPlugin {
+ constructor(options?: ProgressPluginArgument): $NonMaybeType<ResolveOptions['plugins']>[number];
+ profile?: null | boolean;
+ handler?: (percentage: number, msg: string, ...args: $ReadOnlyArray<string>) => void;
+ modulesCount?: number;
+ dependenciesCount?: number;
+ showEntries?: boolean;
+ showModules?: boolean;
+ showDependencies?: boolean;
+ showActiveModules?: boolean;
+ percentBy?: null | "entries" | "modules" | "dependencies";
+ apply(compiler: WebpackCompiler | WebpackMultiCompiler): void;
+ static getReporter(
+ compiler: WebpackCompiler
+ ): void | ((p: number, ...args: $ReadOnlyArray<string>) => void);
+ static defaultOptions: {|
+ profile: boolean;
+ modulesCount: number;
+ dependenciesCount: number;
+ modules: boolean;
+ dependencies: boolean;
+ activeModules: boolean;
+ entries: boolean;
+ |};
+ static createDefaultHandler: (
+ profile: void | null | boolean,
+ logger: WebpackLogger
+ ) => (percentage: number, msg: string, ...args: $ReadOnlyArray<string>) => void;
+ }
+
+ declare class ProvidePlugin {
+ constructor(definitions: { [key: string]: string | string[] }): $NonMaybeType<ResolveOptions['plugins']>[number];
+ definitions: { [key: string]: string | string[] };
+
+ /**
+ * Apply the plugin
+ */
+ apply(compiler: WebpackCompiler | WebpackMultiCompiler): void;
}
declare function builder(
@@ -695,6 +797,8 @@
SourceMapDevToolPlugin: typeof SourceMapDevToolPlugin,
HotModuleReplacementPlugin: typeof HotModuleReplacementPlugin,
ContextReplacementPlugin: typeof ContextReplacementPlugin,
+ ProgressPlugin: typeof ProgressPlugin,
+ ProvidePlugin: typeof ProvidePlugin,
...
};
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Dec 7, 1:57 AM (2 h, 47 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5842045
Default Alt Text
D15005.1765072647.diff (7 KB)
Attached To
Mode
D15005: [Flow262][skip-ci] Update webpack@5 flow-typed package
Attached
Detach File
Event Timeline
Log In to Comment