@rspack/core 0.6.5-canary-dc02c55-20240516004313 → 0.6.5-canary-b7b5c75-20240821125908
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/dist/Chunk.d.ts +1 -1
- package/dist/Chunk.js +1 -1
- package/dist/ChunkGroup.d.ts +1 -1
- package/dist/ChunkGroup.js +3 -3
- package/dist/Compilation.d.ts +65 -46
- package/dist/Compilation.js +222 -128
- package/dist/Compiler.d.ts +44 -75
- package/dist/Compiler.js +260 -301
- package/dist/Entrypoint.d.ts +1 -1
- package/dist/Entrypoint.js +1 -1
- package/dist/ExecuteModulePlugin.js +1 -1
- package/dist/Module.js +2 -2
- package/dist/MultiCompiler.d.ts +25 -10
- package/dist/MultiCompiler.js +3 -3
- package/dist/MultiStats.d.ts +1 -1
- package/dist/NormalModuleFactory.d.ts +1 -1
- package/dist/Stats.d.ts +2 -2
- package/dist/Watching.d.ts +9 -0
- package/dist/Watching.js +2 -12
- package/dist/builtin-loader/swc/index.d.ts +6 -6
- package/dist/builtin-loader/swc/index.js +3 -3
- package/dist/builtin-loader/swc/types.d.ts +2 -2
- package/dist/builtin-plugin/APIPlugin.d.ts +1 -1
- package/dist/builtin-plugin/ArrayPushCallbackChunkFormatPlugin.d.ts +1 -1
- package/dist/builtin-plugin/AssetModulesPlugin.d.ts +1 -1
- package/dist/builtin-plugin/AsyncWebAssemblyModulesPlugin.d.ts +1 -1
- package/dist/builtin-plugin/BannerPlugin.d.ts +2 -2
- package/dist/builtin-plugin/BannerPlugin.js +1 -1
- package/dist/builtin-plugin/BundlerInfoRspackPlugin.d.ts +1 -1
- package/dist/builtin-plugin/ChunkPrefetchPreloadPlugin.d.ts +1 -1
- package/dist/builtin-plugin/CommonJsChunkFormatPlugin.d.ts +1 -1
- package/dist/builtin-plugin/CopyRspackPlugin.d.ts +1 -1
- package/dist/builtin-plugin/CssModulesPlugin.d.ts +1 -1
- package/dist/builtin-plugin/DataUriPlugin.d.ts +1 -1
- package/dist/builtin-plugin/DefinePlugin.d.ts +1 -1
- package/dist/builtin-plugin/DeterministicChunkIdsPlugin.d.ts +1 -1
- package/dist/builtin-plugin/DeterministicModuleIdsPlugin.d.ts +1 -1
- package/dist/builtin-plugin/DynamicEntryPlugin.d.ts +1 -1
- package/dist/builtin-plugin/DynamicEntryPlugin.js +1 -1
- package/dist/builtin-plugin/ElectronTargetPlugin.d.ts +1 -1
- package/dist/builtin-plugin/EnableChunkLoadingPlugin.d.ts +1 -1
- package/dist/builtin-plugin/EnableLibraryPlugin.d.ts +1 -1
- package/dist/builtin-plugin/EnableWasmLoadingPlugin.d.ts +1 -1
- package/dist/builtin-plugin/EnsureChunkConditionsPlugin.d.ts +1 -1
- package/dist/builtin-plugin/EntryPlugin.d.ts +1 -1
- package/dist/builtin-plugin/EntryPlugin.js +1 -1
- package/dist/builtin-plugin/EvalDevToolModulePlugin.d.ts +1 -1
- package/dist/builtin-plugin/EvalSourceMapDevToolPlugin.d.ts +1 -1
- package/dist/builtin-plugin/ExternalsPlugin.d.ts +3 -3
- package/dist/builtin-plugin/FileUriPlugin.d.ts +1 -1
- package/dist/builtin-plugin/FlagDependencyExportsPlugin.d.ts +1 -1
- package/dist/builtin-plugin/FlagDependencyUsagePlugin.d.ts +1 -1
- package/dist/builtin-plugin/HtmlRspackPlugin.d.ts +2 -2
- package/dist/builtin-plugin/HtmlRspackPlugin.js +2 -2
- package/dist/builtin-plugin/HttpExternalsRspackPlugin.d.ts +1 -1
- package/dist/builtin-plugin/IgnorePlugin.d.ts +1 -1
- package/dist/builtin-plugin/InferAsyncModulesPlugin.d.ts +1 -1
- package/dist/builtin-plugin/JavascriptModulesPlugin.d.ts +1 -1
- package/dist/builtin-plugin/JsLoaderRspackPlugin.d.ts +1 -1
- package/dist/builtin-plugin/JsLoaderRspackPlugin.js +1 -1
- package/dist/builtin-plugin/JsonModulesPlugin.d.ts +1 -1
- package/dist/builtin-plugin/LimitChunkCountPlugin.d.ts +1 -1
- package/dist/builtin-plugin/MangleExportsPlugin.d.ts +1 -1
- package/dist/builtin-plugin/MergeDuplicateChunksPlugin.d.ts +1 -1
- package/dist/builtin-plugin/ModuleChunkFormatPlugin.d.ts +1 -1
- package/dist/builtin-plugin/ModuleConcatenationPlugin.d.ts +1 -1
- package/dist/builtin-plugin/NamedChunkIdsPlugin.d.ts +1 -1
- package/dist/builtin-plugin/NamedModuleIdsPlugin.d.ts +1 -1
- package/dist/builtin-plugin/NodeTargetPlugin.d.ts +1 -1
- package/dist/builtin-plugin/ProgressPlugin.d.ts +1 -1
- package/dist/builtin-plugin/ProvidePlugin.d.ts +1 -1
- package/dist/builtin-plugin/RealContentHashPlugin.d.ts +1 -1
- package/dist/builtin-plugin/RemoveEmptyChunksPlugin.d.ts +1 -1
- package/dist/builtin-plugin/RuntimeChunkPlugin.d.ts +1 -1
- package/dist/builtin-plugin/RuntimePlugin.d.ts +1 -1
- package/dist/builtin-plugin/SideEffectsFlagPlugin.d.ts +1 -1
- package/dist/builtin-plugin/SizeLimitsPlugin.d.ts +1 -1
- package/dist/builtin-plugin/SourceMapDevToolPlugin.d.ts +1 -1
- package/dist/builtin-plugin/SplitChunksPlugin.d.ts +2 -2
- package/dist/builtin-plugin/SplitChunksPlugin.js +4 -4
- package/dist/builtin-plugin/SwcCssMinimizerPlugin.d.ts +1 -1
- package/dist/builtin-plugin/SwcJsMinimizerPlugin.d.ts +1 -1
- package/dist/builtin-plugin/WarnCaseSensitiveModulesPlugin.d.ts +1 -1
- package/dist/builtin-plugin/WebWorkerTemplatePlugin.d.ts +1 -1
- package/dist/builtin-plugin/WorkerPlugin.d.ts +2 -2
- package/dist/builtin-plugin/base.d.ts +1 -1
- package/dist/builtin-plugin/css-extract/index.d.ts +4 -5
- package/dist/builtin-plugin/css-extract/loader.d.ts +1 -1
- package/dist/builtin-plugin/css-extract/loader.js +2 -2
- package/dist/builtin-plugin/index.d.ts +43 -43
- package/dist/builtin-plugin/index.js +43 -43
- package/dist/config/adapter.d.ts +2 -2
- package/dist/config/adapter.js +5 -6
- package/dist/config/adapterRuleUse.d.ts +1 -2
- package/dist/config/adapterRuleUse.js +2 -2
- package/dist/config/defaults.js +4 -6
- package/dist/config/index.d.ts +2 -2
- package/dist/config/index.js +2 -2
- package/dist/config/normalization.d.ts +2 -1
- package/dist/config/zod.d.ts +184 -258
- package/dist/config/zod.js +28 -8
- package/dist/container/ContainerPlugin.d.ts +1 -1
- package/dist/container/ContainerReferencePlugin.d.ts +1 -1
- package/dist/container/ContainerReferencePlugin.js +1 -1
- package/dist/container/ModuleFederationPlugin.js +1 -1
- package/dist/container/ModuleFederationPluginV1.d.ts +1 -1
- package/dist/container/ModuleFederationPluginV1.js +1 -1
- package/dist/container/ModuleFederationRuntimePlugin.d.ts +1 -1
- package/dist/exports.d.ts +30 -32
- package/dist/exports.js +17 -15
- package/dist/fileSystem.d.ts +8 -12
- package/dist/fileSystem.js +48 -25
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/loader-runner/index.js +13 -13
- package/dist/logging/Logger.d.ts +1 -1
- package/dist/logging/createConsoleLogger.js +14 -0
- package/dist/node/NodeEnvironmentPlugin.d.ts +1 -1
- package/dist/node/NodeEnvironmentPlugin.js +1 -1
- package/dist/node/nodeConsole.js +4 -0
- package/dist/rspack.d.ts +13 -4
- package/dist/rspack.js +8 -8
- package/dist/rspackOptionsApply.d.ts +10 -1
- package/dist/rspackOptionsApply.js +5 -14
- package/dist/sharing/ConsumeSharedPlugin.d.ts +1 -1
- package/dist/sharing/ConsumeSharedPlugin.js +1 -1
- package/dist/stats/DefaultStatsFactoryPlugin.js +2 -2
- package/dist/stats/StatsFactory.d.ts +2 -2
- package/dist/stats/StatsFactory.js +9 -0
- package/dist/stats/StatsPrinter.d.ts +1 -1
- package/dist/stats/statsFactoryUtils.d.ts +1 -1
- package/dist/util/comparators.d.ts +1 -1
- package/dist/util/createSource.d.ts +5 -0
- package/dist/util/createSource.js +65 -0
- package/dist/util/fs.d.ts +0 -64
- package/dist/util/fs.js +0 -122
- package/dist/util/index.d.ts +1 -2
- package/dist/util/index.js +11 -16
- package/package.json +5 -5
- package/dist/util/source.d.ts +0 -18
- package/dist/util/source.js +0 -66
package/dist/Compiler.d.ts
CHANGED
|
@@ -10,25 +10,23 @@
|
|
|
10
10
|
*/
|
|
11
11
|
import * as binding from "@rspack/binding";
|
|
12
12
|
import * as tapable from "tapable";
|
|
13
|
+
import * as liteTapable from "./lite-tapable";
|
|
13
14
|
import { Callback } from "tapable";
|
|
14
15
|
import type Watchpack from "../compiled/watchpack";
|
|
15
|
-
import { Compilation, CompilationParams } from "./Compilation";
|
|
16
16
|
import { EntryNormalized, OutputNormalized, RspackOptionsNormalized, RspackPluginInstance } from "./config";
|
|
17
|
-
import { ContextModuleFactory } from "./ContextModuleFactory";
|
|
18
|
-
import { rspack } from "./index";
|
|
19
|
-
import * as liteTapable from "./lite-tapable";
|
|
20
17
|
import { RuleSetCompiler } from "./RuleSetCompiler";
|
|
21
18
|
import { Stats } from "./Stats";
|
|
19
|
+
import { Compilation, CompilationParams } from "./Compilation";
|
|
20
|
+
import { ContextModuleFactory } from "./ContextModuleFactory";
|
|
22
21
|
import ResolverFactory = require("./ResolverFactory");
|
|
23
22
|
import Cache = require("./lib/Cache");
|
|
24
23
|
import CacheFacade = require("./lib/CacheFacade");
|
|
25
|
-
import { Source } from "webpack-sources";
|
|
26
|
-
import { Chunk } from "./Chunk";
|
|
27
|
-
import { FileSystemInfoEntry } from "./FileSystemInfo";
|
|
28
24
|
import { Logger } from "./logging/Logger";
|
|
29
25
|
import { NormalModuleFactory } from "./NormalModuleFactory";
|
|
30
|
-
import {
|
|
26
|
+
import { WatchFileSystem } from "./util/fs";
|
|
31
27
|
import { Watching } from "./Watching";
|
|
28
|
+
import { FileSystemInfoEntry } from "./FileSystemInfo";
|
|
29
|
+
import { Source } from "webpack-sources";
|
|
32
30
|
export interface AssetEmittedInfo {
|
|
33
31
|
content: Buffer;
|
|
34
32
|
source: Source;
|
|
@@ -38,6 +36,34 @@ export interface AssetEmittedInfo {
|
|
|
38
36
|
}
|
|
39
37
|
declare class Compiler {
|
|
40
38
|
#private;
|
|
39
|
+
webpack: typeof import("./rspack").rspack & typeof import("./exports") & {
|
|
40
|
+
rspack: typeof import("./rspack").rspack & typeof import("./exports") & any;
|
|
41
|
+
webpack: typeof import("./rspack").rspack & typeof import("./exports") & any;
|
|
42
|
+
};
|
|
43
|
+
compilation?: Compilation;
|
|
44
|
+
compilationParams?: CompilationParams;
|
|
45
|
+
builtinPlugins: binding.BuiltinPlugin[];
|
|
46
|
+
root: Compiler;
|
|
47
|
+
running: boolean;
|
|
48
|
+
idle: boolean;
|
|
49
|
+
resolverFactory: ResolverFactory;
|
|
50
|
+
infrastructureLogger: any;
|
|
51
|
+
watching?: Watching;
|
|
52
|
+
outputPath: string;
|
|
53
|
+
name?: string;
|
|
54
|
+
inputFileSystem: any;
|
|
55
|
+
outputFileSystem: typeof import("fs");
|
|
56
|
+
ruleSet: RuleSetCompiler;
|
|
57
|
+
watchFileSystem: WatchFileSystem;
|
|
58
|
+
intermediateFileSystem: any;
|
|
59
|
+
watchMode: boolean;
|
|
60
|
+
context: string;
|
|
61
|
+
cache: Cache;
|
|
62
|
+
compilerPath: string;
|
|
63
|
+
modifiedFiles?: ReadonlySet<string>;
|
|
64
|
+
removedFiles?: ReadonlySet<string>;
|
|
65
|
+
fileTimestamps?: ReadonlyMap<string, FileSystemInfoEntry | "ignore" | null>;
|
|
66
|
+
contextTimestamps?: ReadonlyMap<string, FileSystemInfoEntry | "ignore" | null>;
|
|
41
67
|
hooks: {
|
|
42
68
|
done: tapable.AsyncSeriesHook<Stats>;
|
|
43
69
|
afterDone: tapable.SyncHook<Stats>;
|
|
@@ -69,86 +95,29 @@ declare class Compiler {
|
|
|
69
95
|
finishMake: liteTapable.AsyncSeriesHook<[Compilation]>;
|
|
70
96
|
entryOption: tapable.SyncBailHook<[string, EntryNormalized], any>;
|
|
71
97
|
};
|
|
72
|
-
webpack: typeof rspack;
|
|
73
|
-
name?: string;
|
|
74
|
-
parentCompilation?: Compilation;
|
|
75
|
-
root: Compiler;
|
|
76
|
-
outputPath: string;
|
|
77
|
-
running: boolean;
|
|
78
|
-
idle: boolean;
|
|
79
|
-
resolverFactory: ResolverFactory;
|
|
80
|
-
infrastructureLogger: any;
|
|
81
|
-
watching?: Watching;
|
|
82
|
-
inputFileSystem: any;
|
|
83
|
-
intermediateFileSystem: any;
|
|
84
|
-
outputFileSystem: OutputFileSystem | null;
|
|
85
|
-
watchFileSystem: WatchFileSystem | null;
|
|
86
|
-
records: Record<string, any[]>;
|
|
87
|
-
modifiedFiles?: ReadonlySet<string>;
|
|
88
|
-
removedFiles?: ReadonlySet<string>;
|
|
89
|
-
fileTimestamps?: ReadonlyMap<string, FileSystemInfoEntry | "ignore" | null>;
|
|
90
|
-
contextTimestamps?: ReadonlyMap<string, FileSystemInfoEntry | "ignore" | null>;
|
|
91
|
-
fsStartTime?: number;
|
|
92
|
-
watchMode: boolean;
|
|
93
|
-
context: string;
|
|
94
|
-
cache: Cache;
|
|
95
|
-
compilerPath: string;
|
|
96
98
|
options: RspackOptionsNormalized;
|
|
99
|
+
parentCompilation?: Compilation;
|
|
97
100
|
constructor(context: string, options: RspackOptionsNormalized);
|
|
98
|
-
get recordsInputPath(): never;
|
|
99
|
-
get recordsOutputPath(): never;
|
|
100
|
-
get managedPaths(): never;
|
|
101
|
-
get immutablePaths(): never;
|
|
102
|
-
get _lastCompilation(): Compilation | undefined;
|
|
103
|
-
/**
|
|
104
|
-
* Note: This is not a webpack public API, maybe removed in future.
|
|
105
|
-
* @internal
|
|
106
|
-
*/
|
|
107
|
-
get __internal__builtinPlugins(): binding.BuiltinPlugin[];
|
|
108
|
-
/**
|
|
109
|
-
* Note: This is not a webpack public API, maybe removed in future.
|
|
110
|
-
* @internal
|
|
111
|
-
*/
|
|
112
|
-
get __internal__ruleSet(): RuleSetCompiler;
|
|
113
101
|
/**
|
|
114
102
|
* @param name - cache name
|
|
115
103
|
* @returns the cache facade instance
|
|
116
104
|
*/
|
|
117
105
|
getCache(name: string): CacheFacade;
|
|
118
|
-
/**
|
|
119
|
-
* @param name - name of the logger, or function called once to get the logger name
|
|
120
|
-
* @returns a logger with that name
|
|
121
|
-
*/
|
|
122
|
-
getInfrastructureLogger(name: string | (() => string)): Logger;
|
|
123
|
-
/**
|
|
124
|
-
* @param watchOptions - the watcher's options
|
|
125
|
-
* @param handler - signals when the call finishes
|
|
126
|
-
* @returns a compiler watcher
|
|
127
|
-
*/
|
|
128
|
-
watch(watchOptions: Watchpack.WatchOptions, handler: Callback<Error, Stats>): Watching;
|
|
129
|
-
/**
|
|
130
|
-
* @param callback - signals when the call finishes
|
|
131
|
-
*/
|
|
132
|
-
run(callback: Callback<Error, Stats>): void;
|
|
133
|
-
runAsChild(callback: (err?: null | Error, entries?: Chunk[], compilation?: Compilation) => any): void;
|
|
134
|
-
purgeInputFileSystem(): void;
|
|
135
|
-
/**
|
|
136
|
-
* @param compilation - the compilation
|
|
137
|
-
* @param compilerName - the compiler's name
|
|
138
|
-
* @param compilerIndex - the compiler's index
|
|
139
|
-
* @param outputOptions - the output options
|
|
140
|
-
* @param plugins - the plugins to apply
|
|
141
|
-
* @returns a child compiler
|
|
142
|
-
*/
|
|
143
106
|
createChildCompiler(compilation: Compilation, compilerName: string, compilerIndex: number, outputOptions: OutputNormalized, plugins: RspackPluginInstance[]): Compiler;
|
|
107
|
+
runAsChild(callback: any): void;
|
|
144
108
|
isChild(): boolean;
|
|
145
|
-
|
|
146
|
-
|
|
109
|
+
getInfrastructureLogger(name: string | Function): Logger;
|
|
110
|
+
run(callback: Callback<Error, Stats>): void;
|
|
147
111
|
/**
|
|
148
|
-
* Note: This is not a webpack public API, maybe removed in future.
|
|
112
|
+
* * Note: This is not a webpack public API, maybe removed in future.
|
|
149
113
|
* @internal
|
|
150
114
|
*/
|
|
151
115
|
__internal__rebuild(modifiedFiles?: ReadonlySet<string>, removedFiles?: ReadonlySet<string>, callback?: (error: Error | null) => void): void;
|
|
116
|
+
compile(callback: Callback<Error, Compilation>): void;
|
|
117
|
+
watch(watchOptions: Watchpack.WatchOptions, handler: Callback<Error, Stats>): Watching;
|
|
118
|
+
purgeInputFileSystem(): void;
|
|
119
|
+
close(callback: (error?: Error | null) => void): void;
|
|
120
|
+
getAsset(name: string): Buffer | null;
|
|
152
121
|
__internal__registerBuiltinPlugin(plugin: binding.BuiltinPlugin): void;
|
|
153
122
|
__internal__getModuleExecutionResult(id: number): any;
|
|
154
123
|
}
|