@rspack/core 1.2.7-alpha.0 → 1.2.7
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 -3
- package/dist/Compiler.d.ts +5 -1
- package/dist/DependenciesBlock.d.ts +1 -2
- package/dist/Module.d.ts +2 -3
- package/dist/ModuleGraph.d.ts +2 -2
- package/dist/ModuleGraphConnection.d.ts +1 -2
- package/dist/MultiCompiler.d.ts +8 -1
- package/dist/builtin-plugin/EntryPlugin.d.ts +1 -4
- package/dist/exports.d.ts +1 -0
- package/dist/index.js +53 -103
- package/package.json +3 -3
- package/dist/Dependency.d.ts +0 -12
package/dist/Compilation.d.ts
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* https://github.com/webpack/webpack/blob/main/LICENSE
|
|
9
9
|
*/
|
|
10
10
|
import type * as binding from "@rspack/binding";
|
|
11
|
-
import { type AssetInfo, type ExternalObject, type JsCompilation, type JsRuntimeModule } from "@rspack/binding";
|
|
11
|
+
import { type AssetInfo, type Dependency, type ExternalObject, type JsCompilation, type JsRuntimeModule } from "@rspack/binding";
|
|
12
12
|
export type { AssetInfo } from "@rspack/binding";
|
|
13
13
|
import * as liteTapable from "@rspack/lite-tapable";
|
|
14
14
|
import type { Source } from "../compiled/webpack-sources";
|
|
@@ -17,7 +17,6 @@ import { ChunkGraph } from "./ChunkGraph";
|
|
|
17
17
|
import { ChunkGroup } from "./ChunkGroup";
|
|
18
18
|
import type { Compiler } from "./Compiler";
|
|
19
19
|
import type { ContextModuleFactory } from "./ContextModuleFactory";
|
|
20
|
-
import { Dependency } from "./Dependency";
|
|
21
20
|
import { Entrypoint } from "./Entrypoint";
|
|
22
21
|
import { type CodeGenerationResult, Module } from "./Module";
|
|
23
22
|
import ModuleGraph from "./ModuleGraph";
|
|
@@ -240,7 +239,7 @@ export declare class Compilation {
|
|
|
240
239
|
/**
|
|
241
240
|
* Update an existing asset. Trying to update an asset that doesn't exist will throw an error.
|
|
242
241
|
*/
|
|
243
|
-
updateAsset(filename: string, newSourceOrFunction: Source | ((source: Source) => Source), assetInfoUpdateOrFunction?: AssetInfo | ((assetInfo: AssetInfo) => AssetInfo)): void;
|
|
242
|
+
updateAsset(filename: string, newSourceOrFunction: Source | ((source: Source) => Source), assetInfoUpdateOrFunction?: AssetInfo | ((assetInfo: AssetInfo) => AssetInfo | undefined)): void;
|
|
244
243
|
/**
|
|
245
244
|
* Emit an not existing asset. Trying to emit an asset that already exists will throw an error.
|
|
246
245
|
*
|
package/dist/Compiler.d.ts
CHANGED
|
@@ -128,8 +128,12 @@ declare class Compiler {
|
|
|
128
128
|
watch(watchOptions: Watchpack.WatchOptions, handler: liteTapable.Callback<Error, Stats>): Watching;
|
|
129
129
|
/**
|
|
130
130
|
* @param callback - signals when the call finishes
|
|
131
|
+
* @param options - additional data like modifiedFiles, removedFiles
|
|
131
132
|
*/
|
|
132
|
-
run(callback: liteTapable.Callback<Error, Stats
|
|
133
|
+
run(callback: liteTapable.Callback<Error, Stats>, options?: {
|
|
134
|
+
modifiedFiles?: ReadonlySet<string>;
|
|
135
|
+
removedFiles?: ReadonlySet<string>;
|
|
136
|
+
}): void;
|
|
133
137
|
runAsChild(callback: (err?: null | Error, entries?: Chunk[], compilation?: Compilation) => any): void;
|
|
134
138
|
purgeInputFileSystem(): void;
|
|
135
139
|
/**
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import type { JsDependenciesBlock } from "@rspack/binding";
|
|
2
|
-
import { Dependency } from "./Dependency";
|
|
1
|
+
import type { Dependency, JsDependenciesBlock } from "@rspack/binding";
|
|
3
2
|
export declare class DependenciesBlock {
|
|
4
3
|
#private;
|
|
5
4
|
readonly dependencies: Dependency[];
|
package/dist/Module.d.ts
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import type { AssetInfo, JsCodegenerationResult, JsContextModuleFactoryAfterResolveData, JsContextModuleFactoryBeforeResolveData, JsCreateData, JsFactoryMeta, JsLibIdentOptions } from "@rspack/binding";
|
|
1
|
+
import type { AssetInfo, Dependency, JsCodegenerationResult, JsContextModuleFactoryAfterResolveData, JsContextModuleFactoryBeforeResolveData, JsCreateData, JsFactoryMeta, JsLibIdentOptions } from "@rspack/binding";
|
|
2
2
|
import type { JsModule } from "@rspack/binding";
|
|
3
3
|
import type { Source } from "../compiled/webpack-sources";
|
|
4
4
|
import { DependenciesBlock } from "./DependenciesBlock";
|
|
5
|
-
import { Dependency } from "./Dependency";
|
|
6
5
|
export type ResourceData = {
|
|
7
6
|
resource: string;
|
|
8
7
|
path: string;
|
|
@@ -15,7 +14,7 @@ export type ResourceDataWithData = ResourceData & {
|
|
|
15
14
|
export type CreateData = Partial<JsCreateData>;
|
|
16
15
|
export type ContextInfo = {
|
|
17
16
|
issuer: string;
|
|
18
|
-
issuerLayer?: string;
|
|
17
|
+
issuerLayer?: string | null;
|
|
19
18
|
};
|
|
20
19
|
export type ResolveData = {
|
|
21
20
|
contextInfo: ContextInfo;
|
package/dist/ModuleGraph.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import type { JsModuleGraph } from "@rspack/binding";
|
|
2
|
-
import { Dependency } from "./Dependency";
|
|
1
|
+
import type { Dependency, JsModuleGraph } from "@rspack/binding";
|
|
3
2
|
import { ExportsInfo } from "./ExportsInfo";
|
|
4
3
|
import { Module } from "./Module";
|
|
5
4
|
import { ModuleGraphConnection } from "./ModuleGraphConnection";
|
|
@@ -17,4 +16,5 @@ export default class ModuleGraph {
|
|
|
17
16
|
getIncomingConnections(module: Module): ModuleGraphConnection[];
|
|
18
17
|
getParentBlockIndex(dependency: Dependency): number;
|
|
19
18
|
isAsync(module: Module): boolean;
|
|
19
|
+
getOutgoingConnectionsInOrder(module: Module): ModuleGraphConnection[];
|
|
20
20
|
}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import type { JsModuleGraphConnection } from "@rspack/binding";
|
|
2
|
-
import { Dependency } from "./Dependency";
|
|
1
|
+
import type { Dependency, JsModuleGraphConnection } from "@rspack/binding";
|
|
3
2
|
import { Module } from "./Module";
|
|
4
3
|
export declare class ModuleGraphConnection {
|
|
5
4
|
#private;
|
package/dist/MultiCompiler.d.ts
CHANGED
|
@@ -62,7 +62,14 @@ export declare class MultiCompiler {
|
|
|
62
62
|
* @returns a compiler watcher
|
|
63
63
|
*/
|
|
64
64
|
watch(watchOptions: WatchOptions, handler: liteTapable.Callback<Error, MultiStats>): MultiWatching;
|
|
65
|
-
|
|
65
|
+
/**
|
|
66
|
+
* @param callback - signals when the call finishes
|
|
67
|
+
* @param options - additional data like modifiedFiles, removedFiles
|
|
68
|
+
*/
|
|
69
|
+
run(callback: liteTapable.Callback<Error, MultiStats>, options?: {
|
|
70
|
+
modifiedFiles?: ReadonlySet<string>;
|
|
71
|
+
removedFiles?: ReadonlySet<string>;
|
|
72
|
+
}): void;
|
|
66
73
|
purgeInputFileSystem(): void;
|
|
67
74
|
close(callback: liteTapable.Callback<Error, void>): void;
|
|
68
75
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BuiltinPluginName, type JsEntryOptions } from "@rspack/binding";
|
|
1
|
+
import { BuiltinPluginName, EntryDependency, type JsEntryOptions } from "@rspack/binding";
|
|
2
2
|
import type { EntryDescriptionNormalized } from "../config";
|
|
3
3
|
/**
|
|
4
4
|
* Options for the `EntryPlugin`.
|
|
@@ -24,9 +24,6 @@ declare const OriginEntryPlugin: {
|
|
|
24
24
|
apply(compiler: import("..").Compiler): void;
|
|
25
25
|
};
|
|
26
26
|
};
|
|
27
|
-
interface EntryDependency {
|
|
28
|
-
request: string;
|
|
29
|
-
}
|
|
30
27
|
type EntryPluginType = typeof OriginEntryPlugin & {
|
|
31
28
|
createDependency(entry: string): EntryDependency;
|
|
32
29
|
};
|
package/dist/exports.d.ts
CHANGED
|
@@ -18,6 +18,7 @@ export { RuntimeGlobals } from "./RuntimeGlobals";
|
|
|
18
18
|
export type { StatsAsset, StatsChunk, StatsCompilation, StatsError, StatsModule } from "./Stats";
|
|
19
19
|
export { Stats } from "./Stats";
|
|
20
20
|
export { RuntimeModule } from "./RuntimeModule";
|
|
21
|
+
export { EntryDependency, Dependency } from "@rspack/binding";
|
|
21
22
|
import * as ModuleFilenameHelpers from "./lib/ModuleFilenameHelpers";
|
|
22
23
|
export { ModuleFilenameHelpers };
|
|
23
24
|
export { Template } from "./Template";
|
package/dist/index.js
CHANGED
|
@@ -696,9 +696,11 @@ __export(index_exports, {
|
|
|
696
696
|
CopyRspackPlugin: () => CopyRspackPlugin,
|
|
697
697
|
CssExtractRspackPlugin: () => CssExtractRspackPlugin,
|
|
698
698
|
DefinePlugin: () => DefinePlugin,
|
|
699
|
+
Dependency: () => import_binding82.Dependency,
|
|
699
700
|
DllPlugin: () => DllPlugin,
|
|
700
701
|
DllReferencePlugin: () => DllReferencePlugin,
|
|
701
702
|
DynamicEntryPlugin: () => DynamicEntryPlugin,
|
|
703
|
+
EntryDependency: () => import_binding82.EntryDependency,
|
|
702
704
|
EntryOptionPlugin: () => EntryOptionPlugin_default,
|
|
703
705
|
EntryPlugin: () => EntryPlugin,
|
|
704
706
|
EnvironmentPlugin: () => EnvironmentPlugin,
|
|
@@ -762,9 +764,11 @@ __export(exports_exports, {
|
|
|
762
764
|
CopyRspackPlugin: () => CopyRspackPlugin,
|
|
763
765
|
CssExtractRspackPlugin: () => CssExtractRspackPlugin,
|
|
764
766
|
DefinePlugin: () => DefinePlugin,
|
|
767
|
+
Dependency: () => import_binding82.Dependency,
|
|
765
768
|
DllPlugin: () => DllPlugin,
|
|
766
769
|
DllReferencePlugin: () => DllReferencePlugin,
|
|
767
770
|
DynamicEntryPlugin: () => DynamicEntryPlugin,
|
|
771
|
+
EntryDependency: () => import_binding82.EntryDependency,
|
|
768
772
|
EntryOptionPlugin: () => EntryOptionPlugin_default,
|
|
769
773
|
EntryPlugin: () => EntryPlugin,
|
|
770
774
|
EnvironmentPlugin: () => EnvironmentPlugin,
|
|
@@ -820,52 +824,6 @@ var import_package = require("../package.json");
|
|
|
820
824
|
var import_binding = require("@rspack/binding");
|
|
821
825
|
var liteTapable = __toESM(require("@rspack/lite-tapable"));
|
|
822
826
|
|
|
823
|
-
// src/Dependency.ts
|
|
824
|
-
var Dependency = class _Dependency {
|
|
825
|
-
#inner;
|
|
826
|
-
static __from_binding(binding9) {
|
|
827
|
-
return new _Dependency(binding9);
|
|
828
|
-
}
|
|
829
|
-
static __to_binding(data) {
|
|
830
|
-
return data.#inner;
|
|
831
|
-
}
|
|
832
|
-
constructor(binding9) {
|
|
833
|
-
this.#inner = binding9;
|
|
834
|
-
Object.defineProperties(this, {
|
|
835
|
-
type: {
|
|
836
|
-
enumerable: true,
|
|
837
|
-
get() {
|
|
838
|
-
return binding9.type;
|
|
839
|
-
}
|
|
840
|
-
},
|
|
841
|
-
category: {
|
|
842
|
-
enumerable: true,
|
|
843
|
-
get() {
|
|
844
|
-
return binding9.category;
|
|
845
|
-
}
|
|
846
|
-
},
|
|
847
|
-
request: {
|
|
848
|
-
enumerable: true,
|
|
849
|
-
get() {
|
|
850
|
-
return binding9.request;
|
|
851
|
-
}
|
|
852
|
-
},
|
|
853
|
-
critical: {
|
|
854
|
-
enumerable: true,
|
|
855
|
-
get() {
|
|
856
|
-
return binding9.critical;
|
|
857
|
-
},
|
|
858
|
-
set(val) {
|
|
859
|
-
binding9.critical = val;
|
|
860
|
-
}
|
|
861
|
-
}
|
|
862
|
-
});
|
|
863
|
-
}
|
|
864
|
-
get ids() {
|
|
865
|
-
return this.#inner.ids;
|
|
866
|
-
}
|
|
867
|
-
};
|
|
868
|
-
|
|
869
827
|
// src/DependenciesBlock.ts
|
|
870
828
|
var DependenciesBlock = class _DependenciesBlock {
|
|
871
829
|
#binding;
|
|
@@ -881,7 +839,7 @@ var DependenciesBlock = class _DependenciesBlock {
|
|
|
881
839
|
dependencies: {
|
|
882
840
|
enumerable: true,
|
|
883
841
|
get() {
|
|
884
|
-
return binding9.dependencies
|
|
842
|
+
return binding9.dependencies;
|
|
885
843
|
}
|
|
886
844
|
},
|
|
887
845
|
blocks: {
|
|
@@ -1047,9 +1005,7 @@ var ContextModuleFactoryAfterResolveData = class _ContextModuleFactoryAfterResol
|
|
|
1047
1005
|
dependencies: {
|
|
1048
1006
|
enumerable: true,
|
|
1049
1007
|
get() {
|
|
1050
|
-
return binding9.dependencies
|
|
1051
|
-
(dep) => Dependency.__from_binding(dep)
|
|
1052
|
-
);
|
|
1008
|
+
return binding9.dependencies;
|
|
1053
1009
|
}
|
|
1054
1010
|
}
|
|
1055
1011
|
});
|
|
@@ -1143,7 +1099,7 @@ var Module = class _Module {
|
|
|
1143
1099
|
dependencies: {
|
|
1144
1100
|
enumerable: true,
|
|
1145
1101
|
get() {
|
|
1146
|
-
return module2.dependencies
|
|
1102
|
+
return module2.dependencies;
|
|
1147
1103
|
}
|
|
1148
1104
|
},
|
|
1149
1105
|
useSourceMap: {
|
|
@@ -1588,7 +1544,7 @@ var ModuleGraphConnection = class _ModuleGraphConnection {
|
|
|
1588
1544
|
dependency: {
|
|
1589
1545
|
enumerable: true,
|
|
1590
1546
|
get() {
|
|
1591
|
-
return
|
|
1547
|
+
return binding9.dependency;
|
|
1592
1548
|
}
|
|
1593
1549
|
},
|
|
1594
1550
|
resolvedModule: {
|
|
@@ -1617,19 +1573,15 @@ var ModuleGraph = class _ModuleGraph {
|
|
|
1617
1573
|
this.#inner = binding9;
|
|
1618
1574
|
}
|
|
1619
1575
|
getModule(dependency) {
|
|
1620
|
-
const binding9 = this.#inner.getModule(
|
|
1576
|
+
const binding9 = this.#inner.getModule(dependency);
|
|
1621
1577
|
return binding9 ? Module.__from_binding(binding9) : null;
|
|
1622
1578
|
}
|
|
1623
1579
|
getResolvedModule(dependency) {
|
|
1624
|
-
const binding9 = this.#inner.getResolvedModule(
|
|
1625
|
-
Dependency.__to_binding(dependency)
|
|
1626
|
-
);
|
|
1580
|
+
const binding9 = this.#inner.getResolvedModule(dependency);
|
|
1627
1581
|
return binding9 ? Module.__from_binding(binding9) : null;
|
|
1628
1582
|
}
|
|
1629
1583
|
getParentModule(dependency) {
|
|
1630
|
-
const binding9 = this.#inner.getParentModule(
|
|
1631
|
-
Dependency.__to_binding(dependency)
|
|
1632
|
-
);
|
|
1584
|
+
const binding9 = this.#inner.getParentModule(dependency);
|
|
1633
1585
|
return binding9 ? Module.__from_binding(binding9) : null;
|
|
1634
1586
|
}
|
|
1635
1587
|
getIssuer(module2) {
|
|
@@ -1642,9 +1594,7 @@ var ModuleGraph = class _ModuleGraph {
|
|
|
1642
1594
|
);
|
|
1643
1595
|
}
|
|
1644
1596
|
getConnection(dependency) {
|
|
1645
|
-
const binding9 = this.#inner.getConnection(
|
|
1646
|
-
Dependency.__to_binding(dependency)
|
|
1647
|
-
);
|
|
1597
|
+
const binding9 = this.#inner.getConnection(dependency);
|
|
1648
1598
|
return binding9 ? ModuleGraphConnection.__from_binding(binding9) : null;
|
|
1649
1599
|
}
|
|
1650
1600
|
getOutgoingConnections(module2) {
|
|
@@ -1654,11 +1604,14 @@ var ModuleGraph = class _ModuleGraph {
|
|
|
1654
1604
|
return this.#inner.getIncomingConnections(Module.__to_binding(module2)).map((binding9) => ModuleGraphConnection.__from_binding(binding9));
|
|
1655
1605
|
}
|
|
1656
1606
|
getParentBlockIndex(dependency) {
|
|
1657
|
-
return this.#inner.getParentBlockIndex(
|
|
1607
|
+
return this.#inner.getParentBlockIndex(dependency);
|
|
1658
1608
|
}
|
|
1659
1609
|
isAsync(module2) {
|
|
1660
1610
|
return this.#inner.isAsync(Module.__to_binding(module2));
|
|
1661
1611
|
}
|
|
1612
|
+
getOutgoingConnectionsInOrder(module2) {
|
|
1613
|
+
return this.#inner.getOutgoingConnectionsInOrder(Module.__to_binding(module2)).map((binding9) => ModuleGraphConnection.__from_binding(binding9));
|
|
1614
|
+
}
|
|
1662
1615
|
};
|
|
1663
1616
|
|
|
1664
1617
|
// src/util/index.ts
|
|
@@ -3165,7 +3118,7 @@ BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a si
|
|
|
3165
3118
|
__privateGet(this, _inner).updateAsset(
|
|
3166
3119
|
filename2,
|
|
3167
3120
|
compatNewSourceOrFunction,
|
|
3168
|
-
assetInfoUpdateOrFunction
|
|
3121
|
+
assetInfoUpdateOrFunction
|
|
3169
3122
|
);
|
|
3170
3123
|
}
|
|
3171
3124
|
/**
|
|
@@ -3740,7 +3693,7 @@ var AddIncludeDispatcher = class {
|
|
|
3740
3693
|
const cb = cbs[i];
|
|
3741
3694
|
cb(
|
|
3742
3695
|
errMsg ? new WebpackError_default(errMsg) : null,
|
|
3743
|
-
Module.__from_binding(moduleBinding)
|
|
3696
|
+
moduleBinding ? Module.__from_binding(moduleBinding) : void 0
|
|
3744
3697
|
);
|
|
3745
3698
|
}
|
|
3746
3699
|
});
|
|
@@ -3762,10 +3715,8 @@ var EntryData = class _EntryData {
|
|
|
3762
3715
|
return new _EntryData(binding9);
|
|
3763
3716
|
}
|
|
3764
3717
|
constructor(binding9) {
|
|
3765
|
-
this.dependencies = binding9.dependencies
|
|
3766
|
-
this.includeDependencies = binding9.includeDependencies
|
|
3767
|
-
Dependency.__from_binding
|
|
3768
|
-
);
|
|
3718
|
+
this.dependencies = binding9.dependencies;
|
|
3719
|
+
this.includeDependencies = binding9.includeDependencies;
|
|
3769
3720
|
this.options = binding9.options;
|
|
3770
3721
|
}
|
|
3771
3722
|
};
|
|
@@ -7607,11 +7558,7 @@ var OriginEntryPlugin = create2(
|
|
|
7607
7558
|
"make"
|
|
7608
7559
|
);
|
|
7609
7560
|
var EntryPlugin = OriginEntryPlugin;
|
|
7610
|
-
EntryPlugin.createDependency = (request) =>
|
|
7611
|
-
return {
|
|
7612
|
-
request
|
|
7613
|
-
};
|
|
7614
|
-
};
|
|
7561
|
+
EntryPlugin.createDependency = (request) => new import_binding19.EntryDependency(request);
|
|
7615
7562
|
function getRawEntryOptions(entry2) {
|
|
7616
7563
|
const runtime = entry2.runtime;
|
|
7617
7564
|
const chunkLoading2 = entry2.chunkLoading;
|
|
@@ -13419,6 +13366,7 @@ var Watching = class {
|
|
|
13419
13366
|
);
|
|
13420
13367
|
}
|
|
13421
13368
|
#go(fileTimeInfoEntries, contextTimeInfoEntries, changedFiles, removedFiles) {
|
|
13369
|
+
this.#initial = false;
|
|
13422
13370
|
if (this.startTime === void 0) this.startTime = Date.now();
|
|
13423
13371
|
this.running = true;
|
|
13424
13372
|
if (this.watcher) {
|
|
@@ -13439,15 +13387,14 @@ var Watching = class {
|
|
|
13439
13387
|
this.compiler.fileTimestamps = fileTimeInfoEntries2;
|
|
13440
13388
|
this.compiler.contextTimestamps = contextTimeInfoEntries2;
|
|
13441
13389
|
}
|
|
13442
|
-
|
|
13443
|
-
|
|
13390
|
+
this.compiler.modifiedFiles = this.#collectedChangedFiles;
|
|
13391
|
+
this.compiler.removedFiles = this.#collectedRemovedFiles;
|
|
13444
13392
|
this.#collectedChangedFiles = void 0;
|
|
13445
13393
|
this.#collectedRemovedFiles = void 0;
|
|
13446
13394
|
this.invalid = false;
|
|
13447
13395
|
this.#invalidReported = false;
|
|
13448
13396
|
this.compiler.hooks.watchRun.callAsync(this.compiler, (err) => {
|
|
13449
13397
|
if (err) return this._done(err);
|
|
13450
|
-
const canRebuild = !this.#initial && ((modifiedFiles == null ? void 0 : modifiedFiles.size) || (deleteFiles == null ? void 0 : deleteFiles.size));
|
|
13451
13398
|
const onCompiled = (err2, _compilation) => {
|
|
13452
13399
|
if (err2) return this._done(err2);
|
|
13453
13400
|
const compilation = _compilation;
|
|
@@ -13469,9 +13416,6 @@ var Watching = class {
|
|
|
13469
13416
|
this._done(null, this.compiler._lastCompilation);
|
|
13470
13417
|
};
|
|
13471
13418
|
this.compiler.compile(onCompiled);
|
|
13472
|
-
if (!canRebuild) {
|
|
13473
|
-
this.#initial = false;
|
|
13474
|
-
}
|
|
13475
13419
|
});
|
|
13476
13420
|
}
|
|
13477
13421
|
/**
|
|
@@ -14651,7 +14595,8 @@ var createNormalModuleFactoryHooksRegisters = (getCompiler, createTap, createMap
|
|
|
14651
14595
|
return async function(resolveData) {
|
|
14652
14596
|
const normalizedResolveData = {
|
|
14653
14597
|
contextInfo: {
|
|
14654
|
-
issuer: resolveData.issuer
|
|
14598
|
+
issuer: resolveData.issuer,
|
|
14599
|
+
issuerLayer: resolveData.issuerLayer ?? null
|
|
14655
14600
|
},
|
|
14656
14601
|
request: resolveData.request,
|
|
14657
14602
|
context: resolveData.context,
|
|
@@ -14675,7 +14620,8 @@ var createNormalModuleFactoryHooksRegisters = (getCompiler, createTap, createMap
|
|
|
14675
14620
|
return async function(resolveData) {
|
|
14676
14621
|
const normalizedResolveData = {
|
|
14677
14622
|
contextInfo: {
|
|
14678
|
-
issuer: resolveData.issuer
|
|
14623
|
+
issuer: resolveData.issuer,
|
|
14624
|
+
issuerLayer: resolveData.issuerLayer ?? null
|
|
14679
14625
|
},
|
|
14680
14626
|
request: resolveData.request,
|
|
14681
14627
|
context: resolveData.context,
|
|
@@ -14699,7 +14645,8 @@ var createNormalModuleFactoryHooksRegisters = (getCompiler, createTap, createMap
|
|
|
14699
14645
|
return async function(resolveData) {
|
|
14700
14646
|
const normalizedResolveData = {
|
|
14701
14647
|
contextInfo: {
|
|
14702
|
-
issuer: resolveData.issuer
|
|
14648
|
+
issuer: resolveData.issuer,
|
|
14649
|
+
issuerLayer: resolveData.issuerLayer ?? null
|
|
14703
14650
|
},
|
|
14704
14651
|
request: resolveData.request,
|
|
14705
14652
|
context: resolveData.context,
|
|
@@ -14735,7 +14682,8 @@ var createNormalModuleFactoryHooksRegisters = (getCompiler, createTap, createMap
|
|
|
14735
14682
|
return async function(arg) {
|
|
14736
14683
|
const data = {
|
|
14737
14684
|
contextInfo: {
|
|
14738
|
-
issuer: arg.issuer
|
|
14685
|
+
issuer: arg.issuer,
|
|
14686
|
+
issuerLayer: arg.issuerLayer ?? null
|
|
14739
14687
|
},
|
|
14740
14688
|
request: arg.request,
|
|
14741
14689
|
context: arg.context,
|
|
@@ -14989,11 +14937,14 @@ var Compiler = class _Compiler {
|
|
|
14989
14937
|
}
|
|
14990
14938
|
/**
|
|
14991
14939
|
* @param callback - signals when the call finishes
|
|
14940
|
+
* @param options - additional data like modifiedFiles, removedFiles
|
|
14992
14941
|
*/
|
|
14993
|
-
run(callback) {
|
|
14942
|
+
run(callback, options = {}) {
|
|
14994
14943
|
if (this.running) {
|
|
14995
14944
|
return callback(new ConcurrentCompilationError());
|
|
14996
14945
|
}
|
|
14946
|
+
this.modifiedFiles = options.modifiedFiles;
|
|
14947
|
+
this.removedFiles = options.removedFiles;
|
|
14997
14948
|
const startTime = Date.now();
|
|
14998
14949
|
this.running = true;
|
|
14999
14950
|
const finalCallback = (err, stats) => {
|
|
@@ -15215,28 +15166,18 @@ var Compiler = class _Compiler {
|
|
|
15215
15166
|
#build(callback) {
|
|
15216
15167
|
this.#getInstance((error, instance) => {
|
|
15217
15168
|
if (error) {
|
|
15218
|
-
return callback
|
|
15169
|
+
return callback(error);
|
|
15219
15170
|
}
|
|
15220
15171
|
if (!this.#initial) {
|
|
15221
15172
|
instance.rebuild(
|
|
15222
15173
|
Array.from(this.modifiedFiles || []),
|
|
15223
15174
|
Array.from(this.removedFiles || []),
|
|
15224
|
-
|
|
15225
|
-
if (error2) {
|
|
15226
|
-
return callback == null ? void 0 : callback(error2);
|
|
15227
|
-
}
|
|
15228
|
-
callback == null ? void 0 : callback(null);
|
|
15229
|
-
}
|
|
15175
|
+
callback
|
|
15230
15176
|
);
|
|
15231
15177
|
return;
|
|
15232
15178
|
}
|
|
15233
15179
|
this.#initial = false;
|
|
15234
|
-
instance.build(
|
|
15235
|
-
if (error2) {
|
|
15236
|
-
return callback == null ? void 0 : callback(error2);
|
|
15237
|
-
}
|
|
15238
|
-
callback == null ? void 0 : callback(null);
|
|
15239
|
-
});
|
|
15180
|
+
instance.build(callback);
|
|
15240
15181
|
});
|
|
15241
15182
|
}
|
|
15242
15183
|
/**
|
|
@@ -16096,7 +16037,11 @@ var MultiCompiler = class {
|
|
|
16096
16037
|
}
|
|
16097
16038
|
return new MultiWatching_default([], this);
|
|
16098
16039
|
}
|
|
16099
|
-
|
|
16040
|
+
/**
|
|
16041
|
+
* @param callback - signals when the call finishes
|
|
16042
|
+
* @param options - additional data like modifiedFiles, removedFiles
|
|
16043
|
+
*/
|
|
16044
|
+
run(callback, options) {
|
|
16100
16045
|
if (this.running) {
|
|
16101
16046
|
return callback(new ConcurrentCompilationError());
|
|
16102
16047
|
}
|
|
@@ -16105,7 +16050,7 @@ var MultiCompiler = class {
|
|
|
16105
16050
|
this.#runGraph(
|
|
16106
16051
|
() => {
|
|
16107
16052
|
},
|
|
16108
|
-
(compiler, _, callback2) => compiler.run(callback2),
|
|
16053
|
+
(compiler, _, callback2) => compiler.run(callback2, options),
|
|
16109
16054
|
(err, stats) => {
|
|
16110
16055
|
this.running = false;
|
|
16111
16056
|
if (callback !== void 0) {
|
|
@@ -19339,6 +19284,9 @@ var RspackOptionsApply = class {
|
|
|
19339
19284
|
}
|
|
19340
19285
|
};
|
|
19341
19286
|
|
|
19287
|
+
// src/exports.ts
|
|
19288
|
+
var import_binding82 = require("@rspack/binding");
|
|
19289
|
+
|
|
19342
19290
|
// src/lib/ModuleFilenameHelpers.ts
|
|
19343
19291
|
var ModuleFilenameHelpers_exports = {};
|
|
19344
19292
|
__export(ModuleFilenameHelpers_exports, {
|
|
@@ -20814,7 +20762,7 @@ var ModuleFederationPluginV1 = class {
|
|
|
20814
20762
|
};
|
|
20815
20763
|
|
|
20816
20764
|
// src/exports.ts
|
|
20817
|
-
var
|
|
20765
|
+
var import_binding83 = require("@rspack/binding");
|
|
20818
20766
|
var rspackVersion = import_package.version;
|
|
20819
20767
|
var version = import_package.webpackVersion;
|
|
20820
20768
|
var WebpackError2 = Error;
|
|
@@ -20861,7 +20809,7 @@ var sharing = {
|
|
|
20861
20809
|
var experiments2 = {
|
|
20862
20810
|
globalTrace: {
|
|
20863
20811
|
async register(filter, layer2, output2) {
|
|
20864
|
-
(0,
|
|
20812
|
+
(0, import_binding83.registerGlobalTrace)(filter, layer2, output2);
|
|
20865
20813
|
if (layer2 === "otel") {
|
|
20866
20814
|
try {
|
|
20867
20815
|
const { initOpenTelemetry } = await import("@rspack/tracing");
|
|
@@ -20875,7 +20823,7 @@ var experiments2 = {
|
|
|
20875
20823
|
}
|
|
20876
20824
|
},
|
|
20877
20825
|
async cleanup() {
|
|
20878
|
-
(0,
|
|
20826
|
+
(0, import_binding83.cleanupGlobalTrace)();
|
|
20879
20827
|
try {
|
|
20880
20828
|
const { shutdownOpenTelemetry } = await import("@rspack/tracing");
|
|
20881
20829
|
await shutdownOpenTelemetry();
|
|
@@ -21009,9 +20957,11 @@ module.exports = rspack;
|
|
|
21009
20957
|
CopyRspackPlugin,
|
|
21010
20958
|
CssExtractRspackPlugin,
|
|
21011
20959
|
DefinePlugin,
|
|
20960
|
+
Dependency,
|
|
21012
20961
|
DllPlugin,
|
|
21013
20962
|
DllReferencePlugin,
|
|
21014
20963
|
DynamicEntryPlugin,
|
|
20964
|
+
EntryDependency,
|
|
21015
20965
|
EntryOptionPlugin,
|
|
21016
20966
|
EntryPlugin,
|
|
21017
20967
|
EnvironmentPlugin,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rspack/core",
|
|
3
|
-
"version": "1.2.7
|
|
3
|
+
"version": "1.2.7",
|
|
4
4
|
"webpackVersion": "5.75.0",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"description": "The fast Rust-based web bundler with webpack-compatible API",
|
|
@@ -57,13 +57,13 @@
|
|
|
57
57
|
"webpack-sources": "3.2.3",
|
|
58
58
|
"zod": "^3.24.2",
|
|
59
59
|
"zod-validation-error": "3.4.0",
|
|
60
|
-
"@rspack/tracing": "1.2.7
|
|
60
|
+
"@rspack/tracing": "1.2.7"
|
|
61
61
|
},
|
|
62
62
|
"dependencies": {
|
|
63
63
|
"@module-federation/runtime-tools": "0.8.4",
|
|
64
64
|
"@rspack/lite-tapable": "1.0.1",
|
|
65
65
|
"caniuse-lite": "^1.0.30001700",
|
|
66
|
-
"@rspack/binding": "1.2.7
|
|
66
|
+
"@rspack/binding": "1.2.7"
|
|
67
67
|
},
|
|
68
68
|
"peerDependencies": {
|
|
69
69
|
"@rspack/tracing": "^1.x",
|
package/dist/Dependency.d.ts
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import type { JsDependency } from "@rspack/binding";
|
|
2
|
-
export declare class Dependency {
|
|
3
|
-
#private;
|
|
4
|
-
readonly type: string;
|
|
5
|
-
readonly category: string;
|
|
6
|
-
readonly request: string | undefined;
|
|
7
|
-
critical: boolean;
|
|
8
|
-
static __from_binding(binding: JsDependency): Dependency;
|
|
9
|
-
static __to_binding(data: Dependency): JsDependency;
|
|
10
|
-
private constructor();
|
|
11
|
-
get ids(): string[] | undefined;
|
|
12
|
-
}
|