@rspack/core 1.3.3 → 1.3.4

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/Module.d.ts CHANGED
@@ -44,6 +44,7 @@ export declare class ContextModuleFactoryAfterResolveData {
44
44
  export type ContextModuleFactoryAfterResolveResult = false | ContextModuleFactoryAfterResolveData;
45
45
  declare module "@rspack/binding" {
46
46
  interface Module {
47
+ identifier(): string;
47
48
  originalSource(): Source | null;
48
49
  emitFile(filename: string, source: Source, assetInfo?: AssetInfo): void;
49
50
  }
@@ -1,7 +1,6 @@
1
- import type { Dependency, JsModuleGraph } from "@rspack/binding";
1
+ import type { Dependency, JsModuleGraph, ModuleGraphConnection } from "@rspack/binding";
2
2
  import { ExportsInfo } from "./ExportsInfo";
3
3
  import type { Module } from "./Module";
4
- import { ModuleGraphConnection } from "./ModuleGraphConnection";
5
4
  export default class ModuleGraph {
6
5
  #private;
7
6
  static __from_binding(binding: JsModuleGraph): ModuleGraph;
@@ -2931,6 +2931,7 @@ export declare const rspackOptions: z.ZodObject<{
2931
2931
  }>, z.ZodLiteral<false>]>>;
2932
2932
  }, "strict", z.ZodTypeAny, {
2933
2933
  name?: string | undefined;
2934
+ resolve?: t.ResolveOptions | undefined;
2934
2935
  module?: {
2935
2936
  parser?: {
2936
2937
  css?: {
@@ -3083,7 +3084,6 @@ export declare const rspackOptions: z.ZodObject<{
3083
3084
  defaultRules?: (false | "" | 0 | "..." | t.RuleSetRule | null | undefined)[] | undefined;
3084
3085
  noParse?: string | RegExp | ((args_0: string, ...args: unknown[]) => boolean) | (string | RegExp | ((args_0: string, ...args: unknown[]) => boolean))[] | undefined;
3085
3086
  } | undefined;
3086
- resolve?: t.ResolveOptions | undefined;
3087
3087
  profile?: boolean | undefined;
3088
3088
  cache?: boolean | undefined;
3089
3089
  context?: string | undefined;
@@ -3545,6 +3545,7 @@ export declare const rspackOptions: z.ZodObject<{
3545
3545
  bail?: boolean | undefined;
3546
3546
  }, {
3547
3547
  name?: string | undefined;
3548
+ resolve?: t.ResolveOptions | undefined;
3548
3549
  module?: {
3549
3550
  parser?: {
3550
3551
  css?: {
@@ -3697,7 +3698,6 @@ export declare const rspackOptions: z.ZodObject<{
3697
3698
  defaultRules?: (false | "" | 0 | "..." | t.RuleSetRule | null | undefined)[] | undefined;
3698
3699
  noParse?: string | RegExp | ((args_0: string, ...args: unknown[]) => boolean) | (string | RegExp | ((args_0: string, ...args: unknown[]) => boolean))[] | undefined;
3699
3700
  } | undefined;
3700
- resolve?: t.ResolveOptions | undefined;
3701
3701
  profile?: boolean | undefined;
3702
3702
  cache?: boolean | undefined;
3703
3703
  context?: string | undefined;
package/dist/exports.d.ts CHANGED
@@ -10,8 +10,9 @@ import { RspackOptionsApply } from "./rspackOptionsApply";
10
10
  export { RspackOptionsApply, RspackOptionsApply as WebpackOptionsApply };
11
11
  export type { Chunk } from "./Chunk";
12
12
  export type { ChunkGroup } from "./ChunkGroup";
13
- export type { Module, ResolveData, ResourceDataWithData } from "./Module";
13
+ export type { ResolveData, ResourceDataWithData } from "./Module";
14
14
  export { MultiStats } from "./MultiStats";
15
+ export { Module } from "./Module";
15
16
  export { NormalModule } from "./NormalModule";
16
17
  export { ContextModule } from "./ContextModule";
17
18
  export { ConcatenatedModule } from "./ConcatenatedModule";
package/dist/index.js CHANGED
@@ -718,6 +718,7 @@ __export(index_exports, {
718
718
  LightningCssMinimizerRspackPlugin: () => LightningCssMinimizerRspackPlugin,
719
719
  LoaderOptionsPlugin: () => LoaderOptionsPlugin,
720
720
  LoaderTargetPlugin: () => LoaderTargetPlugin,
721
+ Module: () => import_binding79.Module,
721
722
  ModuleFilenameHelpers: () => ModuleFilenameHelpers_exports,
722
723
  MultiCompiler: () => MultiCompiler,
723
724
  MultiStats: () => MultiStats,
@@ -791,6 +792,7 @@ __export(exports_exports, {
791
792
  LightningCssMinimizerRspackPlugin: () => LightningCssMinimizerRspackPlugin,
792
793
  LoaderOptionsPlugin: () => LoaderOptionsPlugin,
793
794
  LoaderTargetPlugin: () => LoaderTargetPlugin,
795
+ Module: () => import_binding79.Module,
794
796
  ModuleFilenameHelpers: () => ModuleFilenameHelpers_exports,
795
797
  MultiCompiler: () => MultiCompiler,
796
798
  MultiStats: () => MultiStats,
@@ -1185,53 +1187,6 @@ var ExportsInfo = class _ExportsInfo {
1185
1187
  }
1186
1188
  };
1187
1189
 
1188
- // src/ModuleGraphConnection.ts
1189
- var MODULE_GRAPH_CONNECTION_MAPPINGS = /* @__PURE__ */ new WeakMap();
1190
- var ModuleGraphConnection = class _ModuleGraphConnection {
1191
- #inner;
1192
- static __from_binding(binding14) {
1193
- let connection = MODULE_GRAPH_CONNECTION_MAPPINGS.get(binding14);
1194
- if (connection) {
1195
- return connection;
1196
- }
1197
- connection = new _ModuleGraphConnection(binding14);
1198
- MODULE_GRAPH_CONNECTION_MAPPINGS.set(binding14, connection);
1199
- return connection;
1200
- }
1201
- static __to_binding(data) {
1202
- return data.#inner;
1203
- }
1204
- constructor(binding14) {
1205
- this.#inner = binding14;
1206
- Object.defineProperties(this, {
1207
- module: {
1208
- enumerable: true,
1209
- get() {
1210
- return binding14.module;
1211
- }
1212
- },
1213
- dependency: {
1214
- enumerable: true,
1215
- get() {
1216
- return binding14.dependency;
1217
- }
1218
- },
1219
- resolvedModule: {
1220
- enumerable: true,
1221
- get() {
1222
- return binding14.resolvedModule;
1223
- }
1224
- },
1225
- originModule: {
1226
- enumerable: true,
1227
- get() {
1228
- return binding14.originModule;
1229
- }
1230
- }
1231
- });
1232
- }
1233
- };
1234
-
1235
1190
  // src/ModuleGraph.ts
1236
1191
  var ModuleGraph = class _ModuleGraph {
1237
1192
  static __from_binding(binding14) {
@@ -1257,14 +1212,13 @@ var ModuleGraph = class _ModuleGraph {
1257
1212
  return ExportsInfo.__from_binding(this.#inner.getExportsInfo(module2));
1258
1213
  }
1259
1214
  getConnection(dependency) {
1260
- const binding14 = this.#inner.getConnection(dependency);
1261
- return binding14 ? ModuleGraphConnection.__from_binding(binding14) : null;
1215
+ return this.#inner.getConnection(dependency);
1262
1216
  }
1263
1217
  getOutgoingConnections(module2) {
1264
- return this.#inner.getOutgoingConnections(module2).map((binding14) => ModuleGraphConnection.__from_binding(binding14));
1218
+ return this.#inner.getOutgoingConnections(module2);
1265
1219
  }
1266
1220
  getIncomingConnections(module2) {
1267
- return this.#inner.getIncomingConnections(module2).map((binding14) => ModuleGraphConnection.__from_binding(binding14));
1221
+ return this.#inner.getIncomingConnections(module2);
1268
1222
  }
1269
1223
  getParentBlockIndex(dependency) {
1270
1224
  return this.#inner.getParentBlockIndex(dependency);
@@ -1273,7 +1227,7 @@ var ModuleGraph = class _ModuleGraph {
1273
1227
  return this.#inner.isAsync(module2);
1274
1228
  }
1275
1229
  getOutgoingConnectionsInOrder(module2) {
1276
- return this.#inner.getOutgoingConnectionsInOrder(module2).map((binding14) => ModuleGraphConnection.__from_binding(binding14));
1230
+ return this.#inner.getOutgoingConnectionsInOrder(module2);
1277
1231
  }
1278
1232
  };
1279
1233
 
@@ -5156,6 +5110,13 @@ var import_node_util3 = __toESM(require("util"));
5156
5110
  var binding = __toESM(require("@rspack/binding"));
5157
5111
  var liteTapable4 = __toESM(require("@rspack/lite-tapable"));
5158
5112
  var import_binding2 = require("@rspack/binding");
5113
+ Object.defineProperty(binding.NormalModule.prototype, "identifier", {
5114
+ enumerable: true,
5115
+ configurable: true,
5116
+ value() {
5117
+ return this[binding.MODULE_IDENTIFIER_SYMBOL];
5118
+ }
5119
+ });
5159
5120
  Object.defineProperty(binding.NormalModule.prototype, "originalSource", {
5160
5121
  enumerable: true,
5161
5122
  configurable: true,
@@ -12771,6 +12732,13 @@ var ContextModuleFactoryAfterResolveData = class _ContextModuleFactoryAfterResol
12771
12732
  });
12772
12733
  }
12773
12734
  };
12735
+ Object.defineProperty(binding5.Module.prototype, "identifier", {
12736
+ enumerable: true,
12737
+ configurable: true,
12738
+ value() {
12739
+ return this[binding5.MODULE_IDENTIFIER_SYMBOL];
12740
+ }
12741
+ });
12774
12742
  Object.defineProperty(binding5.Module.prototype, "originalSource", {
12775
12743
  enumerable: true,
12776
12744
  configurable: true,
@@ -18351,6 +18319,13 @@ var RspackOptionsApply = class {
18351
18319
  // src/ContextModule.ts
18352
18320
  var binding11 = __toESM(require("@rspack/binding"));
18353
18321
  var import_binding80 = require("@rspack/binding");
18322
+ Object.defineProperty(binding11.ContextModule.prototype, "identifier", {
18323
+ enumerable: true,
18324
+ configurable: true,
18325
+ value() {
18326
+ return this[binding11.MODULE_IDENTIFIER_SYMBOL];
18327
+ }
18328
+ });
18354
18329
  Object.defineProperty(binding11.ContextModule.prototype, "originalSource", {
18355
18330
  enumerable: true,
18356
18331
  configurable: true,
@@ -18373,6 +18348,13 @@ Object.defineProperty(binding11.ContextModule.prototype, "emitFile", {
18373
18348
  // src/ConcatenatedModule.ts
18374
18349
  var binding12 = __toESM(require("@rspack/binding"));
18375
18350
  var import_binding81 = require("@rspack/binding");
18351
+ Object.defineProperty(binding12.ConcatenatedModule.prototype, "identifier", {
18352
+ enumerable: true,
18353
+ configurable: true,
18354
+ value() {
18355
+ return this[binding12.MODULE_IDENTIFIER_SYMBOL];
18356
+ }
18357
+ });
18376
18358
  Object.defineProperty(binding12.ConcatenatedModule.prototype, "originalSource", {
18377
18359
  enumerable: true,
18378
18360
  configurable: true,
@@ -18395,6 +18377,13 @@ Object.defineProperty(binding12.ConcatenatedModule.prototype, "emitFile", {
18395
18377
  // src/ExternalModule.ts
18396
18378
  var binding13 = __toESM(require("@rspack/binding"));
18397
18379
  var import_binding82 = require("@rspack/binding");
18380
+ Object.defineProperty(binding13.ExternalModule.prototype, "identifier", {
18381
+ enumerable: true,
18382
+ configurable: true,
18383
+ value() {
18384
+ return this[binding13.MODULE_IDENTIFIER_SYMBOL];
18385
+ }
18386
+ });
18398
18387
  Object.defineProperty(binding13.ExternalModule.prototype, "originalSource", {
18399
18388
  enumerable: true,
18400
18389
  configurable: true,
@@ -21293,6 +21282,7 @@ module.exports = rspack;
21293
21282
  LightningCssMinimizerRspackPlugin,
21294
21283
  LoaderOptionsPlugin,
21295
21284
  LoaderTargetPlugin,
21285
+ Module,
21296
21286
  ModuleFilenameHelpers,
21297
21287
  MultiCompiler,
21298
21288
  MultiStats,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rspack/core",
3
- "version": "1.3.3",
3
+ "version": "1.3.4",
4
4
  "webpackVersion": "5.75.0",
5
5
  "license": "MIT",
6
6
  "description": "The fast Rust-based web bundler with webpack-compatible API",
@@ -58,13 +58,13 @@
58
58
  "zod": "^3.24.2",
59
59
  "zod-validation-error": "3.4.0",
60
60
  "tinypool": "^1.0.2",
61
- "@rspack/tracing": "1.3.3"
61
+ "@rspack/tracing": "1.3.4"
62
62
  },
63
63
  "dependencies": {
64
64
  "@module-federation/runtime-tools": "0.11.2",
65
65
  "@rspack/lite-tapable": "1.0.1",
66
66
  "caniuse-lite": "^1.0.30001707",
67
- "@rspack/binding": "1.3.3"
67
+ "@rspack/binding": "1.3.4"
68
68
  },
69
69
  "peerDependencies": {
70
70
  "@rspack/tracing": "^1.x",
@@ -1,12 +0,0 @@
1
- import type { Dependency, JsModuleGraphConnection } from "@rspack/binding";
2
- import type { Module } from "./Module";
3
- export declare class ModuleGraphConnection {
4
- #private;
5
- readonly module: Module | null;
6
- readonly dependency: Dependency;
7
- readonly resolvedModule: Module | null;
8
- readonly originModule: Module | null;
9
- static __from_binding(binding: JsModuleGraphConnection): ModuleGraphConnection;
10
- static __to_binding(data: ModuleGraphConnection): JsModuleGraphConnection;
11
- private constructor();
12
- }