@rspack/core 1.7.7 → 1.7.8
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 +1 -0
- package/dist/index.js +28 -5
- package/package.json +2 -2
package/dist/Compilation.d.ts
CHANGED
|
@@ -162,6 +162,7 @@ export declare class Compilation {
|
|
|
162
162
|
Iterable<Chunk>,
|
|
163
163
|
Iterable<Module>
|
|
164
164
|
], void>;
|
|
165
|
+
beforeModuleIds: liteTapable.SyncHook<[Iterable<Module>]>;
|
|
165
166
|
finishModules: liteTapable.AsyncSeriesHook<[Iterable<Module>], void>;
|
|
166
167
|
chunkHash: liteTapable.SyncHook<[Chunk, Hash]>;
|
|
167
168
|
chunkAsset: liteTapable.SyncHook<[Chunk, string]>;
|
package/dist/index.js
CHANGED
|
@@ -1550,6 +1550,9 @@ BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a si
|
|
|
1550
1550
|
'chunks',
|
|
1551
1551
|
'modules'
|
|
1552
1552
|
]),
|
|
1553
|
+
beforeModuleIds: new lite_tapable_namespaceObject.SyncHook([
|
|
1554
|
+
'modules'
|
|
1555
|
+
]),
|
|
1553
1556
|
finishModules: new lite_tapable_namespaceObject.AsyncSeriesHook([
|
|
1554
1557
|
'modules'
|
|
1555
1558
|
]),
|
|
@@ -5904,7 +5907,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
|
5904
5907
|
}, applyExperimentsDefaults = (experiments, { development })=>{
|
|
5905
5908
|
F(experiments, 'cache', ()=>development), D(experiments, 'futureDefaults', !1), D(experiments, 'lazyCompilation', !1), D(experiments, 'asyncWebAssembly', experiments.futureDefaults), D(experiments, 'css', !!experiments.futureDefaults || void 0), D(experiments, 'topLevelAwait', !0), D(experiments, 'deferImport', !1), D(experiments, 'buildHttp', void 0), experiments.buildHttp && 'object' == typeof experiments.buildHttp && D(experiments.buildHttp, 'upgrade', !1), D(experiments, 'incremental', {}), 'object' == typeof experiments.incremental && (D(experiments.incremental, 'silent', !0), D(experiments.incremental, 'make', !0), D(experiments.incremental, 'inferAsyncModules', !0), D(experiments.incremental, 'providedExports', !0), D(experiments.incremental, 'dependenciesDiagnostics', !0), D(experiments.incremental, 'sideEffects', !0), D(experiments.incremental, 'buildChunkGraph', !1), D(experiments.incremental, 'moduleIds', !0), D(experiments.incremental, 'chunkIds', !0), D(experiments.incremental, 'modulesHashes', !0), D(experiments.incremental, 'modulesCodegen', !0), D(experiments.incremental, 'modulesRuntimeRequirements', !0), D(experiments.incremental, 'chunksRuntimeRequirements', !0), D(experiments.incremental, 'chunksHashes', !0), D(experiments.incremental, 'chunksRender', !0), D(experiments.incremental, 'emitAssets', !0)), D(experiments, 'rspackFuture', {}), D(experiments, 'parallelLoader', !1), D(experiments, 'useInputFileSystem', !1), D(experiments, 'inlineConst', !0), D(experiments, 'inlineEnum', !1), D(experiments, 'typeReexportsPresence', !1), D(experiments, 'lazyBarrel', !0);
|
|
5906
5909
|
}, applybundlerInfoDefaults = (rspackFuture, library)=>{
|
|
5907
|
-
'object' == typeof rspackFuture && (D(rspackFuture, 'bundlerInfo', {}), 'object' == typeof rspackFuture.bundlerInfo && (D(rspackFuture.bundlerInfo, 'version', "1.7.
|
|
5910
|
+
'object' == typeof rspackFuture && (D(rspackFuture, 'bundlerInfo', {}), 'object' == typeof rspackFuture.bundlerInfo && (D(rspackFuture.bundlerInfo, 'version', "1.7.8"), D(rspackFuture.bundlerInfo, 'bundler', 'rspack'), D(rspackFuture.bundlerInfo, 'force', !library)));
|
|
5908
5911
|
}, applySnapshotDefaults = (_snapshot, _env)=>{}, applyCssGeneratorOptionsDefaults = (generatorOptions, { targetProperties })=>{
|
|
5909
5912
|
D(generatorOptions, 'exportsOnly', !targetProperties || !1 === targetProperties.document), D(generatorOptions, 'esModule', !0);
|
|
5910
5913
|
}, applyModuleDefaults = (module1, { cache, asyncWebAssembly, css, targetProperties, mode, uniqueName, deferImport })=>{
|
|
@@ -7472,7 +7475,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
|
7472
7475
|
obj.children = this.stats.map((stat, idx)=>{
|
|
7473
7476
|
let obj = stat.toJson(childOptions.children[idx]), compilationName = stat.compilation.name;
|
|
7474
7477
|
return obj.name = compilationName && makePathsRelative(childOptions.context, compilationName, stat.compilation.compiler.root), obj;
|
|
7475
|
-
}), childOptions.version && (obj.rspackVersion = "1.7.
|
|
7478
|
+
}), childOptions.version && (obj.rspackVersion = "1.7.8", obj.version = "5.75.0"), childOptions.hash && (obj.hash = obj.children.map((j)=>j.hash).join(''));
|
|
7476
7479
|
let mapError = (j, obj)=>({
|
|
7477
7480
|
...obj,
|
|
7478
7481
|
compilerPath: obj.compilerPath ? `${j.name}.${obj.compilerPath}` : j.name
|
|
@@ -8734,7 +8737,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
|
8734
8737
|
object.hash = context.getStatsCompilation(compilation).hash;
|
|
8735
8738
|
},
|
|
8736
8739
|
version: (object)=>{
|
|
8737
|
-
object.version = "5.75.0", object.rspackVersion = "1.7.
|
|
8740
|
+
object.version = "5.75.0", object.rspackVersion = "1.7.8";
|
|
8738
8741
|
},
|
|
8739
8742
|
env: (object, _compilation, _context, { _env })=>{
|
|
8740
8743
|
object.env = _env;
|
|
@@ -10459,7 +10462,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
|
10459
10462
|
});
|
|
10460
10463
|
}
|
|
10461
10464
|
}
|
|
10462
|
-
let CORE_VERSION = "1.7.
|
|
10465
|
+
let CORE_VERSION = "1.7.8", bindingVersionCheck_errorMessage = (coreVersion, expectedCoreVersion)=>process.env.RSPACK_BINDING ? `Unmatched version @rspack/core@${coreVersion} and binding version.
|
|
10463
10466
|
|
|
10464
10467
|
Help:
|
|
10465
10468
|
Looks like you are using a custom binding (via environment variable 'RSPACK_BINDING=${process.env.RSPACK_BINDING}').
|
|
@@ -11333,6 +11336,26 @@ Help:
|
|
|
11333
11336
|
return queried.promise(getCompiler2().__internal__get_compilation().chunks, getCompiler2().__internal__get_compilation().modules);
|
|
11334
11337
|
};
|
|
11335
11338
|
}),
|
|
11339
|
+
registerCompilationBeforeModuleIdsTaps: createTap2(binding_default().RegisterJsTapKind.CompilationBeforeModuleIds, function() {
|
|
11340
|
+
return getCompiler2().__internal__get_compilation().hooks.beforeModuleIds;
|
|
11341
|
+
}, function(queried) {
|
|
11342
|
+
return function(arg) {
|
|
11343
|
+
let compilation = getCompiler2().__internal__get_compilation(), assignments = new Map(), modulesByIdentifier = new Map();
|
|
11344
|
+
for (let module1 of compilation.modules)modulesByIdentifier.set(module1.identifier(), module1);
|
|
11345
|
+
let proxiedModules = arg.modules.map((m)=>new Proxy(modulesByIdentifier.get(m.identifier), {
|
|
11346
|
+
get (target, prop) {
|
|
11347
|
+
if ('id' === prop) return assignments.get(m.identifier) ?? null;
|
|
11348
|
+
if ('identifier' === prop) return m.identifier;
|
|
11349
|
+
let value = Reflect.get(target, prop);
|
|
11350
|
+
return 'function' == typeof value ? value.bind(target) : value;
|
|
11351
|
+
},
|
|
11352
|
+
set: (_target, prop, value)=>'id' === prop && ('string' == typeof value || 'number' == typeof value) && (assignments.set(m.identifier, value), !0)
|
|
11353
|
+
}));
|
|
11354
|
+
return queried.call(proxiedModules), {
|
|
11355
|
+
assignments: Object.fromEntries(assignments.entries())
|
|
11356
|
+
};
|
|
11357
|
+
};
|
|
11358
|
+
}),
|
|
11336
11359
|
registerCompilationChunkHashTaps: createTap2(binding_default().RegisterJsTapKind.CompilationChunkHash, function() {
|
|
11337
11360
|
return getCompiler2().__internal__get_compilation().hooks.chunkHash;
|
|
11338
11361
|
}, function(queried) {
|
|
@@ -12257,7 +12280,7 @@ Help:
|
|
|
12257
12280
|
let _options = JSON.stringify(options || {});
|
|
12258
12281
|
return binding_default().transform(source, _options);
|
|
12259
12282
|
}
|
|
12260
|
-
let exports_rspackVersion = "1.7.
|
|
12283
|
+
let exports_rspackVersion = "1.7.8", exports_version = "5.75.0", exports_WebpackError = Error, sources = __webpack_require__("webpack-sources"), exports_config = {
|
|
12261
12284
|
getNormalizedRspackOptions: getNormalizedRspackOptions,
|
|
12262
12285
|
applyRspackOptionsDefaults: applyRspackOptionsDefaults,
|
|
12263
12286
|
getNormalizedWebpackOptions: getNormalizedRspackOptions,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rspack/core",
|
|
3
|
-
"version": "1.7.
|
|
3
|
+
"version": "1.7.8",
|
|
4
4
|
"webpackVersion": "5.75.0",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"description": "The fast Rust-based web bundler with webpack-compatible API",
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
"dependencies": {
|
|
59
59
|
"@module-federation/runtime-tools": "0.22.0",
|
|
60
60
|
"@rspack/lite-tapable": "1.1.0",
|
|
61
|
-
"@rspack/binding": "1.7.
|
|
61
|
+
"@rspack/binding": "1.7.8"
|
|
62
62
|
},
|
|
63
63
|
"peerDependencies": {
|
|
64
64
|
"@swc/helpers": ">=0.5.1"
|