@rspack/core 0.5.8-canary-db10b37-20240323004659 → 0.5.8-canary-ca8afe6-20240325005559

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.
@@ -67,8 +67,8 @@ export declare class Compilation {
67
67
  childCompiler: tapable.SyncHook<[Compiler, string, number]>;
68
68
  log: tapable.SyncBailHook<[string, LogEntry], true>;
69
69
  additionalAssets: any;
70
- optimizeModules: tapable.SyncBailHook<Iterable<Module>, void>;
71
- afterOptimizeModules: tapable.SyncHook<Iterable<Module>, void>;
70
+ optimizeModules: liteTapable.SyncBailHook<Iterable<Module>, void>;
71
+ afterOptimizeModules: liteTapable.SyncHook<Iterable<Module>, void>;
72
72
  optimizeTree: tapable.AsyncSeriesBailHook<[
73
73
  Iterable<Chunk>,
74
74
  Iterable<Module>
@@ -138,8 +138,8 @@ BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a si
138
138
  "compilerIndex"
139
139
  ]),
140
140
  log: new tapable.SyncBailHook(["origin", "logEntry"]),
141
- optimizeModules: new tapable.SyncBailHook(["modules"]),
142
- afterOptimizeModules: new tapable.SyncBailHook(["modules"]),
141
+ optimizeModules: new liteTapable.SyncBailHook(["modules"]),
142
+ afterOptimizeModules: new liteTapable.SyncBailHook(["modules"]),
143
143
  optimizeTree: new tapable.AsyncSeriesBailHook(["chunks", "modules"]),
