@rspack-canary/core 2.0.0-canary-031a52e2-20260126041350 → 2.0.0-canary-dcb96bee-20260127053038

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.
Files changed (2) hide show
  1. package/dist/index.js +37 -9
  2. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -598,6 +598,17 @@ class Stats {
598
598
  compilation: this.compilation,
599
599
  getStatsCompilation: (compilation)=>{
600
600
  if (statsCompilationMap.has(compilation)) return statsCompilationMap.get(compilation);
601
+ if (this.compilation !== this.compilation.compiler._lastCompilation) return {
602
+ assets: [],
603
+ assetsByChunkName: [],
604
+ chunks: [],
605
+ entrypoints: [],
606
+ errors: [],
607
+ hash: 'XXXX',
608
+ modules: [],
609
+ namedChunkGroups: [],
610
+ warnings: []
611
+ };
601
612
  let innerStats = this.#getInnerByCompilation(compilation);
602
613
  options.warnings = !1;
603
614
  let innerStatsCompilation = innerStats.toJson(options);
@@ -613,6 +624,17 @@ class Stats {
613
624
  compilation: this.compilation,
614
625
  getStatsCompilation: (compilation)=>{
615
626
  if (statsCompilationMap.has(compilation)) return statsCompilationMap.get(compilation);
627
+ if (this.compilation !== this.compilation.compiler._lastCompilation) return {
628
+ assets: [],
629
+ assetsByChunkName: [],
630
+ chunks: [],
631
+ entrypoints: [],
632
+ errors: [],
633
+ hash: 'XXXX',
634
+ modules: [],
635
+ namedChunkGroups: [],
636
+ warnings: []
637
+ };
616
638
  let innerStatsCompilation = this.#getInnerByCompilation(compilation).toJson(options);
617
639
  return statsCompilationMap.set(compilation, innerStatsCompilation), innerStatsCompilation;
618
640
  },
@@ -6332,7 +6354,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
6332
6354
  return output.wasmLoading && enabledWasmLoadingTypes.add(output.wasmLoading), output.workerWasmLoading && enabledWasmLoadingTypes.add(output.workerWasmLoading), forEachEntry((desc)=>{
6333
6355
  desc.wasmLoading && enabledWasmLoadingTypes.add(desc.wasmLoading);
6334
6356
  }), Array.from(enabledWasmLoadingTypes);
6335
- }), D(output, 'bundlerInfo', {}), 'object' == typeof output.bundlerInfo && (D(output.bundlerInfo, 'version', "2.0.0-canary-031a52e2-20260126041350"), D(output.bundlerInfo, 'bundler', 'rspack'), D(output.bundlerInfo, 'force', !output.library));
6357
+ }), D(output, 'bundlerInfo', {}), 'object' == typeof output.bundlerInfo && (D(output.bundlerInfo, 'version', "2.0.0-canary-dcb96bee-20260127053038"), D(output.bundlerInfo, 'bundler', 'rspack'), D(output.bundlerInfo, 'force', !output.library));
6336
6358
  }, applyExternalsPresetsDefaults = (externalsPresets, { targetProperties, buildHttp, outputModule })=>{
6337
6359
  let isUniversal = (key)=>!!(outputModule && targetProperties && null === targetProperties[key]);
6338
6360
  D(externalsPresets, 'web', !buildHttp && targetProperties && (targetProperties.web || isUniversal('node'))), D(externalsPresets, 'node', targetProperties && (targetProperties.node || isUniversal('node'))), D(externalsPresets, 'electron', targetProperties && targetProperties.electron || isUniversal('electron')), D(externalsPresets, 'electronMain', targetProperties && !!targetProperties.electron && (targetProperties.electronMain || isUniversal('electronMain'))), D(externalsPresets, 'electronPreload', targetProperties && !!targetProperties.electron && (targetProperties.electronPreload || isUniversal('electronPreload'))), D(externalsPresets, 'electronRenderer', targetProperties && !!targetProperties.electron && (targetProperties.electronRenderer || isUniversal('electronRenderer'))), D(externalsPresets, 'nwjs', targetProperties && (targetProperties.nwjs || isUniversal('nwjs')));
@@ -7584,7 +7606,7 @@ class MultiStats {
7584
7606
  obj.children = this.stats.map((stat, idx)=>{
7585
7607
  let obj = stat.toJson(childOptions.children[idx]), compilationName = stat.compilation.name;
7586
7608
  return obj.name = compilationName && makePathsRelative(childOptions.context, compilationName, stat.compilation.compiler.root), obj;
7587
- }), childOptions.version && (obj.rspackVersion = "2.0.0-canary-031a52e2-20260126041350", obj.version = "5.75.0"), childOptions.hash && (obj.hash = obj.children.map((j)=>j.hash).join(''));
7609
+ }), childOptions.version && (obj.rspackVersion = "2.0.0-canary-dcb96bee-20260127053038", obj.version = "5.75.0"), childOptions.hash && (obj.hash = obj.children.map((j)=>j.hash).join(''));
7588
7610
  let mapError = (j, obj)=>({
7589
7611
  ...obj,
7590
7612
  compilerPath: obj.compilerPath ? `${j.name}.${obj.compilerPath}` : j.name
@@ -8740,15 +8762,21 @@ let iterateConfig = (config, options, fn)=>{
8740
8762
  if (context.makePathsRelative || (context.makePathsRelative = makePathsRelative.bindContextCache(compilation.compiler.context, compilation.compiler.root)), !context.cachedGetErrors) {
8741
8763
  let map = new WeakMap();
8742
8764
  context.cachedGetErrors = (compilation)=>{
8743
- var errors;
8744
- return map.get(compilation) || (errors = statsCompilation.errors, map.set(compilation, errors), errors);
8765
+ if (compilation.compiler._lastCompilation !== compilation) return [];
8766
+ let cache = map.get(compilation);
8767
+ if (cache) return cache;
8768
+ let errors = statsCompilation.errors;
8769
+ return map.set(compilation, errors), errors;
8745
8770
  };
8746
8771
  }
8747
8772
  if (!context.cachedGetWarnings) {
8748
8773
  let map = new WeakMap();
8749
8774
  context.cachedGetWarnings = (compilation)=>{
8750
- var warnings;
8751
- return map.get(compilation) || (warnings = compilation.__internal_getInner().createStatsWarnings(compilation.getWarnings(), !!options.colors), map.set(compilation, warnings), warnings);
8775
+ if (compilation.compiler._lastCompilation !== compilation) return [];
8776
+ let cache = map.get(compilation);
8777
+ if (cache) return cache;
8778
+ let warnings = compilation.__internal_getInner().createStatsWarnings(compilation.getWarnings(), !!options.colors);
8779
+ return map.set(compilation, warnings), warnings;
8752
8780
  };
8753
8781
  }
8754
8782
  compilation.name && (object.name = compilation.name);
@@ -8837,7 +8865,7 @@ let iterateConfig = (config, options, fn)=>{
8837
8865
  object.hash = context.getStatsCompilation(compilation).hash;
8838
8866
  },
8839
8867
  version: (object)=>{
8840
- object.version = "5.75.0", object.rspackVersion = "2.0.0-canary-031a52e2-20260126041350";
8868
+ object.version = "5.75.0", object.rspackVersion = "2.0.0-canary-dcb96bee-20260127053038";
8841
8869
  },
8842
8870
  env: (object, _compilation, _context, { _env })=>{
8843
8871
  object.env = _env;
@@ -10498,7 +10526,7 @@ class TraceHookPlugin {
10498
10526
  });
10499
10527
  }
10500
10528
  }
10501
- let CORE_VERSION = "2.0.0-canary-031a52e2-20260126041350", VFILES_BY_COMPILER = new WeakMap();
10529
+ let CORE_VERSION = "2.0.0-canary-dcb96bee-20260127053038", VFILES_BY_COMPILER = new WeakMap();
10502
10530
  class VirtualModulesPlugin {
10503
10531
  #staticModules;
10504
10532
  #compiler;
@@ -12293,7 +12321,7 @@ async function transform(source, options) {
12293
12321
  let _options = JSON.stringify(options || {});
12294
12322
  return binding_default().transform(source, _options);
12295
12323
  }
12296
- let exports_rspackVersion = "2.0.0-canary-031a52e2-20260126041350", exports_version = "5.75.0", exports_WebpackError = Error, exports_config = {
12324
+ let exports_rspackVersion = "2.0.0-canary-dcb96bee-20260127053038", exports_version = "5.75.0", exports_WebpackError = Error, exports_config = {
12297
12325
  getNormalizedRspackOptions: getNormalizedRspackOptions,
12298
12326
  applyRspackOptionsDefaults: applyRspackOptionsDefaults,
12299
12327
  getNormalizedWebpackOptions: getNormalizedRspackOptions,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rspack-canary/core",
3
- "version": "2.0.0-canary-031a52e2-20260126041350",
3
+ "version": "2.0.0-canary-dcb96bee-20260127053038",
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
  },
59
59
  "dependencies": {
60
60
  "@rspack/lite-tapable": "1.1.0",
61
- "@rspack/binding": "npm:@rspack-canary/binding@2.0.0-canary-031a52e2-20260126041350"
61
+ "@rspack/binding": "npm:@rspack-canary/binding@2.0.0-canary-dcb96bee-20260127053038"
62
62
  },
63
63
  "peerDependencies": {
64
64
  "@module-federation/runtime-tools": ">=0.22.0",