@rspack-debug/core 2.0.5 → 2.0.6
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/compiled/@rspack/lite-tapable/dist/index.d.ts +4 -4
- package/compiled/@rspack/lite-tapable/package.json +1 -1
- package/compiled/connect-next/package.json +1 -1
- package/dist/612.js +32 -0
- package/dist/builtin-plugin/DeterministicModuleIdsPlugin.d.ts +11 -0
- package/dist/exports.d.ts +2 -1
- package/dist/index.js +50 -53
- package/dist/worker.js +1 -18
- package/package.json +11 -11
|
@@ -18,9 +18,9 @@ export type AsArray<T> = T extends any[] ? T : [T];
|
|
|
18
18
|
export type Fn<T, R> = (...args: AsArray<T>) => R;
|
|
19
19
|
export type FnAsync<T, R> = (...args: Append<AsArray<T>, InnerCallback<Error, R>>) => void;
|
|
20
20
|
export type FnPromise<T, R> = (...args: AsArray<T>) => Promise<R>;
|
|
21
|
-
|
|
21
|
+
type UnsetAdditionalOptions = {
|
|
22
22
|
_UnsetAdditionalOptions: true;
|
|
23
|
-
}
|
|
23
|
+
};
|
|
24
24
|
type IfSet<X> = X extends UnsetAdditionalOptions ? {} : X;
|
|
25
25
|
export type Callback<E, T> = (error: E | null, result?: T) => void;
|
|
26
26
|
type InnerCallback<E, T> = (error?: E | null | false, result?: T) => void;
|
|
@@ -36,7 +36,7 @@ type TapOptions = {
|
|
|
36
36
|
stage?: number;
|
|
37
37
|
};
|
|
38
38
|
export type Options<AdditionalOptions = UnsetAdditionalOptions> = string | (Tap & IfSet<AdditionalOptions>);
|
|
39
|
-
export interface HookInterceptor<
|
|
39
|
+
export interface HookInterceptor<_T, R, AdditionalOptions = UnsetAdditionalOptions> {
|
|
40
40
|
name?: string;
|
|
41
41
|
tap?: (tap: FullTap & IfSet<AdditionalOptions>) => void;
|
|
42
42
|
call?: (...args: any[]) => void;
|
|
@@ -76,7 +76,7 @@ export declare class HookBase<T, R, AdditionalOptions = UnsetAdditionalOptions>
|
|
|
76
76
|
withOptions(options: TapOptions & IfSet<AdditionalOptions>): Hook<T, R, AdditionalOptions>;
|
|
77
77
|
isUsed(): boolean;
|
|
78
78
|
queryStageRange(stageRange: StageRange): QueriedHook<T, R, AdditionalOptions>;
|
|
79
|
-
callAsyncStageRange(
|
|
79
|
+
callAsyncStageRange(_queried: QueriedHook<T, R, AdditionalOptions>, ..._args: Append<AsArray<T>, Callback<Error, R>>): void;
|
|
80
80
|
callAsync(...args: Append<AsArray<T>, Callback<Error, R>>): void;
|
|
81
81
|
promiseStageRange(queried: QueriedHook<T, R, AdditionalOptions>, ...args: AsArray<T>): Promise<R>;
|
|
82
82
|
promise(...args: AsArray<T>): Promise<R>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"@rspack/lite-tapable","version":"1.1.
|
|
1
|
+
{"name":"@rspack/lite-tapable","version":"1.1.1","license":"MIT","types":"./dist/index.d.ts","type":"module"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"connect-next","author":"TJ Holowaychuk <tj@vision-media.ca> (http://tjholowaychuk.com)","version":"4.0.
|
|
1
|
+
{"name":"connect-next","author":"TJ Holowaychuk <tj@vision-media.ca> (http://tjholowaychuk.com)","version":"4.0.2","license":"MIT","types":"index.d.ts","type":"module"}
|
package/dist/612.js
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
var __webpack_modules__ = {}, __webpack_module_cache__ = {};
|
|
2
|
+
function __webpack_require__(moduleId) {
|
|
3
|
+
var cachedModule = __webpack_module_cache__[moduleId];
|
|
4
|
+
if (void 0 !== cachedModule) return cachedModule.exports;
|
|
5
|
+
var module = __webpack_module_cache__[moduleId] = {
|
|
6
|
+
exports: {}
|
|
7
|
+
};
|
|
8
|
+
return __webpack_modules__[moduleId](module, module.exports, __webpack_require__), module.exports;
|
|
9
|
+
}
|
|
10
|
+
__webpack_require__.m = __webpack_modules__, __webpack_require__.n = (module)=>{
|
|
11
|
+
var getter = module && module.__esModule ? ()=>module.default : ()=>module;
|
|
12
|
+
return __webpack_require__.d(getter, {
|
|
13
|
+
a: getter
|
|
14
|
+
}), getter;
|
|
15
|
+
}, __webpack_require__.d = (exports, getters, values)=>{
|
|
16
|
+
var define = (defs, kind)=>{
|
|
17
|
+
for(var key in defs)__webpack_require__.o(defs, key) && !__webpack_require__.o(exports, key) && Object.defineProperty(exports, key, {
|
|
18
|
+
enumerable: !0,
|
|
19
|
+
[kind]: defs[key]
|
|
20
|
+
});
|
|
21
|
+
};
|
|
22
|
+
define(getters, "get"), define(values, "value");
|
|
23
|
+
}, __webpack_require__.add = function(modules) {
|
|
24
|
+
Object.assign(__webpack_require__.m, modules);
|
|
25
|
+
}, __webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop), __webpack_require__.r = (exports)=>{
|
|
26
|
+
"u" > typeof Symbol && Symbol.toStringTag && Object.defineProperty(exports, Symbol.toStringTag, {
|
|
27
|
+
value: 'Module'
|
|
28
|
+
}), Object.defineProperty(exports, '__esModule', {
|
|
29
|
+
value: !0
|
|
30
|
+
});
|
|
31
|
+
};
|
|
32
|
+
export { __webpack_require__ };
|
|
@@ -1,7 +1,18 @@
|
|
|
1
1
|
import { type BuiltinPlugin, BuiltinPluginName } from '@rspack/binding';
|
|
2
2
|
import { RspackBuiltinPlugin } from './base.js';
|
|
3
|
+
import type { Module } from '../Module.js';
|
|
4
|
+
export interface DeterministicModuleIdsPluginOptions {
|
|
5
|
+
context?: string;
|
|
6
|
+
test?: (module: Module) => boolean;
|
|
7
|
+
maxLength?: number;
|
|
8
|
+
salt?: number;
|
|
9
|
+
fixedLength?: boolean;
|
|
10
|
+
failOnConflict?: boolean;
|
|
11
|
+
}
|
|
3
12
|
export declare class DeterministicModuleIdsPlugin extends RspackBuiltinPlugin {
|
|
13
|
+
private options;
|
|
4
14
|
name: BuiltinPluginName;
|
|
5
15
|
affectedHooks: 'compilation';
|
|
16
|
+
constructor(options?: DeterministicModuleIdsPluginOptions);
|
|
6
17
|
raw(): BuiltinPlugin;
|
|
7
18
|
}
|
package/dist/exports.d.ts
CHANGED
|
@@ -79,8 +79,9 @@ interface Electron {
|
|
|
79
79
|
ElectronTargetPlugin: typeof ElectronTargetPlugin;
|
|
80
80
|
}
|
|
81
81
|
export declare const electron: Electron;
|
|
82
|
-
import { HashedModuleIdsPlugin } from './builtin-plugin/index.js';
|
|
82
|
+
import { DeterministicModuleIdsPlugin, HashedModuleIdsPlugin } from './builtin-plugin/index.js';
|
|
83
83
|
interface Ids {
|
|
84
|
+
DeterministicModuleIdsPlugin: typeof DeterministicModuleIdsPlugin;
|
|
84
85
|
HashedModuleIdsPlugin: typeof HashedModuleIdsPlugin;
|
|
85
86
|
}
|
|
86
87
|
export declare const ids: Ids;
|
package/dist/index.js
CHANGED
|
@@ -4,36 +4,10 @@ import { createRequire, createRequire as __rspack_createRequire } from "node:mod
|
|
|
4
4
|
import node_path, { isAbsolute, join, relative, resolve as external_node_path_resolve, sep } from "node:path";
|
|
5
5
|
import node_querystring from "node:querystring";
|
|
6
6
|
import node_fs, { readFileSync } from "node:fs";
|
|
7
|
+
import { __webpack_require__ } from "./612.js";
|
|
7
8
|
let __rspack_createRequire_require = __rspack_createRequire(import.meta.url);
|
|
8
9
|
import * as __rspack_external_node_util_1b29d436 from "node:util";
|
|
9
|
-
|
|
10
|
-
function __webpack_require__(moduleId) {
|
|
11
|
-
var cachedModule = __webpack_module_cache__[moduleId];
|
|
12
|
-
if (void 0 !== cachedModule) return cachedModule.exports;
|
|
13
|
-
var module = __webpack_module_cache__[moduleId] = {
|
|
14
|
-
exports: {}
|
|
15
|
-
};
|
|
16
|
-
return __webpack_modules__[moduleId](module, module.exports, __webpack_require__), module.exports;
|
|
17
|
-
}
|
|
18
|
-
__webpack_require__.m = __webpack_modules__, __webpack_require__.n = (module)=>{
|
|
19
|
-
var getter = module && module.__esModule ? ()=>module.default : ()=>module;
|
|
20
|
-
return __webpack_require__.d(getter, {
|
|
21
|
-
a: getter
|
|
22
|
-
}), getter;
|
|
23
|
-
}, __webpack_require__.d = (exports, definition)=>{
|
|
24
|
-
for(var key in definition)__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key) && Object.defineProperty(exports, key, {
|
|
25
|
-
enumerable: !0,
|
|
26
|
-
get: definition[key]
|
|
27
|
-
});
|
|
28
|
-
}, __webpack_require__.add = function(modules) {
|
|
29
|
-
Object.assign(__webpack_require__.m, modules);
|
|
30
|
-
}, __webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop), __webpack_require__.r = (exports)=>{
|
|
31
|
-
"u" > typeof Symbol && Symbol.toStringTag && Object.defineProperty(exports, Symbol.toStringTag, {
|
|
32
|
-
value: 'Module'
|
|
33
|
-
}), Object.defineProperty(exports, '__esModule', {
|
|
34
|
-
value: !0
|
|
35
|
-
});
|
|
36
|
-
}, __webpack_require__.add({
|
|
10
|
+
__webpack_require__.add({
|
|
37
11
|
"../../node_modules/.pnpm/enhanced-resolve@5.21.3/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js" (module, __unused_rspack_exports, __webpack_require__) {
|
|
38
12
|
let { nextTick } = __webpack_require__("process"), dirname = (path)=>{
|
|
39
13
|
let idx = path.length - 1;
|
|
@@ -243,7 +217,7 @@ __webpack_require__.m = __webpack_modules__, __webpack_require__.n = (module)=>{
|
|
|
243
217
|
module.exports = __rspack_createRequire_require("process");
|
|
244
218
|
}
|
|
245
219
|
});
|
|
246
|
-
var browserslistTargetHandler_namespaceObject = {};
|
|
220
|
+
var RuntimeGlobals, key, StatsErrorCode, browserslistTargetHandler_namespaceObject = {};
|
|
247
221
|
__webpack_require__.r(browserslistTargetHandler_namespaceObject), __webpack_require__.d(browserslistTargetHandler_namespaceObject, {
|
|
248
222
|
resolve: ()=>browserslistTargetHandler_resolve
|
|
249
223
|
});
|
|
@@ -385,7 +359,7 @@ class HookBase {
|
|
|
385
359
|
queryStageRange(stageRange) {
|
|
386
360
|
return new QueriedHook(stageRange, this);
|
|
387
361
|
}
|
|
388
|
-
callAsyncStageRange(
|
|
362
|
+
callAsyncStageRange(_queried) {
|
|
389
363
|
throw Error('Hook should implement there own _callAsyncStageRange');
|
|
390
364
|
}
|
|
391
365
|
callAsync(...args) {
|
|
@@ -2609,10 +2583,16 @@ class DeterministicChunkIdsPlugin extends RspackBuiltinPlugin {
|
|
|
2609
2583
|
}
|
|
2610
2584
|
}
|
|
2611
2585
|
class DeterministicModuleIdsPlugin extends RspackBuiltinPlugin {
|
|
2586
|
+
options;
|
|
2612
2587
|
name = binding_namespaceObject.BuiltinPluginName.DeterministicModuleIdsPlugin;
|
|
2613
2588
|
affectedHooks = 'compilation';
|
|
2589
|
+
constructor(options = {}){
|
|
2590
|
+
super(), this.options = options;
|
|
2591
|
+
}
|
|
2614
2592
|
raw() {
|
|
2615
|
-
return createBuiltinPlugin(this.name,
|
|
2593
|
+
return createBuiltinPlugin(this.name, {
|
|
2594
|
+
...this.options
|
|
2595
|
+
});
|
|
2616
2596
|
}
|
|
2617
2597
|
}
|
|
2618
2598
|
let DllEntryPlugin = base_create(binding_namespaceObject.BuiltinPluginName.DllEntryPlugin, (context, entries, options)=>({
|
|
@@ -5823,7 +5803,21 @@ let configCache = {}, ES_VERSIONS_MAP = {
|
|
|
5823
5803
|
ios_saf: 'safari',
|
|
5824
5804
|
and_chr: 'chrome',
|
|
5825
5805
|
and_ff: 'firefox'
|
|
5826
|
-
}, renameBrowser = (name)=>aliases[name] || name,
|
|
5806
|
+
}, renameBrowser = (name)=>aliases[name] || name, resolveESVersion = (version, thresholds)=>{
|
|
5807
|
+
let index = thresholds.findIndex((threshold)=>version < threshold);
|
|
5808
|
+
return -1 === index ? 2024 : [
|
|
5809
|
+
2015,
|
|
5810
|
+
2016,
|
|
5811
|
+
2017,
|
|
5812
|
+
2018,
|
|
5813
|
+
2019,
|
|
5814
|
+
2020,
|
|
5815
|
+
2021,
|
|
5816
|
+
2022,
|
|
5817
|
+
2023,
|
|
5818
|
+
2024
|
|
5819
|
+
][index - 1] ?? 5;
|
|
5820
|
+
}, browserslistTargetHandler_resolve = (browsers)=>{
|
|
5827
5821
|
let rawChecker = (versions)=>browsers.every((v)=>{
|
|
5828
5822
|
let [name, parsedVersion] = v.split(' ');
|
|
5829
5823
|
if (!name) return !1;
|
|
@@ -6349,7 +6343,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
|
6349
6343
|
break;
|
|
6350
6344
|
}
|
|
6351
6345
|
let versions = ES_VERSIONS_MAP[browser];
|
|
6352
|
-
versions && (
|
|
6346
|
+
versions && (esVersion = Math.min(resolveESVersion(version, versions), esVersion));
|
|
6353
6347
|
}
|
|
6354
6348
|
return esVersion;
|
|
6355
6349
|
}(browsers)
|
|
@@ -6560,12 +6554,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
|
6560
6554
|
}
|
|
6561
6555
|
}
|
|
6562
6556
|
throw Error(`Unknown target '${target}'. The following targets are supported:\n${TARGETS.map(([name, description])=>`* ${name}: ${description}`).join('\n')}`);
|
|
6563
|
-
},
|
|
6564
|
-
let context;
|
|
6565
|
-
F(options, 'context', ()=>process.cwd()), F(options, 'target', ()=>hasBrowserslistConfig(options.context) ? 'browserslist' : 'web');
|
|
6566
|
-
let { mode, target } = options;
|
|
6567
|
-
if (isNil(target)) throw Error('target should not be nil after defaults');
|
|
6568
|
-
let targetProperties = !1 !== target && ('string' == typeof target ? getTargetProperties(target, options.context) : (context = options.context, ((targetProperties)=>{
|
|
6557
|
+
}, getTargetsProperties = (targets, context)=>((targetProperties)=>{
|
|
6569
6558
|
let keys = new Set();
|
|
6570
6559
|
for (let tp of targetProperties)for (let key of Object.keys(tp))keys.add(key);
|
|
6571
6560
|
let result = {};
|
|
@@ -6599,7 +6588,11 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
|
6599
6588
|
(hasTrue || hasFalse) && (result[key] = hasFalse && hasTrue ? null : hasTrue);
|
|
6600
6589
|
}
|
|
6601
6590
|
return result;
|
|
6602
|
-
})(
|
|
6591
|
+
})(targets.map((t)=>getTargetProperties(t, context))), applyRspackOptionsDefaults = (options)=>{
|
|
6592
|
+
F(options, 'context', ()=>process.cwd()), F(options, 'target', ()=>hasBrowserslistConfig(options.context) ? 'browserslist' : 'web');
|
|
6593
|
+
let { mode, target } = options;
|
|
6594
|
+
if (isNil(target)) throw Error('target should not be nil after defaults');
|
|
6595
|
+
let targetProperties = !1 !== target && ('string' == typeof target ? getTargetProperties(target, options.context) : getTargetsProperties(target, options.context)), development = 'development' === mode, production = 'production' === mode || !mode;
|
|
6603
6596
|
if ('function' != typeof options.entry) for (let key of Object.keys(options.entry))F(options.entry[key], 'import', ()=>[
|
|
6604
6597
|
'./src'
|
|
6605
6598
|
]);
|
|
@@ -6956,7 +6949,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
|
6956
6949
|
return output.wasmLoading && enabledWasmLoadingTypes.add(output.wasmLoading), output.workerWasmLoading && enabledWasmLoadingTypes.add(output.workerWasmLoading), forEachEntry((desc)=>{
|
|
6957
6950
|
desc.wasmLoading && enabledWasmLoadingTypes.add(desc.wasmLoading);
|
|
6958
6951
|
}), Array.from(enabledWasmLoadingTypes);
|
|
6959
|
-
}), D(output, 'bundlerInfo', {}), 'object' == typeof output.bundlerInfo && (D(output.bundlerInfo, 'version', "2.0.
|
|
6952
|
+
}), D(output, 'bundlerInfo', {}), 'object' == typeof output.bundlerInfo && (D(output.bundlerInfo, 'version', "2.0.6"), D(output.bundlerInfo, 'bundler', 'rspack'), D(output.bundlerInfo, 'force', !1));
|
|
6960
6953
|
}, applyExternalsPresetsDefaults = (externalsPresets, { targetProperties, buildHttp, outputModule })=>{
|
|
6961
6954
|
let isUniversal = (key)=>!!(outputModule && targetProperties && null === targetProperties[key]);
|
|
6962
6955
|
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')));
|
|
@@ -8210,7 +8203,7 @@ class MultiStats {
|
|
|
8210
8203
|
obj.children = this.stats.map((stat, idx)=>{
|
|
8211
8204
|
let obj = stat.toJson(childOptions.children[idx]), compilationName = stat.compilation.name;
|
|
8212
8205
|
return obj.name = compilationName && makePathsRelative(childOptions.context, compilationName, stat.compilation.compiler.root), obj;
|
|
8213
|
-
}), childOptions.version && (obj.rspackVersion = "2.0.
|
|
8206
|
+
}), childOptions.version && (obj.rspackVersion = "2.0.6", obj.version = "5.75.0"), childOptions.hash && (obj.hash = obj.children.map((j)=>j.hash).join(''));
|
|
8214
8207
|
let mapError = (j, obj)=>({
|
|
8215
8208
|
...obj,
|
|
8216
8209
|
compilerPath: obj.compilerPath ? `${j.name}.${obj.compilerPath}` : j.name
|
|
@@ -9484,7 +9477,7 @@ let iterateConfig = (config, options, fn)=>{
|
|
|
9484
9477
|
object.hash = context.getStatsCompilation(compilation).hash;
|
|
9485
9478
|
},
|
|
9486
9479
|
version: (object)=>{
|
|
9487
|
-
object.version = "5.75.0", object.rspackVersion = "2.0.
|
|
9480
|
+
object.version = "5.75.0", object.rspackVersion = "2.0.6";
|
|
9488
9481
|
},
|
|
9489
9482
|
env: (object, _compilation, _context, { _env })=>{
|
|
9490
9483
|
object.env = _env;
|
|
@@ -10710,9 +10703,11 @@ class RspackOptionsApply {
|
|
|
10710
10703
|
process(options, compiler) {
|
|
10711
10704
|
if (!options.output.path) throw Error('options.output.path should have a value after `applyRspackOptionsDefaults`');
|
|
10712
10705
|
if (compiler.outputPath = options.output.path, compiler.name = options.name, compiler.outputFileSystem = node_fs, options.externals) {
|
|
10713
|
-
let presets;
|
|
10714
10706
|
if (!options.externalsType) throw Error('options.externalsType should have a value after `applyRspackOptionsDefaults`');
|
|
10715
|
-
new ExternalsPlugin(options.externalsType, options.externals, !1, (
|
|
10707
|
+
new ExternalsPlugin(options.externalsType, options.externals, !1, function(options) {
|
|
10708
|
+
let { context, target } = options;
|
|
10709
|
+
return (assertNotNill(context), null == target || !1 === target) ? 'commonjs' : ('string' == typeof target ? getTargetProperties(target, context) : getTargetsProperties(target, context)).nodeBuiltins ? 'node-commonjs' : 'commonjs';
|
|
10710
|
+
}(options)).apply(compiler);
|
|
10716
10711
|
}
|
|
10717
10712
|
if (options.externalsPresets.node && (new NodeTargetPlugin().apply(compiler), new CssHttpExternalsRspackPlugin().apply(compiler)), options.externalsPresets.electronMain && new ElectronTargetPlugin('main').apply(compiler), options.externalsPresets.electronPreload && new ElectronTargetPlugin('preload').apply(compiler), options.externalsPresets.electronRenderer && new ElectronTargetPlugin('renderer').apply(compiler), !options.externalsPresets.electron || options.externalsPresets.electronMain || options.externalsPresets.electronPreload || options.externalsPresets.electronRenderer || new ElectronTargetPlugin().apply(compiler), options.externalsPresets.nwjs && new ExternalsPlugin('node-commonjs', 'nw.gui', !1).apply(compiler), (options.externalsPresets.web || options.externalsPresets.webAsync) && new HttpExternalsRspackPlugin(!!options.externalsPresets.webAsync).apply(compiler), new ChunkPrefetchPreloadPlugin().apply(compiler), options.output.pathinfo && new ModuleInfoHeaderPlugin('verbose' === options.output.pathinfo).apply(compiler), 'string' == typeof options.output.chunkFormat) switch(options.output.chunkFormat){
|
|
10718
10713
|
case 'array-push':
|
|
@@ -11143,7 +11138,7 @@ class TraceHookPlugin {
|
|
|
11143
11138
|
});
|
|
11144
11139
|
}
|
|
11145
11140
|
}
|
|
11146
|
-
let CORE_VERSION = "2.0.
|
|
11141
|
+
let CORE_VERSION = "2.0.6", VFILES_BY_COMPILER = new WeakMap();
|
|
11147
11142
|
class VirtualModulesPlugin {
|
|
11148
11143
|
#staticModules;
|
|
11149
11144
|
#compiler;
|
|
@@ -11365,6 +11360,7 @@ class Compiler {
|
|
|
11365
11360
|
#platform;
|
|
11366
11361
|
#target;
|
|
11367
11362
|
options;
|
|
11363
|
+
#rawOptions;
|
|
11368
11364
|
unsafeFastDrop = !1;
|
|
11369
11365
|
__internal_browser_require;
|
|
11370
11366
|
constructor(context, options){
|
|
@@ -11639,7 +11635,7 @@ class Compiler {
|
|
|
11639
11635
|
});
|
|
11640
11636
|
}
|
|
11641
11637
|
close(callback) {
|
|
11642
|
-
|
|
11638
|
+
this.watching ? this.watching.close(()=>{
|
|
11643
11639
|
this.close(callback);
|
|
11644
11640
|
}) : this.hooks.shutdown.callAsync((err)=>{
|
|
11645
11641
|
if (err) return callback(err);
|
|
@@ -11663,7 +11659,7 @@ class Compiler {
|
|
|
11663
11659
|
}
|
|
11664
11660
|
__internal__create_compilation(native) {
|
|
11665
11661
|
let compilation = this.#bindingCompilationMap.get(native);
|
|
11666
|
-
return compilation
|
|
11662
|
+
return compilation || ((compilation = new Compilation(this, native)).name = this.name, this.#bindingCompilationMap.set(native, compilation)), this.#compilation = compilation, compilation;
|
|
11667
11663
|
}
|
|
11668
11664
|
__internal__get_virtual_file_store() {
|
|
11669
11665
|
return this.#instance?.getVirtualFileStore();
|
|
@@ -11699,7 +11695,8 @@ Help:
|
|
|
11699
11695
|
`));
|
|
11700
11696
|
if (error) return callback(error);
|
|
11701
11697
|
if (this.#instance) return callback(null, this.#instance);
|
|
11702
|
-
let { options } = this
|
|
11698
|
+
let { options } = this;
|
|
11699
|
+
this.#rawOptions = (mode = options.mode, experiments = options.experiments, {
|
|
11703
11700
|
name: options.name,
|
|
11704
11701
|
mode,
|
|
11705
11702
|
context: options.context,
|
|
@@ -11784,13 +11781,12 @@ Help:
|
|
|
11784
11781
|
amd: options.amd ? JSON.stringify(options.amd || {}) : void 0,
|
|
11785
11782
|
bail: options.bail,
|
|
11786
11783
|
__references: {}
|
|
11787
|
-
});
|
|
11788
|
-
rawOptions.__references = Object.fromEntries(this.#ruleSet.builtinReferences.entries()), rawOptions.__virtual_files = VirtualModulesPlugin.__internal__take_virtual_files(this);
|
|
11784
|
+
}), this.#rawOptions.__references = Object.fromEntries(this.#ruleSet.builtinReferences.entries()), this.#rawOptions.__virtual_files = VirtualModulesPlugin.__internal__take_virtual_files(this);
|
|
11789
11785
|
let instanceBinding = Compiler_require(process.env.RSPACK_BINDING ? process.env.RSPACK_BINDING : '@rspack/binding');
|
|
11790
11786
|
this.#registers = this.#createHooksRegisters();
|
|
11791
11787
|
let inputFileSystem = this.inputFileSystem && ThreadsafeInputNodeFS.needsBinding(options.experiments.useInputFileSystem) ? ThreadsafeInputNodeFS.__to_binding(this.inputFileSystem) : void 0;
|
|
11792
11788
|
try {
|
|
11793
|
-
this.#instance = new instanceBinding.JsCompiler(this.compilerPath, rawOptions, this.#builtinPlugins, this.#registers, ThreadsafeOutputNodeFS.__to_binding(this.outputFileSystem), this.intermediateFileSystem ? ThreadsafeIntermediateNodeFS.__to_binding(this.intermediateFileSystem) : void 0, inputFileSystem, ResolverFactory.__to_binding(this.resolverFactory), this.unsafeFastDrop, this.#platform), callback(null, this.#instance);
|
|
11789
|
+
this.#instance = new instanceBinding.JsCompiler(this.compilerPath, this.#rawOptions, this.#builtinPlugins, this.#registers, ThreadsafeOutputNodeFS.__to_binding(this.outputFileSystem), this.intermediateFileSystem ? ThreadsafeIntermediateNodeFS.__to_binding(this.intermediateFileSystem) : void 0, inputFileSystem, ResolverFactory.__to_binding(this.resolverFactory), this.unsafeFastDrop, this.#platform), callback(null, this.#instance);
|
|
11794
11790
|
} catch (err) {
|
|
11795
11791
|
err instanceof Error && delete err.stack, callback(Error('Failed to create Rspack compiler instance, check the Rspack configuration.', {
|
|
11796
11792
|
cause: err
|
|
@@ -13447,7 +13443,7 @@ async function transform(source, options) {
|
|
|
13447
13443
|
let _options = JSON.stringify(options || {});
|
|
13448
13444
|
return binding_default().transform(source, _options);
|
|
13449
13445
|
}
|
|
13450
|
-
let exports_rspackVersion = "2.0.
|
|
13446
|
+
let exports_rspackVersion = "2.0.6", exports_version = "5.75.0", exports_WebpackError = Error, exports_config = {
|
|
13451
13447
|
getNormalizedRspackOptions: getNormalizedRspackOptions,
|
|
13452
13448
|
applyRspackOptionsDefaults: applyRspackOptionsDefaults,
|
|
13453
13449
|
getNormalizedWebpackOptions: getNormalizedRspackOptions,
|
|
@@ -13478,6 +13474,7 @@ let exports_rspackVersion = "2.0.5", exports_version = "5.75.0", exports_Webpack
|
|
|
13478
13474
|
}, electron = {
|
|
13479
13475
|
ElectronTargetPlugin: ElectronTargetPlugin
|
|
13480
13476
|
}, exports_ids = {
|
|
13477
|
+
DeterministicModuleIdsPlugin: DeterministicModuleIdsPlugin,
|
|
13481
13478
|
HashedModuleIdsPlugin: HashedModuleIdsPlugin
|
|
13482
13479
|
}, exports_library = {
|
|
13483
13480
|
EnableLibraryPlugin: EnableLibraryPlugin
|
package/dist/worker.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
let createMd4, createXxhash64, url;
|
|
2
|
+
import { __webpack_require__ } from "./612.js";
|
|
2
3
|
import node_fs from "node:fs";
|
|
3
4
|
import node_querystring from "node:querystring";
|
|
4
5
|
import { inspect, promisify } from "node:util";
|
|
@@ -6,24 +7,6 @@ import { receiveMessageOnPort } from "node:worker_threads";
|
|
|
6
7
|
import { createRequire, createRequire as __rspack_createRequire } from "node:module";
|
|
7
8
|
import node_path from "node:path";
|
|
8
9
|
let __rspack_createRequire_require = __rspack_createRequire(import.meta.url);
|
|
9
|
-
var __webpack_require__ = {};
|
|
10
|
-
__webpack_require__.n = (module)=>{
|
|
11
|
-
var getter = module && module.__esModule ? ()=>module.default : ()=>module;
|
|
12
|
-
return __webpack_require__.d(getter, {
|
|
13
|
-
a: getter
|
|
14
|
-
}), getter;
|
|
15
|
-
}, __webpack_require__.d = (exports, definition)=>{
|
|
16
|
-
for(var key in definition)__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key) && Object.defineProperty(exports, key, {
|
|
17
|
-
enumerable: !0,
|
|
18
|
-
get: definition[key]
|
|
19
|
-
});
|
|
20
|
-
}, __webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop), __webpack_require__.r = (exports)=>{
|
|
21
|
-
"u" > typeof Symbol && Symbol.toStringTag && Object.defineProperty(exports, Symbol.toStringTag, {
|
|
22
|
-
value: 'Module'
|
|
23
|
-
}), Object.defineProperty(exports, '__esModule', {
|
|
24
|
-
value: !0
|
|
25
|
-
});
|
|
26
|
-
};
|
|
27
10
|
var swc_namespaceObject = {};
|
|
28
11
|
__webpack_require__.r(swc_namespaceObject), __webpack_require__.d(swc_namespaceObject, {
|
|
29
12
|
minify: ()=>minify,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rspack-debug/core",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.6",
|
|
4
4
|
"webpackVersion": "5.75.0",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"description": "Fast Rust-based bundler for the web with a modernized webpack API",
|
|
@@ -37,28 +37,28 @@
|
|
|
37
37
|
"directory": "packages/rspack"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
|
-
"@ast-grep/napi": "^0.
|
|
40
|
+
"@ast-grep/napi": "^0.43.0",
|
|
41
41
|
"@napi-rs/wasm-runtime": "1.1.4",
|
|
42
|
-
"@rsbuild/plugin-node-polyfill": "^1.4.
|
|
43
|
-
"@rslib/core": "^0.
|
|
44
|
-
"@rspack/lite-tapable": "1.1.
|
|
42
|
+
"@rsbuild/plugin-node-polyfill": "^1.4.5",
|
|
43
|
+
"@rslib/core": "^0.22.0",
|
|
44
|
+
"@rspack/lite-tapable": "1.1.1",
|
|
45
45
|
"@swc/types": "0.1.26",
|
|
46
46
|
"@types/node": "^20.19.41",
|
|
47
|
-
"browserslist-load-config": "^1.0.
|
|
48
|
-
"browserslist-to-es-version": "^1.4.
|
|
49
|
-
"connect-next": "^4.0.
|
|
47
|
+
"browserslist-load-config": "^1.0.2",
|
|
48
|
+
"browserslist-to-es-version": "^1.4.2",
|
|
49
|
+
"connect-next": "^4.0.2",
|
|
50
50
|
"enhanced-resolve": "5.21.3",
|
|
51
51
|
"http-proxy-middleware": "^4.0.0",
|
|
52
|
-
"memfs": "4.57.
|
|
52
|
+
"memfs": "4.57.3",
|
|
53
53
|
"open": "^11.0.0",
|
|
54
|
-
"prebundle": "^1.6.
|
|
54
|
+
"prebundle": "^1.6.5",
|
|
55
55
|
"tinypool": "^2.1.0",
|
|
56
56
|
"typescript": "^6.0.3",
|
|
57
57
|
"watchpack": "2.5.1",
|
|
58
58
|
"webpack-sources": "3.3.4"
|
|
59
59
|
},
|
|
60
60
|
"dependencies": {
|
|
61
|
-
"@rspack/binding": "npm:@rspack-debug/binding@2.0.
|
|
61
|
+
"@rspack/binding": "npm:@rspack-debug/binding@2.0.6"
|
|
62
62
|
},
|
|
63
63
|
"peerDependencies": {
|
|
64
64
|
"@module-federation/runtime-tools": "^0.24.1 || ^2.0.0",
|