@rspack-debug/browser 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/dist/Compilation.d.ts +3 -3
- package/dist/MultiCompiler.d.ts +1 -1
- package/dist/RuntimeGlobals.d.ts +1 -1
- package/dist/browser/fs.d.ts +1 -7
- package/dist/browser/index.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 +451 -429
- package/dist/lib/CacheFacade.d.ts +1 -1
- package/dist/napi-binding.d.ts +32 -14
- 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/package.json +2 -3
|
@@ -134,6 +134,6 @@ export declare class CacheFacade {
|
|
|
134
134
|
* @param computer function to compute the value if not cached
|
|
135
135
|
* @returns promise with the data
|
|
136
136
|
*/
|
|
137
|
-
providePromise<T>(identifier: string, etag: Etag | null, computer: () => Promise<T> | T): Promise<
|
|
137
|
+
providePromise<T>(identifier: string, etag: Etag | null, computer: () => Promise<T> | T): Promise<T | {} | null>;
|
|
138
138
|
}
|
|
139
139
|
export default CacheFacade;
|
package/dist/napi-binding.d.ts
CHANGED
|
@@ -122,8 +122,8 @@ export declare class AsyncDependenciesBlock {
|
|
|
122
122
|
|
|
123
123
|
export declare class Chunk {
|
|
124
124
|
get name(): string | undefined
|
|
125
|
-
get id(): string | undefined
|
|
126
|
-
get ids(): Array<string>
|
|
125
|
+
get id(): string | number | undefined
|
|
126
|
+
get ids(): Array<string | number>
|
|
127
127
|
get idNameHints(): Array<string>
|
|
128
128
|
get filenameTemplate(): string | undefined
|
|
129
129
|
get cssFilenameTemplate(): string | undefined
|
|
@@ -216,6 +216,7 @@ export declare class Dependency {
|
|
|
216
216
|
get type(): string
|
|
217
217
|
get category(): string
|
|
218
218
|
get request(): string | undefined
|
|
219
|
+
get attributes(): Record<string, string> | undefined
|
|
219
220
|
get critical(): boolean
|
|
220
221
|
set critical(val: boolean)
|
|
221
222
|
get ids(): Array<string> | undefined
|
|
@@ -741,7 +742,6 @@ export interface JsBuildMeta {
|
|
|
741
742
|
exportsType?: undefined | 'unset' | 'default' | 'namespace' | 'flagged' | 'dynamic'
|
|
742
743
|
defaultObject?: undefined | 'false' | 'redirect' | 'redirect-warn'
|
|
743
744
|
sideEffectFree?: boolean
|
|
744
|
-
exportsFinalName?: Array<[string, string]> | undefined
|
|
745
745
|
}
|
|
746
746
|
|
|
747
747
|
export interface JsBuildTimeExecutionOption {
|
|
@@ -1055,9 +1055,15 @@ export interface JsRscClientPluginOptions {
|
|
|
1055
1055
|
coordinator: JsCoordinator
|
|
1056
1056
|
}
|
|
1057
1057
|
|
|
1058
|
+
export interface JsRscCssLinkOptions {
|
|
1059
|
+
precedence?: string | boolean
|
|
1060
|
+
props?: Record<string, string>
|
|
1061
|
+
}
|
|
1062
|
+
|
|
1058
1063
|
export interface JsRscServerPluginOptions {
|
|
1059
1064
|
coordinator: JsCoordinator
|
|
1060
|
-
|
|
1065
|
+
cssLink?: JsRscCssLinkOptions | undefined | null
|
|
1066
|
+
onServerComponentChanges?: (() => void | Promise<void>) | undefined | null
|
|
1061
1067
|
onManifest?: ((arg: string) => Promise<undefined>) | undefined | null
|
|
1062
1068
|
}
|
|
1063
1069
|
|
|
@@ -1321,10 +1327,10 @@ export interface JsStatsAsset {
|
|
|
1321
1327
|
emitted: boolean
|
|
1322
1328
|
chunkNames: Array<string>
|
|
1323
1329
|
chunkIdHints: Array<string>
|
|
1324
|
-
chunks: Array<string | undefined | null>
|
|
1330
|
+
chunks: Array<string | number | undefined | null>
|
|
1325
1331
|
auxiliaryChunkNames: Array<string>
|
|
1326
1332
|
auxiliaryChunkIdHints: Array<string>
|
|
1327
|
-
auxiliaryChunks: Array<string | undefined | null>
|
|
1333
|
+
auxiliaryChunks: Array<string | number | undefined | null>
|
|
1328
1334
|
}
|
|
1329
1335
|
|
|
1330
1336
|
export interface JsStatsAssetInfo {
|
|
@@ -1361,17 +1367,17 @@ export interface JsStatsChunk {
|
|
|
1361
1367
|
type: string
|
|
1362
1368
|
files: Array<string>
|
|
1363
1369
|
auxiliaryFiles: Array<string>
|
|
1364
|
-
id?: string
|
|
1370
|
+
id?: string | number | undefined
|
|
1365
1371
|
idHints: Array<string>
|
|
1366
1372
|
hash?: string
|
|
1367
1373
|
entry: boolean
|
|
1368
1374
|
initial: boolean
|
|
1369
1375
|
names: Array<string>
|
|
1370
1376
|
size: number
|
|
1371
|
-
parents?: Array<string>
|
|
1372
|
-
children?: Array<string>
|
|
1373
|
-
siblings?: Array<string>
|
|
1374
|
-
childrenByOrder: Record<string, Array<string>>
|
|
1377
|
+
parents?: Array<string | number> | undefined
|
|
1378
|
+
children?: Array<string | number> | undefined
|
|
1379
|
+
siblings?: Array<string | number> | undefined
|
|
1380
|
+
childrenByOrder: Record<string, Array<string | number>>
|
|
1375
1381
|
runtime: Array<string>
|
|
1376
1382
|
reason?: string
|
|
1377
1383
|
rendered: boolean
|
|
@@ -1382,7 +1388,7 @@ export interface JsStatsChunk {
|
|
|
1382
1388
|
|
|
1383
1389
|
export interface JsStatsChunkGroup {
|
|
1384
1390
|
name: string
|
|
1385
|
-
chunks: Array<string>
|
|
1391
|
+
chunks: Array<string | number>
|
|
1386
1392
|
assets: Array<JsStatsChunkGroupAsset>
|
|
1387
1393
|
assetsSize: number
|
|
1388
1394
|
auxiliaryAssets?: Array<JsStatsChunkGroupAsset>
|
|
@@ -1471,7 +1477,7 @@ export interface JsStatsModuleCommonAttributes {
|
|
|
1471
1477
|
failed?: boolean
|
|
1472
1478
|
errors?: number
|
|
1473
1479
|
warnings?: number
|
|
1474
|
-
chunks?: Array<string>
|
|
1480
|
+
chunks?: Array<string | number> | undefined
|
|
1475
1481
|
assets?: Array<string>
|
|
1476
1482
|
reasons?: Array<JsStatsModuleReason>
|
|
1477
1483
|
providedExports?: Array<string>
|
|
@@ -2910,6 +2916,12 @@ export interface RawRslibPluginOptions {
|
|
|
2910
2916
|
* @default `false`
|
|
2911
2917
|
*/
|
|
2912
2918
|
autoCjsNodeBuiltin?: boolean
|
|
2919
|
+
/** Emit isolated declaration files for modules transformed by `builtin:swc-loader` */
|
|
2920
|
+
emitDts?: RawSwcEmitDtsOptions
|
|
2921
|
+
}
|
|
2922
|
+
|
|
2923
|
+
export interface RawRstestDynamicImportOriginOptions {
|
|
2924
|
+
functionName?: string
|
|
2913
2925
|
}
|
|
2914
2926
|
|
|
2915
2927
|
export interface RawRstestPluginOptions {
|
|
@@ -2919,6 +2931,7 @@ export interface RawRstestPluginOptions {
|
|
|
2919
2931
|
manualMockRoot: string
|
|
2920
2932
|
preserveNewUrl?: Array<string>
|
|
2921
2933
|
globals?: boolean
|
|
2934
|
+
injectDynamicImportOrigin?: boolean | { functionName?: string }
|
|
2922
2935
|
}
|
|
2923
2936
|
|
|
2924
2937
|
export interface RawRuleSetCondition {
|
|
@@ -3029,6 +3042,11 @@ export interface RawSubresourceIntegrityPluginOptions {
|
|
|
3029
3042
|
htmlPlugin: "JavaScript" | "Native" | "Disabled"
|
|
3030
3043
|
}
|
|
3031
3044
|
|
|
3045
|
+
export interface RawSwcEmitDtsOptions {
|
|
3046
|
+
rootDir: string
|
|
3047
|
+
declarationDir: string
|
|
3048
|
+
}
|
|
3049
|
+
|
|
3032
3050
|
export interface RawSwcJsMinimizerOptions {
|
|
3033
3051
|
ecma: any
|
|
3034
3052
|
compress: any
|
|
@@ -3284,7 +3302,7 @@ export interface TsconfigOptions {
|
|
|
3284
3302
|
*/
|
|
3285
3303
|
configFile: string
|
|
3286
3304
|
/**
|
|
3287
|
-
* Support for
|
|
3305
|
+
* Support for TypeScript Project References.
|
|
3288
3306
|
*
|
|
3289
3307
|
* * `'auto'`: use the `references` field from tsconfig of `config_file`.
|
|
3290
3308
|
* * `string[]`: manually provided relative or absolute path.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export declare function normalizeUrl(url: string): string;
|
|
2
|
-
|
|
3
|
-
declare function cssReload(moduleId: string, options: Record<string, any>):
|
|
2
|
+
type DebouncedFunction<T extends (...args: any[]) => any> = (...args: Parameters<T>) => void;
|
|
3
|
+
declare function cssReload(moduleId: string, options: Record<string, any>): DebouncedFunction<() => void>;
|
|
4
4
|
export { cssReload };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export default function
|
|
1
|
+
export default function (): void;
|
|
@@ -31,7 +31,7 @@ export declare function normalizeConsumeShareOptions(consumes: Consumes, shareSc
|
|
|
31
31
|
packageName: string | undefined;
|
|
32
32
|
singleton: boolean;
|
|
33
33
|
eager: boolean;
|
|
34
|
-
treeShakingMode: "
|
|
34
|
+
treeShakingMode: "runtime-infer" | "server-calc" | undefined;
|
|
35
35
|
}][];
|
|
36
36
|
export declare class ConsumeSharedPlugin extends RspackBuiltinPlugin {
|
|
37
37
|
name: BuiltinPluginName;
|
|
@@ -45,7 +45,7 @@ export declare class ConsumeSharedPlugin extends RspackBuiltinPlugin {
|
|
|
45
45
|
packageName: string | undefined;
|
|
46
46
|
singleton: boolean;
|
|
47
47
|
eager: boolean;
|
|
48
|
-
treeShakingMode: "
|
|
48
|
+
treeShakingMode: "runtime-infer" | "server-calc" | undefined;
|
|
49
49
|
}][];
|
|
50
50
|
enhanced: boolean;
|
|
51
51
|
};
|
|
@@ -35,14 +35,14 @@ export declare function normalizeProvideShareOptions<Enhanced extends boolean =
|
|
|
35
35
|
shareScope: ShareScope;
|
|
36
36
|
eager: boolean;
|
|
37
37
|
} | {
|
|
38
|
-
singleton: boolean | undefined;
|
|
39
|
-
requiredVersion: string | false | undefined;
|
|
40
|
-
strictVersion: boolean | undefined;
|
|
41
|
-
treeShakingMode: "server-calc" | "runtime-infer" | undefined;
|
|
42
38
|
shareKey: string;
|
|
43
39
|
version: string | false | undefined;
|
|
44
40
|
shareScope: ShareScope;
|
|
45
41
|
eager: boolean;
|
|
42
|
+
singleton: boolean | undefined;
|
|
43
|
+
requiredVersion: string | false | undefined;
|
|
44
|
+
strictVersion: boolean | undefined;
|
|
45
|
+
treeShakingMode: "runtime-infer" | "server-calc" | undefined;
|
|
46
46
|
}][];
|
|
47
47
|
export declare class ProvideSharedPlugin<Enhanced extends boolean = false> extends RspackBuiltinPlugin {
|
|
48
48
|
name: BuiltinPluginName;
|
|
@@ -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';
|
|
|
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rspack-debug/browser",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.3",
|
|
4
4
|
"webpackVersion": "5.75.0",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"description": "Rspack for running in the browser. This is still in early stage and may not follow the semver.",
|
|
@@ -34,8 +34,7 @@
|
|
|
34
34
|
"@napi-rs/wasm-runtime": "1.1.4",
|
|
35
35
|
"@rspack/lite-tapable": "1.1.0",
|
|
36
36
|
"@swc/types": "0.1.26",
|
|
37
|
-
"
|
|
38
|
-
"memfs": "4.53.0",
|
|
37
|
+
"memfs": "4.57.2",
|
|
39
38
|
"webpack-sources": "3.3.4"
|
|
40
39
|
},
|
|
41
40
|
"peerDependencies": {
|