@rspack/core 1.4.1 → 1.4.3
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/README.md +1 -1
- package/compiled/tinypool/README.md +1 -1
- package/compiled/tinypool/dist/entry/worker.js +1 -0
- package/compiled/tinypool/dist/index.js +6 -2
- package/compiled/tinypool/package.json +1 -1
- package/dist/Chunk.d.ts +14 -34
- package/dist/ChunkGraph.d.ts +6 -21
- package/dist/Chunks.d.ts +0 -1
- package/dist/Compilation.d.ts +8 -7
- package/dist/Entrypoint.d.ts +2 -10
- package/dist/ErrorHelpers.d.ts +2 -0
- package/dist/RspackError.d.ts +1 -1
- package/dist/builtin-plugin/APIPlugin.d.ts +1 -2
- package/dist/builtin-plugin/ArrayPushCallbackChunkFormatPlugin.d.ts +1 -2
- package/dist/builtin-plugin/AssetModulesPlugin.d.ts +1 -2
- package/dist/builtin-plugin/AsyncWebAssemblyModulesPlugin.d.ts +1 -2
- package/dist/builtin-plugin/BannerPlugin.d.ts +3 -3
- package/dist/builtin-plugin/BundlerInfoRspackPlugin.d.ts +1 -2
- package/dist/builtin-plugin/ChunkPrefetchPreloadPlugin.d.ts +1 -2
- package/dist/builtin-plugin/CommonJsChunkFormatPlugin.d.ts +1 -2
- package/dist/builtin-plugin/ContextReplacementPlugin.d.ts +1 -2
- package/dist/builtin-plugin/CopyRspackPlugin.d.ts +2 -2
- package/dist/builtin-plugin/CssChunkingPlugin.d.ts +1 -1
- package/dist/builtin-plugin/CssModulesPlugin.d.ts +1 -2
- package/dist/builtin-plugin/DataUriPlugin.d.ts +1 -2
- package/dist/builtin-plugin/DefinePlugin.d.ts +1 -2
- package/dist/builtin-plugin/DllEntryPlugin.d.ts +1 -2
- package/dist/builtin-plugin/DllReferenceAgencyPlugin.d.ts +2 -2
- package/dist/builtin-plugin/ElectronTargetPlugin.d.ts +1 -2
- package/dist/builtin-plugin/EnableChunkLoadingPlugin.d.ts +1 -2
- package/dist/builtin-plugin/EnableWasmLoadingPlugin.d.ts +1 -2
- package/dist/builtin-plugin/EnsureChunkConditionsPlugin.d.ts +1 -2
- package/dist/builtin-plugin/EntryPlugin.d.ts +2 -2
- package/dist/builtin-plugin/EvalDevToolModulePlugin.d.ts +2 -2
- package/dist/builtin-plugin/EvalSourceMapDevToolPlugin.d.ts +2 -2
- package/dist/builtin-plugin/FetchCompileAsyncWasmPlugin.d.ts +1 -2
- package/dist/builtin-plugin/FileUriPlugin.d.ts +1 -2
- package/dist/builtin-plugin/FlagAllModulesAsUsedPlugin.d.ts +1 -2
- package/dist/builtin-plugin/FlagDependencyExportsPlugin.d.ts +1 -2
- package/dist/builtin-plugin/HttpExternalsRspackPlugin.d.ts +1 -2
- package/dist/builtin-plugin/IgnorePlugin.d.ts +2 -2
- package/dist/builtin-plugin/InferAsyncModulesPlugin.d.ts +1 -2
- package/dist/builtin-plugin/JsLoaderRspackPlugin.d.ts +1 -2
- package/dist/builtin-plugin/JsonModulesPlugin.d.ts +1 -2
- package/dist/builtin-plugin/LibManifestPlugin.d.ts +1 -2
- package/dist/builtin-plugin/LightningCssMinimizerRspackPlugin.d.ts +1 -2
- package/dist/builtin-plugin/LimitChunkCountPlugin.d.ts +1 -2
- package/dist/builtin-plugin/MergeDuplicateChunksPlugin.d.ts +1 -2
- package/dist/builtin-plugin/ModuleChunkFormatPlugin.d.ts +1 -2
- package/dist/builtin-plugin/ModuleInfoHeaderPlugin.d.ts +1 -2
- package/dist/builtin-plugin/NamedChunkIdsPlugin.d.ts +1 -2
- package/dist/builtin-plugin/NamedModuleIdsPlugin.d.ts +1 -2
- package/dist/builtin-plugin/NoEmitOnErrorsPlugin.d.ts +1 -2
- package/dist/builtin-plugin/NodeTargetPlugin.d.ts +1 -2
- package/dist/builtin-plugin/OccurrenceChunkIdsPlugin.d.ts +2 -2
- package/dist/builtin-plugin/ProgressPlugin.d.ts +2 -2
- package/dist/builtin-plugin/ProvidePlugin.d.ts +1 -2
- package/dist/builtin-plugin/RealContentHashPlugin.d.ts +1 -2
- package/dist/builtin-plugin/RemoveDuplicateModulesPlugin.d.ts +1 -2
- package/dist/builtin-plugin/RemoveEmptyChunksPlugin.d.ts +1 -2
- package/dist/builtin-plugin/RsdoctorPlugin.d.ts +2 -2
- package/dist/builtin-plugin/RslibPlugin.d.ts +2 -2
- package/dist/builtin-plugin/RstestPlugin.d.ts +2 -2
- package/dist/builtin-plugin/RuntimeChunkPlugin.d.ts +2 -2
- package/dist/builtin-plugin/RuntimePlugin.d.ts +2 -2
- package/dist/builtin-plugin/SideEffectsFlagPlugin.d.ts +1 -2
- package/dist/builtin-plugin/SizeLimitsPlugin.d.ts +1 -2
- package/dist/builtin-plugin/SourceMapDevToolPlugin.d.ts +2 -2
- package/dist/builtin-plugin/SubresourceIntegrityPlugin.d.ts +2 -2
- package/dist/builtin-plugin/SwcJsMinimizerPlugin.d.ts +1 -2
- package/dist/builtin-plugin/WarnCaseSensitiveModulesPlugin.d.ts +1 -2
- package/dist/builtin-plugin/base.d.ts +29 -5
- package/dist/builtin-plugin/html-plugin/plugin.d.ts +2 -2
- package/dist/builtin-plugin/index.d.ts +1 -1
- package/dist/builtin-plugin/lazy-compilation/lazyCompilation.d.ts +1 -2
- package/dist/container/ModuleFederationRuntimePlugin.d.ts +1 -2
- package/dist/exports.d.ts +3 -1
- package/dist/index.js +210 -358
- package/dist/lib/WebpackError.d.ts +1 -1
- package/dist/loader-runner/ModuleError.d.ts +7 -0
- package/dist/loader-runner/ModuleWarning.d.ts +7 -0
- package/dist/stats/StatsFactory.d.ts +2 -2
- package/dist/stats/statsFactoryUtils.d.ts +2 -2
- package/dist/trace/index.d.ts +7 -1
- package/dist/util/index.d.ts +0 -2
- package/package.json +5 -3
- package/dist/ChunkGroup.d.ts +0 -33
@@ -7,7 +7,7 @@
|
|
7
7
|
* Copyright (c) JS Foundation and other contributors
|
8
8
|
* https://github.com/webpack/webpack/blob/main/LICENSE
|
9
9
|
*/
|
10
|
-
import type { JsStats, JsStatsCompilation, JsStatsError
|
10
|
+
import type { JsStats, JsStatsCompilation, JsStatsError } from "@rspack/binding";
|
11
11
|
import { HookMap, SyncBailHook, SyncWaterfallHook } from "@rspack/lite-tapable";
|
12
12
|
import type { Compilation } from "../Compilation";
|
13
13
|
import { type GroupConfig } from "../util/smartGrouping";
|
@@ -16,7 +16,7 @@ export type KnownStatsFactoryContext = {
|
|
16
16
|
makePathsRelative?: ((arg0: string) => string) | undefined;
|
17
17
|
compilation?: Compilation | undefined;
|
18
18
|
cachedGetErrors?: ((arg0: Compilation) => JsStatsError[]) | undefined;
|
19
|
-
cachedGetWarnings?: ((arg0: Compilation) =>
|
19
|
+
cachedGetWarnings?: ((arg0: Compilation) => JsStatsError[]) | undefined;
|
20
20
|
getStatsCompilation: (compilation: Compilation) => JsStatsCompilation;
|
21
21
|
getInner: (compilation: Compilation) => JsStats;
|
22
22
|
};
|
@@ -285,7 +285,7 @@ export type SimpleExtractors = {
|
|
285
285
|
chunk: ExtractorsByOption<binding.JsStatsChunk, KnownStatsChunk>;
|
286
286
|
chunkOrigin: ExtractorsByOption<JsOriginRecord, StatsChunkOrigin>;
|
287
287
|
error: ExtractorsByOption<binding.JsStatsError, StatsError>;
|
288
|
-
warning: ExtractorsByOption<binding.
|
288
|
+
warning: ExtractorsByOption<binding.JsStatsError, StatsError>;
|
289
289
|
moduleTraceItem: ExtractorsByOption<binding.JsStatsModuleTrace, StatsModuleTraceItem>;
|
290
290
|
moduleTraceDependency: ExtractorsByOption<binding.JsStatsModuleTraceDependency, StatsModuleTraceDependency>;
|
291
291
|
};
|
@@ -321,5 +321,5 @@ export declare const errorsSpaceLimit: (errors: StatsError[], max: number) => {
|
|
321
321
|
errors: StatsError[];
|
322
322
|
filtered: number;
|
323
323
|
};
|
324
|
-
export declare const warningFromStatsWarning: (warning: binding.
|
324
|
+
export declare const warningFromStatsWarning: (warning: binding.JsStatsError) => Error;
|
325
325
|
export {};
|
package/dist/trace/index.d.ts
CHANGED
@@ -13,17 +13,23 @@ export interface ChromeEvent {
|
|
13
13
|
type MakeOptional<T, K extends keyof T> = Omit<T, K> & Partial<Pick<T, K>>;
|
14
14
|
type PartialChromeEvent = MakeOptional<ChromeEvent, "ts" | "ph">;
|
15
15
|
export declare class JavaScriptTracer {
|
16
|
+
static state: "uninitialized" | "on" | "off";
|
16
17
|
static startTime: bigint;
|
17
18
|
static events: ChromeEvent[];
|
18
19
|
static layer: string;
|
19
20
|
static output: string;
|
20
21
|
static session: import("node:inspector").Session;
|
21
22
|
private static counter;
|
23
|
+
/**
|
24
|
+
* only first call take effects, subsequent calls will be ignored
|
25
|
+
* @param layer tracing layer
|
26
|
+
* @param output tracing output file path
|
27
|
+
*/
|
22
28
|
static initJavaScriptTrace(layer: string, output: string): Promise<void>;
|
23
29
|
static uuid(): number;
|
24
30
|
static initCpuProfiler(): void;
|
25
31
|
/**
|
26
|
-
*
|
32
|
+
* only first call take effects, subsequent calls will be ignored
|
27
33
|
* @param isEnd true means we are at the end of tracing,and can append ']' to close the json
|
28
34
|
* @returns
|
29
35
|
*/
|
package/dist/util/index.d.ts
CHANGED
@@ -1,10 +1,8 @@
|
|
1
|
-
import type { JsRspackError } from "@rspack/binding";
|
2
1
|
import type { LoaderObject } from "../loader-runner";
|
3
2
|
export declare function isNil(value: unknown): value is null | undefined;
|
4
3
|
export declare const toBuffer: (bufLike: string | Buffer | Uint8Array) => Buffer;
|
5
4
|
export declare const toObject: (input: string | Buffer | object) => object;
|
6
5
|
export declare function serializeObject(map: string | object | undefined | null): Buffer | undefined;
|
7
|
-
export declare function concatErrorMsgAndStack(err: Error | JsRspackError | string): JsRspackError;
|
8
6
|
export declare function indent(str: string, prefix: string): string;
|
9
7
|
export declare function stringifyLoaderObject(o: LoaderObject): string;
|
10
8
|
export declare function asArray<T>(item: T[]): T[];
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@rspack/core",
|
3
|
-
"version": "1.4.
|
3
|
+
"version": "1.4.3",
|
4
4
|
"webpackVersion": "5.75.0",
|
5
5
|
"license": "MIT",
|
6
6
|
"description": "The fast Rust-based web bundler with webpack-compatible API",
|
@@ -37,6 +37,7 @@
|
|
37
37
|
"directory": "packages/rspack"
|
38
38
|
},
|
39
39
|
"devDependencies": {
|
40
|
+
"@ast-grep/napi": "^0.37.0",
|
40
41
|
"@rslib/core": "0.10.0",
|
41
42
|
"@swc/core": "1.12.0",
|
42
43
|
"@swc/types": "0.1.22",
|
@@ -57,7 +58,7 @@
|
|
57
58
|
"dependencies": {
|
58
59
|
"@module-federation/runtime-tools": "0.15.0",
|
59
60
|
"@rspack/lite-tapable": "1.0.1",
|
60
|
-
"@rspack/binding": "1.4.
|
61
|
+
"@rspack/binding": "1.4.3"
|
61
62
|
},
|
62
63
|
"peerDependencies": {
|
63
64
|
"@swc/helpers": ">=0.5.1"
|
@@ -68,9 +69,10 @@
|
|
68
69
|
}
|
69
70
|
},
|
70
71
|
"scripts": {
|
71
|
-
"build": "rslib build && npm run prepare-container-runtime",
|
72
|
+
"build": "rslib build && npm run prepare-container-runtime && npm run codmod",
|
72
73
|
"dev": "rslib build --watch",
|
73
74
|
"prepare-container-runtime": "node ./scripts/prepare-container-runtime.js",
|
75
|
+
"codmod": "node ./scripts/codmod/index.js",
|
74
76
|
"doc-coverage": "tsx ./scripts/check-documentation-coverage.ts",
|
75
77
|
"api-extractor": "api-extractor run --verbose",
|
76
78
|
"api-extractor:ci": "api-extractor run --verbose || diff temp/core.api.md etc/core.api.md"
|
package/dist/ChunkGroup.d.ts
DELETED
@@ -1,33 +0,0 @@
|
|
1
|
-
import type { JsChunkGroup } from "@rspack/binding";
|
2
|
-
import { Chunk } from "./Chunk";
|
3
|
-
import type { Module } from "./Module";
|
4
|
-
export declare class ChunkGroup {
|
5
|
-
#private;
|
6
|
-
readonly chunks: ReadonlyArray<Chunk>;
|
7
|
-
readonly index?: number;
|
8
|
-
readonly name?: string;
|
9
|
-
readonly origins: ReadonlyArray<ChunkGroupOrigin>;
|
10
|
-
readonly childrenIterable: Set<ChunkGroup>;
|
11
|
-
static __from_binding(binding: JsChunkGroup): ChunkGroup;
|
12
|
-
protected constructor(inner: JsChunkGroup);
|
13
|
-
getFiles(): ReadonlyArray<string>;
|
14
|
-
getParents(): ReadonlyArray<ChunkGroup>;
|
15
|
-
isInitial(): boolean;
|
16
|
-
getModulePreOrderIndex(module: Module): number | null;
|
17
|
-
getModulePostOrderIndex(module: Module): number | null;
|
18
|
-
}
|
19
|
-
interface ChunkGroupOrigin {
|
20
|
-
module?: Module;
|
21
|
-
request?: string;
|
22
|
-
loc?: {
|
23
|
-
start: {
|
24
|
-
line: number;
|
25
|
-
column: number;
|
26
|
-
};
|
27
|
-
end?: {
|
28
|
-
line: number;
|
29
|
-
column: number;
|
30
|
-
};
|
31
|
-
} | string;
|
32
|
-
}
|
33
|
-
export {};
|