144
144
  optimizeChunkModules: new tapable.AsyncSeriesBailHook([
145
145
  "chunks",
package/dist/Compiler.js CHANGED
@@ -36,7 +36,7 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
36
36
  var __importDefault = (this && this.__importDefault) || function (mod) {
37
37
  return (mod && mod.__esModule) ? mod : { "default": mod };
38
38
  };
39
- var _Compiler_instances, _Compiler_instance, _Compiler_disabledHooks, _Compiler_moduleExecutionResultsMap, _Compiler_getInstance, _Compiler_updateDisabledHooks, _Compiler_afterProcessAssets, _Compiler_afterResolve, _Compiler_contextModuleFactoryBeforeResolve, _Compiler_contextModuleFactoryAfterResolve, _Compiler_normalModuleFactoryCreateModule, _Compiler_normalModuleFactoryResolveForScheme, _Compiler_optimizeChunkModules, _Compiler_optimizeTree, _Compiler_optimizeModules, _Compiler_afterOptimizeModules, _Compiler_emit, _Compiler_afterEmit, _Compiler_decorateUpdateDisabledHooks, _Compiler_createRegisterTaps, _Compiler_createCompilation, _Compiler_resetThisCompilation, _Compiler_newCompilationParams;
39
+ var _Compiler_instances, _Compiler_instance, _Compiler_disabledHooks, _Compiler_moduleExecutionResultsMap, _Compiler_getInstance, _Compiler_updateDisabledHooks, _Compiler_afterProcessAssets, _Compiler_afterResolve, _Compiler_contextModuleFactoryBeforeResolve, _Compiler_contextModuleFactoryAfterResolve, _Compiler_normalModuleFactoryCreateModule, _Compiler_normalModuleFactoryResolveForScheme, _Compiler_optimizeChunkModules, _Compiler_optimizeTree, _Compiler_decorateUpdateDisabledHooks, _Compiler_createRegisterTaps, _Compiler_createCompilation, _Compiler_resetThisCompilation, _Compiler_newCompilationParams;
40
40
  Object.defineProperty(exports, "__esModule", { value: true });
41
41
  exports.Compiler = void 0;
42
42
  const index_1 = require("./index");
@@ -502,8 +502,6 @@ _Compiler_instance = new WeakMap(), _Compiler_disabledHooks = new WeakMap(), _Co
502
502
  const rawOptions = (0, config_1.getRawOptions)(options, this);
503
503
  const instanceBinding = require("@rspack/binding");
504
504
  __classPrivateFieldSet(this, _Compiler_instance, new instanceBinding.Rspack(rawOptions, this.builtinPlugins, {
505
- optimizeModules: __classPrivateFieldGet(this, _Compiler_instances, "m", _Compiler_optimizeModules).bind(this),
506
- afterOptimizeModules: __classPrivateFieldGet(this, _Compiler_instances, "m", _Compiler_afterOptimizeModules).bind(this),
507
505
  optimizeTree: __classPrivateFieldGet(this, _Compiler_instances, "m", _Compiler_optimizeTree).bind(this),
508
506
  optimizeChunkModules: __classPrivateFieldGet(this, _Compiler_instances, "m", _Compiler_optimizeChunkModules).bind(this),
509
507
  normalModuleFactoryCreateModule: __classPrivateFieldGet(this, _Compiler_instances, "m", _Compiler_normalModuleFactoryCreateModule).bind(this),
@@ -589,6 +587,8 @@ _Compiler_instance = new WeakMap(), _Compiler_disabledHooks = new WeakMap(), _Co
589
587
  __classPrivateFieldGet(this, _Compiler_moduleExecutionResultsMap, "f").set(id, executeResult);
590
588
  }),
591
589
  registerCompilationFinishModulesTaps: __classPrivateFieldGet(this, _Compiler_instances, "m", _Compiler_createRegisterTaps).call(this, () => this.compilation.hooks.finishModules, queried => async () => await queried.promise(this.compilation.modules)),
590
+ registerCompilationOptimizeModulesTaps: __classPrivateFieldGet(this, _Compiler_instances, "m", _Compiler_createRegisterTaps).call(this, () => this.compilation.hooks.optimizeModules, queried => () => queried.call(this.compilation.modules)),
591
+ registerCompilationAfterOptimizeModulesTaps: __classPrivateFieldGet(this, _Compiler_instances, "m", _Compiler_createRegisterTaps).call(this, () => this.compilation.hooks.afterOptimizeModules, queried => () => queried.call(this.compilation.modules)),
592
592
  registerCompilationChunkAssetTaps: __classPrivateFieldGet(this, _Compiler_instances, "m", _Compiler_createRegisterTaps).call(this, () => this.compilation.hooks.chunkAsset, queried => ({ chunk, filename }) => queried.call(Chunk_1.Chunk.__from_binding(chunk, this.compilation), filename)),
593
593
  registerCompilationProcessAssetsTaps: __classPrivateFieldGet(this, _Compiler_instances, "m", _Compiler_createRegisterTaps).call(this, () => this.compilation.hooks.processAssets, queried => async () => await queried.promise(this.compilation.assets)),
594
594
  registerCompilationAfterProcessAssetsTaps: __classPrivateFieldGet(this, _Compiler_instances, "m", _Compiler_createRegisterTaps).call(this, () => this.compilation.hooks.afterProcessAssets, queried => () => queried.call(this.compilation.assets)),
@@ -612,8 +612,6 @@ _Compiler_instance = new WeakMap(), _Compiler_disabledHooks = new WeakMap(), _Co
612
612
  const disabledHooks = [];
613
613
  const hookMap = {
614
614
  optimizeTree: this.compilation.hooks.optimizeTree,
615
- optimizeModules: this.compilation.hooks.optimizeModules,
616
- afterOptimizeModules: this.compilation.hooks.afterOptimizeModules,
617
615
  afterResolve: (_a = this.compilationParams) === null || _a === void 0 ? void 0 : _a.normalModuleFactory.hooks.afterResolve,
618
616
  optimizeChunkModules: this.compilation.hooks.optimizeChunkModules,
619
617
  contextModuleFactoryBeforeResolve: (_b = this.compilationParams) === null || _b === void 0 ? void 0 : _b.contextModuleFactory.hooks.beforeResolve,
@@ -684,18 +682,6 @@ _Compiler_instance = new WeakMap(), _Compiler_disabledHooks = new WeakMap(), _Co
684
682
  }, _Compiler_optimizeTree = async function _Compiler_optimizeTree() {
685
683
  await this.compilation.hooks.optimizeTree.promise(this.compilation.chunks, this.compilation.modules);
686
684
  __classPrivateFieldGet(this, _Compiler_instances, "m", _Compiler_updateDisabledHooks).call(this);
687
- }, _Compiler_optimizeModules = async function _Compiler_optimizeModules() {
688
- await this.compilation.hooks.optimizeModules.promise(this.compilation.modules);
689
- __classPrivateFieldGet(this, _Compiler_instances, "m", _Compiler_updateDisabledHooks).call(this);
690
- }, _Compiler_afterOptimizeModules = async function _Compiler_afterOptimizeModules() {
691
- await this.compilation.hooks.afterOptimizeModules.promise(this.compilation.modules);
692
- __classPrivateFieldGet(this, _Compiler_instances, "m", _Compiler_updateDisabledHooks).call(this);
693
- }, _Compiler_emit = async function _Compiler_emit() {
694
- await this.hooks.emit.promise(this.compilation);
695
- __classPrivateFieldGet(this, _Compiler_instances, "m", _Compiler_updateDisabledHooks).call(this);
696
- }, _Compiler_afterEmit = async function _Compiler_afterEmit() {
697
- await this.hooks.afterEmit.promise(this.compilation);
698
- __classPrivateFieldGet(this, _Compiler_instances, "m", _Compiler_updateDisabledHooks).call(this);
699
685
  }, _Compiler_decorateUpdateDisabledHooks = function _Compiler_decorateUpdateDisabledHooks(jsTaps) {
700
686
  if (jsTaps.length > 0) {
701
687
  const last = jsTaps[jsTaps.length - 1];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rspack/core",
3
- "version": "0.5.8-canary-db10b37-20240323004659",
3
+ "version": "0.5.8-canary-ca8afe6-20240325005559",
4
4
  "webpackVersion": "5.75.0",
5
5
  "license": "MIT",
6
6
  "description": "A Fast Rust-based Web Bundler",
@@ -56,8 +56,8 @@
56
56
  "styled-components": "^6.0.8",
57
57
  "terser": "5.27.2",
58
58
  "wast-loader": "^1.11.4",
59
- "@rspack/core": "0.5.8-canary-db10b37-20240323004659",
60
- "@rspack/plugin-minify": "^0.5.8-canary-db10b37-20240323004659"
59
+ "@rspack/core": "0.5.8-canary-ca8afe6-20240325005559",
60
+ "@rspack/plugin-minify": "^0.5.8-canary-ca8afe6-20240325005559"
61
61
  },
62
62
  "dependencies": {
63
63
  "@module-federation/runtime-tools": "0.0.8",
@@ -72,7 +72,7 @@
72
72
  "webpack-sources": "3.2.3",
73
73
  "zod": "^3.21.4",
74
74
  "zod-validation-error": "1.3.1",
75
- "@rspack/binding": "0.5.8-canary-db10b37-20240323004659"
75
+ "@rspack/binding": "0.5.8-canary-ca8afe6-20240325005559"
76
76
  },
77
77
  "peerDependencies": {
78
78
  "@swc/helpers": ">=0.5.1"