@rspack/core 2.0.1 → 2.0.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/compiled/http-proxy-middleware/index.d.ts +5 -30
- package/compiled/http-proxy-middleware/package.json +1 -1
- package/compiled/watchpack/index.d.ts +2 -218
- package/compiled/watchpack/index.js +1387 -939
- package/compiled/watchpack/package.json +8 -1
- package/compiled/watchpack/types/DirectoryWatcher.d.ts +333 -0
- package/compiled/watchpack/types/LinkResolver.d.ts +10 -0
- package/compiled/watchpack/types/getWatcherManager.d.ts +62 -0
- package/compiled/watchpack/types/index.d.ts +261 -0
- package/compiled/watchpack/types/reducePlan.d.ts +34 -0
- package/compiled/watchpack/types/watchEventSource.d.ts +53 -0
- package/compiled/watchpack/types/watchpack.d.ts +2 -0
- package/dist/Compilation.d.ts +3 -3
- package/dist/MultiCompiler.d.ts +1 -1
- package/dist/RuntimeGlobals.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/FlagDependencyUsagePlugin.d.ts +1 -1
- package/dist/builtin-plugin/HttpUriPlugin.d.ts +1 -1
- package/dist/builtin-plugin/JavascriptModulesPlugin.d.ts +1 -1
- package/dist/builtin-plugin/MangleExportsPlugin.d.ts +1 -1
- package/dist/builtin-plugin/ModuleConcatenationPlugin.d.ts +1 -1
- package/dist/builtin-plugin/NaturalChunkIdsPlugin.d.ts +1 -1
- package/dist/builtin-plugin/NaturalModuleIdsPlugin.d.ts +1 -1
- package/dist/builtin-plugin/SideEffectsFlagPlugin.d.ts +1 -1
- package/dist/builtin-plugin/SizeLimitsPlugin.d.ts +2 -2
- package/dist/builtin-plugin/SplitChunksPlugin.d.ts +1 -1
- package/dist/builtin-plugin/WorkerPlugin.d.ts +1 -1
- package/dist/builtin-plugin/rsc/RscServerPlugin.d.ts +8 -1
- package/dist/builtin-plugin/rsc/index.d.ts +6 -6
- package/dist/config/target.d.ts +1 -1
- package/dist/config/types.d.ts +4 -4
- package/dist/exports.d.ts +1 -1
- package/dist/index.js +35 -25
- package/dist/lib/CacheFacade.d.ts +1 -1
- package/dist/runtime/cssExtractHmr.d.ts +2 -2
- package/dist/runtime/moduleFederationDefaultRuntime.d.ts +1 -1
- package/dist/sharing/ConsumeSharedPlugin.d.ts +2 -2
- package/dist/sharing/ProvideSharedPlugin.d.ts +4 -4
- package/dist/sharing/SharePlugin.d.ts +4 -4
- package/dist/stats/statsFactoryUtils.d.ts +3 -3
- package/dist/util/comparators.d.ts +1 -1
- package/dist/util/createHash.d.ts +1 -1
- package/dist/util/identifier.d.ts +35 -8
- package/module.d.ts +6 -0
- package/package.json +8 -9
|
@@ -39,7 +39,7 @@ export declare function createProvideShareOptions(normalizedSharedOptions: Norma
|
|
|
39
39
|
singleton: boolean | undefined;
|
|
40
40
|
requiredVersion: string | false | undefined;
|
|
41
41
|
strictVersion: boolean | undefined;
|
|
42
|
-
treeShakingMode: "
|
|
42
|
+
treeShakingMode: "runtime-infer" | "server-calc" | undefined;
|
|
43
43
|
};
|
|
44
44
|
}[];
|
|
45
45
|
export declare function createConsumeShareOptions(normalizedSharedOptions: NormalizedSharedOptions): {
|
|
@@ -52,7 +52,7 @@ export declare function createConsumeShareOptions(normalizedSharedOptions: Norma
|
|
|
52
52
|
singleton: boolean | undefined;
|
|
53
53
|
packageName: string | undefined;
|
|
54
54
|
eager: boolean | undefined;
|
|
55
|
-
treeShakingMode: "
|
|
55
|
+
treeShakingMode: "runtime-infer" | "server-calc" | undefined;
|
|
56
56
|
};
|
|
57
57
|
}[];
|
|
58
58
|
export declare class SharePlugin {
|
|
@@ -67,7 +67,7 @@ export declare class SharePlugin {
|
|
|
67
67
|
singleton: boolean | undefined;
|
|
68
68
|
packageName: string | undefined;
|
|
69
69
|
eager: boolean | undefined;
|
|
70
|
-
treeShakingMode: "
|
|
70
|
+
treeShakingMode: "runtime-infer" | "server-calc" | undefined;
|
|
71
71
|
};
|
|
72
72
|
}[];
|
|
73
73
|
_provides: {
|
|
@@ -79,7 +79,7 @@ export declare class SharePlugin {
|
|
|
79
79
|
singleton: boolean | undefined;
|
|
80
80
|
requiredVersion: string | false | undefined;
|
|
81
81
|
strictVersion: boolean | undefined;
|
|
82
|
-
treeShakingMode: "
|
|
82
|
+
treeShakingMode: "runtime-infer" | "server-calc" | undefined;
|
|
83
83
|
};
|
|
84
84
|
}[];
|
|
85
85
|
_enhanced: boolean;
|
|
@@ -77,9 +77,9 @@ export type KnownStatsAsset = {
|
|
|
77
77
|
related?: StatsAsset[];
|
|
78
78
|
chunkNames?: (string | number)[];
|
|
79
79
|
chunkIdHints?: (string | number)[];
|
|
80
|
-
chunks?: (string | null | undefined)[];
|
|
80
|
+
chunks?: (string | number | null | undefined)[];
|
|
81
81
|
auxiliaryChunkNames?: (string | number)[];
|
|
82
|
-
auxiliaryChunks?: (string | null | undefined)[];
|
|
82
|
+
auxiliaryChunks?: (string | number | null | undefined)[];
|
|
83
83
|
auxiliaryChunkIdHints?: (string | number)[];
|
|
84
84
|
filteredRelated?: number;
|
|
85
85
|
isOverSizeLimit?: boolean;
|
|
@@ -108,7 +108,7 @@ export type KnownStatsModule = {
|
|
|
108
108
|
orphan?: boolean;
|
|
109
109
|
id?: string | number | null;
|
|
110
110
|
issuerId?: string | number | null;
|
|
111
|
-
chunks?: string[];
|
|
111
|
+
chunks?: (string | number)[];
|
|
112
112
|
assets?: string[];
|
|
113
113
|
dependent?: boolean;
|
|
114
114
|
issuer?: string;
|
|
@@ -12,5 +12,5 @@ type Selector<A, B> = (input: A) => B;
|
|
|
12
12
|
export declare const concatComparators: (...comps: Comparator[]) => Comparator;
|
|
13
13
|
export declare const compareIds: <T = string | number>(a: T, b: T) => -1 | 0 | 1;
|
|
14
14
|
export declare const compareSelect: <T, R>(getter: Selector<T, R>, comparator: Comparator) => Comparator;
|
|
15
|
-
export declare const compareNumbers: (a: number, b: number) =>
|
|
15
|
+
export declare const compareNumbers: (a: number, b: number) => -1 | 0 | 1;
|
|
16
16
|
export {};
|
|
@@ -13,4 +13,4 @@ import Hash from './hash/index.js';
|
|
|
13
13
|
* @param algorithm the algorithm name or a constructor creating a hash
|
|
14
14
|
* @returns the hash
|
|
15
15
|
*/
|
|
16
|
-
export declare const createHash: (algorithm:
|
|
16
|
+
export declare const createHash: (algorithm: 'xxhash64' | 'md4' | 'native-md4' | (string & {}) | (new () => Hash)) => Hash;
|
|
@@ -7,25 +7,52 @@ interface ParsedResource {
|
|
|
7
7
|
type ParsedResourceWithoutFragment = Omit<ParsedResource, 'fragment'>;
|
|
8
8
|
export declare const makePathsRelative: {
|
|
9
9
|
(context: string, identifier: string, associatedObjectForCache: object | undefined): string;
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
/**
|
|
11
|
+
* @param {Object=} associatedObjectForCache an object to which the cache will be attached
|
|
12
|
+
* @returns {function(string, string): string} cached function
|
|
13
|
+
*/
|
|
14
|
+
bindCache: (associatedObjectForCache: object | undefined) => ((arg0: string, arg1: string) => string);
|
|
15
|
+
/**
|
|
16
|
+
* @param {string} context context used to create relative path
|
|
17
|
+
* @param {Object=} associatedObjectForCache an object to which the cache will be attached
|
|
18
|
+
* @returns {function(string): string} cached function
|
|
19
|
+
*/
|
|
20
|
+
bindContextCache: (context: string, associatedObjectForCache: object | undefined) => ((arg0: string) => string);
|
|
12
21
|
};
|
|
13
22
|
export declare const contextify: {
|
|
14
23
|
(context: string, identifier: string, associatedObjectForCache: object | undefined): string;
|
|
15
|
-
|
|
16
|
-
|
|
24
|
+
/**
|
|
25
|
+
* @param {Object=} associatedObjectForCache an object to which the cache will be attached
|
|
26
|
+
* @returns {function(string, string): string} cached function
|
|
27
|
+
*/
|
|
28
|
+
bindCache: (associatedObjectForCache: object | undefined) => ((arg0: string, arg1: string) => string);
|
|
29
|
+
/**
|
|
30
|
+
* @param {string} context context used to create relative path
|
|
31
|
+
* @param {Object=} associatedObjectForCache an object to which the cache will be attached
|
|
32
|
+
* @returns {function(string): string} cached function
|
|
33
|
+
*/
|
|
34
|
+
bindContextCache: (context: string, associatedObjectForCache: object | undefined) => ((arg0: string) => string);
|
|
17
35
|
};
|
|
18
36
|
export declare const absolutify: {
|
|
19
37
|
(context: string, identifier: string, associatedObjectForCache: object | undefined): string;
|
|
20
|
-
|
|
21
|
-
|
|
38
|
+
/**
|
|
39
|
+
* @param {Object=} associatedObjectForCache an object to which the cache will be attached
|
|
40
|
+
* @returns {function(string, string): string} cached function
|
|
41
|
+
*/
|
|
42
|
+
bindCache: (associatedObjectForCache: object | undefined) => ((arg0: string, arg1: string) => string);
|
|
43
|
+
/**
|
|
44
|
+
* @param {string} context context used to create relative path
|
|
45
|
+
* @param {Object=} associatedObjectForCache an object to which the cache will be attached
|
|
46
|
+
* @returns {function(string): string} cached function
|
|
47
|
+
*/
|
|
48
|
+
bindContextCache: (context: string, associatedObjectForCache: object | undefined) => ((arg0: string) => string);
|
|
22
49
|
};
|
|
23
50
|
export declare const parseResource: {
|
|
24
51
|
(str: string, associatedObjectForCache?: object): ParsedResource;
|
|
25
|
-
bindCache(associatedObjectForCache: object)
|
|
52
|
+
bindCache: (associatedObjectForCache: object) => (str: string) => ParsedResource;
|
|
26
53
|
};
|
|
27
54
|
export declare const parseResourceWithoutFragment: {
|
|
28
55
|
(str: string, associatedObjectForCache?: object): ParsedResourceWithoutFragment;
|
|
29
|
-
bindCache(associatedObjectForCache: object)
|
|
56
|
+
bindCache: (associatedObjectForCache: object) => (str: string) => ParsedResourceWithoutFragment;
|
|
30
57
|
};
|
|
31
58
|
export {};
|
package/module.d.ts
CHANGED
|
@@ -235,6 +235,12 @@ interface ImportMeta {
|
|
|
235
235
|
mode?: 'sync' | 'eager' | 'weak' | 'lazy' | 'lazy-once';
|
|
236
236
|
},
|
|
237
237
|
) => Rspack.Context;
|
|
238
|
+
/**
|
|
239
|
+
* Available in server components when using the RSC plugins.
|
|
240
|
+
*/
|
|
241
|
+
rspackRsc?: {
|
|
242
|
+
loadCss(): any;
|
|
243
|
+
};
|
|
238
244
|
}
|
|
239
245
|
|
|
240
246
|
declare const __resourceQuery: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rspack/core",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.3",
|
|
4
4
|
"webpackVersion": "5.75.0",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"description": "Fast Rust-based bundler for the web with a modernized webpack API",
|
|
@@ -40,26 +40,25 @@
|
|
|
40
40
|
"@ast-grep/napi": "^0.42.1",
|
|
41
41
|
"@napi-rs/wasm-runtime": "1.1.4",
|
|
42
42
|
"@rsbuild/plugin-node-polyfill": "^1.4.4",
|
|
43
|
-
"@rslib/core": "0.21.
|
|
43
|
+
"@rslib/core": "^0.21.4",
|
|
44
44
|
"@rspack/lite-tapable": "1.1.0",
|
|
45
45
|
"@swc/types": "0.1.26",
|
|
46
|
-
"@types/node": "^20.19.
|
|
47
|
-
"@types/watchpack": "^2.4.5",
|
|
46
|
+
"@types/node": "^20.19.40",
|
|
48
47
|
"browserslist-load-config": "^1.0.1",
|
|
49
48
|
"browserslist-to-es-version": "^1.4.1",
|
|
50
49
|
"connect-next": "^4.0.1",
|
|
51
|
-
"enhanced-resolve": "5.21.
|
|
52
|
-
"http-proxy-middleware": "^4.0.0
|
|
53
|
-
"memfs": "4.
|
|
50
|
+
"enhanced-resolve": "5.21.2",
|
|
51
|
+
"http-proxy-middleware": "^4.0.0",
|
|
52
|
+
"memfs": "4.57.2",
|
|
54
53
|
"open": "^11.0.0",
|
|
55
54
|
"prebundle": "^1.6.4",
|
|
56
55
|
"tinypool": "^2.1.0",
|
|
57
56
|
"typescript": "^6.0.3",
|
|
58
|
-
"watchpack": "2.
|
|
57
|
+
"watchpack": "2.5.1",
|
|
59
58
|
"webpack-sources": "3.3.4"
|
|
60
59
|
},
|
|
61
60
|
"dependencies": {
|
|
62
|
-
"@rspack/binding": "2.0.
|
|
61
|
+
"@rspack/binding": "2.0.3"
|
|
63
62
|
},
|
|
64
63
|
"peerDependencies": {
|
|
65
64
|
"@module-federation/runtime-tools": "^0.24.1 || ^2.0.0",
|