@rspack-canary/browser 1.7.2-canary-f4c77913-20260107173928 → 1.7.2-canary-29642b28-20260108182846
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 +2 -2
- package/dist/RuntimeModule.d.ts +2 -1
- package/dist/index.mjs +57 -22
- package/dist/napi-binding.d.ts +2 -0
- package/dist/rspack.wasm32-wasi.wasm +0 -0
- package/package.json +1 -1
package/dist/Compilation.d.ts
CHANGED
|
@@ -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 { AssetInfo, ChunkGroup, Dependency, ExternalObject, JsCompilation
|
|
10
|
+
import type { AssetInfo, ChunkGroup, Dependency, ExternalObject, JsCompilation } from '@rspack/binding';
|
|
11
11
|
import binding from '@rspack/binding';
|
|
12
12
|
export type { AssetInfo } from '@rspack/binding';
|
|
13
13
|
import * as liteTapable from '@rspack/lite-tapable';
|
|
@@ -185,7 +185,7 @@ export declare class Compilation {
|
|
|
185
185
|
Set<string>
|
|
186
186
|
]>;
|
|
187
187
|
runtimeRequirementInTree: liteTapable.HookMap<liteTapable.SyncBailHook<[Chunk, Set<string>], void>>;
|
|
188
|
-
runtimeModule: liteTapable.SyncHook<[
|
|
188
|
+
runtimeModule: liteTapable.SyncHook<[RuntimeModule, Chunk]>;
|
|
189
189
|
seal: liteTapable.SyncHook<[]>;
|
|
190
190
|
afterSeal: liteTapable.AsyncSeriesHook<[], void>;
|
|
191
191
|
needAdditionalPass: liteTapable.SyncBailHook<[], boolean>;
|
package/dist/RuntimeModule.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { JsAddingRuntimeModule } from '@rspack/binding';
|
|
1
|
+
import type { JsAddingRuntimeModule, JsRuntimeModule } from '@rspack/binding';
|
|
2
2
|
import type { Chunk } from './Chunk';
|
|
3
3
|
import type { ChunkGraph } from './ChunkGraph';
|
|
4
4
|
import type { Compilation } from './Compilation';
|
|
@@ -30,3 +30,4 @@ export declare class RuntimeModule {
|
|
|
30
30
|
shouldIsolate(): boolean;
|
|
31
31
|
generate(): string;
|
|
32
32
|
}
|
|
33
|
+
export declare function createRenderedRuntimeModule(module: JsRuntimeModule): RuntimeModule;
|
package/dist/index.mjs
CHANGED
|
@@ -50957,6 +50957,38 @@ RuntimeModule_define_property(RuntimeModule, "STAGE_NORMAL", 0);
|
|
|
50957
50957
|
RuntimeModule_define_property(RuntimeModule, "STAGE_BASIC", 5);
|
|
50958
50958
|
RuntimeModule_define_property(RuntimeModule, "STAGE_ATTACH", 10);
|
|
50959
50959
|
RuntimeModule_define_property(RuntimeModule, "STAGE_TRIGGER", 20);
|
|
50960
|
+
function createRenderedRuntimeModule(module1) {
|
|
50961
|
+
const RuntimeModuleClass = {
|
|
50962
|
+
[module1.constructorName]: class extends RuntimeModule {
|
|
50963
|
+
get constructorName() {
|
|
50964
|
+
return module1.constructorName;
|
|
50965
|
+
}
|
|
50966
|
+
get moduleIdentifier() {
|
|
50967
|
+
return module1.moduleIdentifier;
|
|
50968
|
+
}
|
|
50969
|
+
get source() {
|
|
50970
|
+
return this._source;
|
|
50971
|
+
}
|
|
50972
|
+
identifier() {
|
|
50973
|
+
return module1.moduleIdentifier;
|
|
50974
|
+
}
|
|
50975
|
+
readableIdentifier() {
|
|
50976
|
+
return module1.moduleIdentifier;
|
|
50977
|
+
}
|
|
50978
|
+
shouldIsolate() {
|
|
50979
|
+
return module1.isolate;
|
|
50980
|
+
}
|
|
50981
|
+
generate() {
|
|
50982
|
+
return this._source?.source.toString('utf-8') || '';
|
|
50983
|
+
}
|
|
50984
|
+
constructor(){
|
|
50985
|
+
super(module1.name, module1.stage), RuntimeModule_define_property(this, "_source", void 0);
|
|
50986
|
+
this._source = module1.source;
|
|
50987
|
+
}
|
|
50988
|
+
}
|
|
50989
|
+
}[module1.constructorName];
|
|
50990
|
+
return new RuntimeModuleClass();
|
|
50991
|
+
}
|
|
50960
50992
|
function Stats_check_private_redeclaration(obj, privateCollection) {
|
|
50961
50993
|
if (privateCollection.has(obj)) throw new TypeError("Cannot initialize the same private elements twice on an object");
|
|
50962
50994
|
}
|
|
@@ -55843,7 +55875,7 @@ class ExternalsPlugin extends RspackBuiltinPlugin {
|
|
|
55843
55875
|
if ('string' == typeof item || item instanceof RegExp) return item;
|
|
55844
55876
|
if ('function' == typeof item) {
|
|
55845
55877
|
const processResolveResult = ExternalsPlugin_class_private_field_get(this, _processResolveResult);
|
|
55846
|
-
return async (ctx)=>
|
|
55878
|
+
return async (ctx)=>new Promise((resolve, reject)=>{
|
|
55847
55879
|
const data = ctx.data();
|
|
55848
55880
|
const promise = item({
|
|
55849
55881
|
request: data.request,
|
|
@@ -56537,35 +56569,35 @@ const createRsdoctorPluginHooksRegisters = (getCompiler, createTap)=>({
|
|
|
56537
56569
|
return RsdoctorPlugin.getCompilationHooks(getCompiler().__internal__get_compilation()).moduleGraph;
|
|
56538
56570
|
}, function(queried) {
|
|
56539
56571
|
return async function(data) {
|
|
56540
|
-
return
|
|
56572
|
+
return queried.promise(data);
|
|
56541
56573
|
};
|
|
56542
56574
|
}),
|
|
56543
56575
|
registerRsdoctorPluginChunkGraphTaps: createTap(external_rspack_wasi_browser_js_.RegisterJsTapKind.RsdoctorPluginChunkGraph, function() {
|
|
56544
56576
|
return RsdoctorPlugin.getCompilationHooks(getCompiler().__internal__get_compilation()).chunkGraph;
|
|
56545
56577
|
}, function(queried) {
|
|
56546
56578
|
return async function(data) {
|
|
56547
|
-
return
|
|
56579
|
+
return queried.promise(data);
|
|
56548
56580
|
};
|
|
56549
56581
|
}),
|
|
56550
56582
|
registerRsdoctorPluginModuleIdsTaps: createTap(external_rspack_wasi_browser_js_.RegisterJsTapKind.RsdoctorPluginModuleIds, function() {
|
|
56551
56583
|
return RsdoctorPlugin.getCompilationHooks(getCompiler().__internal__get_compilation()).moduleIds;
|
|
56552
56584
|
}, function(queried) {
|
|
56553
56585
|
return async function(data) {
|
|
56554
|
-
return
|
|
56586
|
+
return queried.promise(data);
|
|
56555
56587
|
};
|
|
56556
56588
|
}),
|
|
56557
56589
|
registerRsdoctorPluginModuleSourcesTaps: createTap(external_rspack_wasi_browser_js_.RegisterJsTapKind.RsdoctorPluginModuleSources, function() {
|
|
56558
56590
|
return RsdoctorPlugin.getCompilationHooks(getCompiler().__internal__get_compilation()).moduleSources;
|
|
56559
56591
|
}, function(queried) {
|
|
56560
56592
|
return async function(data) {
|
|
56561
|
-
return
|
|
56593
|
+
return queried.promise(data);
|
|
56562
56594
|
};
|
|
56563
56595
|
}),
|
|
56564
56596
|
registerRsdoctorPluginAssetsTaps: createTap(external_rspack_wasi_browser_js_.RegisterJsTapKind.RsdoctorPluginAssets, function() {
|
|
56565
56597
|
return RsdoctorPlugin.getCompilationHooks(getCompiler().__internal__get_compilation()).assets;
|
|
56566
56598
|
}, function(queried) {
|
|
56567
56599
|
return async function(data) {
|
|
56568
|
-
return
|
|
56600
|
+
return queried.promise(data);
|
|
56569
56601
|
};
|
|
56570
56602
|
})
|
|
56571
56603
|
});
|
|
@@ -58172,7 +58204,7 @@ const applybundlerInfoDefaults = (rspackFuture, library)=>{
|
|
|
58172
58204
|
if ('object' == typeof rspackFuture) {
|
|
58173
58205
|
D(rspackFuture, 'bundlerInfo', {});
|
|
58174
58206
|
if ('object' == typeof rspackFuture.bundlerInfo) {
|
|
58175
|
-
D(rspackFuture.bundlerInfo, 'version', "1.7.2-canary-
|
|
58207
|
+
D(rspackFuture.bundlerInfo, 'version', "1.7.2-canary-29642b28-20260108182846");
|
|
58176
58208
|
D(rspackFuture.bundlerInfo, 'bundler', 'rspack');
|
|
58177
58209
|
D(rspackFuture.bundlerInfo, 'force', !library);
|
|
58178
58210
|
}
|
|
@@ -59776,13 +59808,13 @@ class ThreadsafeIntermediateNodeFS extends ThreadsafeOutputNodeFS {
|
|
|
59776
59808
|
this.close = memoizeFn(()=>util_0_default().promisify(fs.close.bind(fs)));
|
|
59777
59809
|
this.write = memoizeFn(()=>{
|
|
59778
59810
|
const writeFn = util_0_default().promisify(fs.write.bind(fs));
|
|
59779
|
-
return async (fd, content, position)=>
|
|
59811
|
+
return async (fd, content, position)=>writeFn(fd, content, {
|
|
59780
59812
|
position
|
|
59781
59813
|
});
|
|
59782
59814
|
});
|
|
59783
59815
|
this.writeAll = memoizeFn(()=>{
|
|
59784
59816
|
const writeFn = util_0_default().promisify(fs.writeFile.bind(fs));
|
|
59785
|
-
return async (fd, content)=>
|
|
59817
|
+
return async (fd, content)=>writeFn(fd, content);
|
|
59786
59818
|
});
|
|
59787
59819
|
this.read = memoizeFn(()=>{
|
|
59788
59820
|
const readFn = fs.read.bind(fs);
|
|
@@ -60440,7 +60472,7 @@ class MultiStats {
|
|
|
60440
60472
|
return obj;
|
|
60441
60473
|
});
|
|
60442
60474
|
if (childOptions.version) {
|
|
60443
|
-
obj.rspackVersion = "1.7.2-canary-
|
|
60475
|
+
obj.rspackVersion = "1.7.2-canary-29642b28-20260108182846";
|
|
60444
60476
|
obj.version = "5.75.0";
|
|
60445
60477
|
}
|
|
60446
60478
|
if (childOptions.hash) obj.hash = obj.children.map((j)=>j.hash).join('');
|
|
@@ -62272,7 +62304,7 @@ const SIMPLE_EXTRACTORS = {
|
|
|
62272
62304
|
},
|
|
62273
62305
|
version: (object)=>{
|
|
62274
62306
|
object.version = "5.75.0";
|
|
62275
|
-
object.rspackVersion = "1.7.2-canary-
|
|
62307
|
+
object.rspackVersion = "1.7.2-canary-29642b28-20260108182846";
|
|
62276
62308
|
},
|
|
62277
62309
|
env: (object, _compilation, _context, { _env })=>{
|
|
62278
62310
|
object.env = _env;
|
|
@@ -64300,8 +64332,11 @@ const createCompilationHooksRegisters = (getCompiler, createTap, createMapTap)=>
|
|
|
64300
64332
|
return getCompiler().__internal__get_compilation().hooks.runtimeModule;
|
|
64301
64333
|
}, function(queried) {
|
|
64302
64334
|
return function({ module: module1, chunk }) {
|
|
64335
|
+
const runtimeModule = createRenderedRuntimeModule(module1);
|
|
64336
|
+
const compilation = getCompiler().__internal__get_compilation();
|
|
64337
|
+
runtimeModule.attach(compilation, chunk, compilation.chunkGraph);
|
|
64303
64338
|
const originSource = module1.source?.source;
|
|
64304
|
-
queried.call(
|
|
64339
|
+
queried.call(runtimeModule, chunk);
|
|
64305
64340
|
const newSource = module1.source?.source;
|
|
64306
64341
|
if (newSource && newSource !== originSource) return module1;
|
|
64307
64342
|
};
|
|
@@ -64377,7 +64412,7 @@ const createCompilationHooksRegisters = (getCompiler, createTap, createMapTap)=>
|
|
|
64377
64412
|
return getCompiler().__internal__get_compilation().hooks.finishModules;
|
|
64378
64413
|
}, function(queried) {
|
|
64379
64414
|
return async function() {
|
|
64380
|
-
return
|
|
64415
|
+
return queried.promise(getCompiler().__internal__get_compilation().modules);
|
|
64381
64416
|
};
|
|
64382
64417
|
}),
|
|
64383
64418
|
registerCompilationOptimizeModulesTaps: createTap(external_rspack_wasi_browser_js_["default"].RegisterJsTapKind.CompilationOptimizeModules, function() {
|
|
@@ -64398,14 +64433,14 @@ const createCompilationHooksRegisters = (getCompiler, createTap, createMapTap)=>
|
|
|
64398
64433
|
return getCompiler().__internal__get_compilation().hooks.optimizeTree;
|
|
64399
64434
|
}, function(queried) {
|
|
64400
64435
|
return async function() {
|
|
64401
|
-
return
|
|
64436
|
+
return queried.promise(getCompiler().__internal__get_compilation().chunks, getCompiler().__internal__get_compilation().modules);
|
|
64402
64437
|
};
|
|
64403
64438
|
}),
|
|
64404
64439
|
registerCompilationOptimizeChunkModulesTaps: createTap(external_rspack_wasi_browser_js_["default"].RegisterJsTapKind.CompilationOptimizeChunkModules, function() {
|
|
64405
64440
|
return getCompiler().__internal__get_compilation().hooks.optimizeChunkModules;
|
|
64406
64441
|
}, function(queried) {
|
|
64407
64442
|
return async function() {
|
|
64408
|
-
return
|
|
64443
|
+
return queried.promise(getCompiler().__internal__get_compilation().chunks, getCompiler().__internal__get_compilation().modules);
|
|
64409
64444
|
};
|
|
64410
64445
|
}),
|
|
64411
64446
|
registerCompilationChunkHashTaps: createTap(external_rspack_wasi_browser_js_["default"].RegisterJsTapKind.CompilationChunkHash, function() {
|
|
@@ -64431,7 +64466,7 @@ const createCompilationHooksRegisters = (getCompiler, createTap, createMapTap)=>
|
|
|
64431
64466
|
return getCompiler().__internal__get_compilation().hooks.processAssets;
|
|
64432
64467
|
}, function(queried) {
|
|
64433
64468
|
return async function() {
|
|
64434
|
-
return
|
|
64469
|
+
return queried.promise(getCompiler().__internal__get_compilation().assets);
|
|
64435
64470
|
};
|
|
64436
64471
|
}),
|
|
64437
64472
|
registerCompilationAfterProcessAssetsTaps: createTap(external_rspack_wasi_browser_js_["default"].RegisterJsTapKind.CompilationAfterProcessAssets, function() {
|
|
@@ -64452,7 +64487,7 @@ const createCompilationHooksRegisters = (getCompiler, createTap, createMapTap)=>
|
|
|
64452
64487
|
return getCompiler().__internal__get_compilation().hooks.afterSeal;
|
|
64453
64488
|
}, function(queried) {
|
|
64454
64489
|
return async function() {
|
|
64455
|
-
return
|
|
64490
|
+
return queried.promise();
|
|
64456
64491
|
};
|
|
64457
64492
|
})
|
|
64458
64493
|
});
|
|
@@ -64476,14 +64511,14 @@ const createCompilerHooksRegisters = (getCompiler, createTap)=>({
|
|
|
64476
64511
|
return getCompiler().hooks.make;
|
|
64477
64512
|
}, function(queried) {
|
|
64478
64513
|
return async function() {
|
|
64479
|
-
return
|
|
64514
|
+
return queried.promise(getCompiler().__internal__get_compilation());
|
|
64480
64515
|
};
|
|
64481
64516
|
}),
|
|
64482
64517
|
registerCompilerFinishMakeTaps: createTap(external_rspack_wasi_browser_js_["default"].RegisterJsTapKind.CompilerFinishMake, function() {
|
|
64483
64518
|
return getCompiler().hooks.finishMake;
|
|
64484
64519
|
}, function(queried) {
|
|
64485
64520
|
return async function() {
|
|
64486
|
-
return
|
|
64521
|
+
return queried.promise(getCompiler().__internal__get_compilation());
|
|
64487
64522
|
};
|
|
64488
64523
|
}),
|
|
64489
64524
|
registerCompilerShouldEmitTaps: createTap(external_rspack_wasi_browser_js_["default"].RegisterJsTapKind.CompilerShouldEmit, function() {
|
|
@@ -64497,14 +64532,14 @@ const createCompilerHooksRegisters = (getCompiler, createTap)=>({
|
|
|
64497
64532
|
return getCompiler().hooks.emit;
|
|
64498
64533
|
}, function(queried) {
|
|
64499
64534
|
return async function() {
|
|
64500
|
-
return
|
|
64535
|
+
return queried.promise(getCompiler().__internal__get_compilation());
|
|
64501
64536
|
};
|
|
64502
64537
|
}),
|
|
64503
64538
|
registerCompilerAfterEmitTaps: createTap(external_rspack_wasi_browser_js_["default"].RegisterJsTapKind.CompilerAfterEmit, function() {
|
|
64504
64539
|
return getCompiler().hooks.afterEmit;
|
|
64505
64540
|
}, function(queried) {
|
|
64506
64541
|
return async function() {
|
|
64507
|
-
return
|
|
64542
|
+
return queried.promise(getCompiler().__internal__get_compilation());
|
|
64508
64543
|
};
|
|
64509
64544
|
}),
|
|
64510
64545
|
registerCompilerAssetEmittedTaps: createTap(external_rspack_wasi_browser_js_["default"].RegisterJsTapKind.CompilerAssetEmitted, function() {
|
|
@@ -66939,7 +66974,7 @@ function transformSync(source, options) {
|
|
|
66939
66974
|
const _options = JSON.stringify(options || {});
|
|
66940
66975
|
return external_rspack_wasi_browser_js_["default"].transformSync(source, _options);
|
|
66941
66976
|
}
|
|
66942
|
-
const exports_rspackVersion = "1.7.2-canary-
|
|
66977
|
+
const exports_rspackVersion = "1.7.2-canary-29642b28-20260108182846";
|
|
66943
66978
|
const exports_version = "5.75.0";
|
|
66944
66979
|
const exports_WebpackError = Error;
|
|
66945
66980
|
const sources = __webpack_require__("../../node_modules/.pnpm/webpack-sources@3.3.3_patch_hash=b2a26650f08a2359d0a3cd81fa6fa272aa7441a28dd7e601792da5ed5d2b4aee/node_modules/webpack-sources/lib/index.js");
|
package/dist/napi-binding.d.ts
CHANGED
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rspack-canary/browser",
|
|
3
|
-
"version": "1.7.2-canary-
|
|
3
|
+
"version": "1.7.2-canary-29642b28-20260108182846",
|
|
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.",
|