@rspack/core 1.3.13 → 1.3.15
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/webpack-sources/index.js +112 -132
- package/compiled/webpack-sources/package.json +1 -1
- package/compiled/webpack-sources/types.d.ts +8 -6
- package/compiled/zod/dist/types/v3/types.d.ts +2 -2
- package/compiled/zod/dist/types/v4/classic/coerce.d.ts +5 -5
- package/compiled/zod/dist/types/v4/classic/external.d.ts +6 -1
- package/compiled/zod/dist/types/v4/classic/schemas.d.ts +88 -130
- package/compiled/zod/dist/types/v4/core/api.d.ts +2 -2
- package/compiled/zod/dist/types/v4/core/core.d.ts +11 -7
- package/compiled/zod/dist/types/v4/core/errors.d.ts +0 -1
- package/compiled/zod/dist/types/v4/core/function.d.ts +16 -11
- package/compiled/zod/dist/types/v4/core/regexes.d.ts +0 -1
- package/compiled/zod/dist/types/v4/core/registries.d.ts +6 -1
- package/compiled/zod/dist/types/v4/core/schemas.d.ts +144 -116
- package/compiled/zod/dist/types/v4/core/util.d.ts +5 -9
- package/compiled/zod/dist/types/v4/locales/ar.d.ts +0 -3
- package/compiled/zod/dist/types/v4/locales/az.d.ts +0 -3
- package/compiled/zod/dist/types/v4/locales/be.d.ts +0 -3
- package/compiled/zod/dist/types/v4/locales/ca.d.ts +0 -3
- package/compiled/zod/dist/types/v4/locales/cs.d.ts +0 -3
- package/compiled/zod/dist/types/v4/locales/de.d.ts +0 -3
- package/compiled/zod/dist/types/v4/locales/en.d.ts +0 -2
- package/compiled/zod/dist/types/v4/locales/es.d.ts +0 -3
- package/compiled/zod/dist/types/v4/locales/fa.d.ts +0 -3
- package/compiled/zod/dist/types/v4/locales/fi.d.ts +0 -3
- package/compiled/zod/dist/types/v4/locales/{frCA.d.ts → fr-CA.d.ts} +0 -3
- package/compiled/zod/dist/types/v4/locales/fr.d.ts +0 -3
- package/compiled/zod/dist/types/v4/locales/he.d.ts +0 -3
- package/compiled/zod/dist/types/v4/locales/hu.d.ts +0 -3
- package/compiled/zod/dist/types/v4/locales/id.d.ts +0 -3
- package/compiled/zod/dist/types/v4/locales/index.d.ts +5 -2
- package/compiled/zod/dist/types/v4/locales/it.d.ts +0 -3
- package/compiled/zod/dist/types/v4/locales/ja.d.ts +0 -3
- package/compiled/zod/dist/types/v4/locales/{zh-tw.d.ts → kh.d.ts} +0 -3
- package/compiled/zod/dist/types/v4/locales/ko.d.ts +0 -3
- package/compiled/zod/dist/types/v4/locales/mk.d.ts +0 -3
- package/compiled/zod/dist/types/v4/locales/ms.d.ts +0 -3
- package/compiled/zod/dist/types/v4/locales/nl.d.ts +4 -0
- package/compiled/zod/dist/types/v4/locales/no.d.ts +0 -3
- package/compiled/zod/dist/types/v4/locales/ota.d.ts +0 -3
- package/compiled/zod/dist/types/v4/locales/pl.d.ts +0 -3
- package/compiled/zod/dist/types/v4/locales/pt.d.ts +0 -3
- package/compiled/zod/dist/types/v4/locales/ru.d.ts +0 -3
- package/compiled/zod/dist/types/v4/locales/sl.d.ts +0 -3
- package/compiled/zod/dist/types/v4/locales/sv.d.ts +4 -0
- package/compiled/zod/dist/types/v4/locales/ta.d.ts +0 -3
- package/compiled/zod/dist/types/v4/locales/th.d.ts +0 -3
- package/compiled/zod/dist/types/v4/locales/tr.d.ts +0 -2
- package/compiled/zod/dist/types/v4/locales/ua.d.ts +0 -3
- package/compiled/zod/dist/types/v4/locales/ur.d.ts +0 -3
- package/compiled/zod/dist/types/v4/locales/vi.d.ts +0 -3
- package/compiled/zod/dist/types/v4/locales/zh-CN.d.ts +0 -3
- package/compiled/zod/dist/types/v4/locales/zh-TW.d.ts +4 -0
- package/compiled/zod/dist/types/v4/mini/external.d.ts +5 -1
- package/compiled/zod/dist/types/v4/mini/schemas.d.ts +39 -48
- package/compiled/zod/index.js +41 -63
- package/compiled/zod/package.json +1 -1
- package/compiled/zod/v3/index.d.ts +3 -1
- package/compiled/zod/v4/core/index.d.ts +1 -1
- package/compiled/zod/v4/index.d.ts +3 -1
- package/compiled/zod/v4/locales/index.d.ts +1 -1
- package/compiled/zod/v4-mini/index.d.ts +1 -1
- package/dist/ErrorHelpers.d.ts +0 -15
- package/dist/Module.d.ts +5 -1
- package/dist/ModuleTypeConstants.d.ts +0 -85
- package/dist/Resolver.d.ts +2 -1
- package/dist/RspackError.d.ts +0 -3
- package/dist/builtin-loader/lightningcss/index.d.ts +23 -1
- package/dist/builtin-loader/swc/types.d.ts +289 -2426
- package/dist/builtin-plugin/APIPlugin.d.ts +1 -1
- package/dist/builtin-plugin/ArrayPushCallbackChunkFormatPlugin.d.ts +1 -1
- package/dist/builtin-plugin/AssetModulesPlugin.d.ts +1 -1
- package/dist/builtin-plugin/AsyncWebAssemblyModulesPlugin.d.ts +1 -1
- package/dist/builtin-plugin/BannerPlugin.d.ts +1 -1
- package/dist/builtin-plugin/BundlerInfoRspackPlugin.d.ts +1 -1
- package/dist/builtin-plugin/ChunkPrefetchPreloadPlugin.d.ts +1 -1
- package/dist/builtin-plugin/CommonJsChunkFormatPlugin.d.ts +1 -1
- package/dist/builtin-plugin/ContextReplacementPlugin.d.ts +1 -1
- package/dist/builtin-plugin/CopyRspackPlugin.d.ts +1 -1
- package/dist/builtin-plugin/CssChunkingPlugin.d.ts +1 -1
- package/dist/builtin-plugin/CssModulesPlugin.d.ts +1 -1
- package/dist/builtin-plugin/DataUriPlugin.d.ts +1 -1
- package/dist/builtin-plugin/DefinePlugin.d.ts +1 -1
- package/dist/builtin-plugin/DllEntryPlugin.d.ts +1 -1
- package/dist/builtin-plugin/DllReferenceAgencyPlugin.d.ts +1 -1
- package/dist/builtin-plugin/ElectronTargetPlugin.d.ts +1 -1
- package/dist/builtin-plugin/EnableChunkLoadingPlugin.d.ts +1 -1
- package/dist/builtin-plugin/EnableWasmLoadingPlugin.d.ts +1 -1
- package/dist/builtin-plugin/EnsureChunkConditionsPlugin.d.ts +1 -1
- package/dist/builtin-plugin/EntryPlugin.d.ts +1 -1
- package/dist/builtin-plugin/EvalDevToolModulePlugin.d.ts +1 -1
- package/dist/builtin-plugin/EvalSourceMapDevToolPlugin.d.ts +1 -1
- package/dist/builtin-plugin/FetchCompileAsyncWasmPlugin.d.ts +1 -1
- package/dist/builtin-plugin/FileUriPlugin.d.ts +1 -1
- package/dist/builtin-plugin/FlagAllModulesAsUsedPlugin.d.ts +1 -1
- package/dist/builtin-plugin/FlagDependencyExportsPlugin.d.ts +1 -1
- package/dist/builtin-plugin/HttpExternalsRspackPlugin.d.ts +1 -1
- package/dist/builtin-plugin/IgnorePlugin.d.ts +1 -1
- package/dist/builtin-plugin/InferAsyncModulesPlugin.d.ts +1 -1
- package/dist/builtin-plugin/JsLoaderRspackPlugin.d.ts +1 -1
- package/dist/builtin-plugin/JsonModulesPlugin.d.ts +1 -1
- package/dist/builtin-plugin/LibManifestPlugin.d.ts +1 -1
- package/dist/builtin-plugin/LightningCssMinimizerRspackPlugin.d.ts +1 -1
- package/dist/builtin-plugin/LimitChunkCountPlugin.d.ts +1 -1
- package/dist/builtin-plugin/MergeDuplicateChunksPlugin.d.ts +1 -1
- package/dist/builtin-plugin/ModuleChunkFormatPlugin.d.ts +1 -1
- package/dist/builtin-plugin/ModuleInfoHeaderPlugin.d.ts +1 -1
- package/dist/builtin-plugin/NamedChunkIdsPlugin.d.ts +1 -1
- package/dist/builtin-plugin/NamedModuleIdsPlugin.d.ts +1 -1
- package/dist/builtin-plugin/NoEmitOnErrorsPlugin.d.ts +1 -1
- package/dist/builtin-plugin/NodeTargetPlugin.d.ts +1 -1
- package/dist/builtin-plugin/OccurrenceChunkIdsPlugin.d.ts +1 -1
- package/dist/builtin-plugin/ProgressPlugin.d.ts +1 -1
- package/dist/builtin-plugin/ProvidePlugin.d.ts +1 -1
- package/dist/builtin-plugin/RealContentHashPlugin.d.ts +1 -1
- package/dist/builtin-plugin/RemoveDuplicateModulesPlugin.d.ts +1 -1
- package/dist/builtin-plugin/RemoveEmptyChunksPlugin.d.ts +1 -1
- package/dist/builtin-plugin/RsdoctorPlugin.d.ts +1 -1
- package/dist/builtin-plugin/RstestPlugin.d.ts +1 -1
- package/dist/builtin-plugin/RuntimeChunkPlugin.d.ts +1 -1
- package/dist/builtin-plugin/RuntimePlugin.d.ts +1 -1
- package/dist/builtin-plugin/SideEffectsFlagPlugin.d.ts +1 -1
- package/dist/builtin-plugin/SizeLimitsPlugin.d.ts +1 -1
- package/dist/builtin-plugin/SourceMapDevToolPlugin.d.ts +1 -1
- package/dist/builtin-plugin/SubresourceIntegrityPlugin.d.ts +1 -1
- package/dist/builtin-plugin/SwcJsMinimizerPlugin.d.ts +1 -1
- package/dist/builtin-plugin/WarnCaseSensitiveModulesPlugin.d.ts +1 -1
- package/dist/builtin-plugin/base.d.ts +1 -2
- package/dist/builtin-plugin/html-plugin/plugin.d.ts +1 -1
- package/dist/builtin-plugin/lazy-compilation/lazyCompilation.d.ts +1 -1
- package/dist/config/zod.d.ts +370 -370
- package/dist/container/ModuleFederationRuntimePlugin.d.ts +1 -1
- package/dist/index.js +57 -30
- package/dist/lib/AbstractMethodError.d.ts +0 -1
- package/dist/lib/CacheFacade.d.ts +0 -28
- package/dist/loader-runner/index.d.ts +1 -0
- package/dist/stats/statsFactoryUtils.d.ts +0 -4
- package/dist/util/cleverMerge.d.ts +0 -30
- package/dist/util/comparators.d.ts +0 -4
- package/dist/util/hash/wasm-hash.d.ts +0 -1
- package/dist/util/identifier.d.ts +0 -12
- package/dist/util/index.d.ts +1 -7
- package/dist/util/memoize.d.ts +0 -1
- package/dist/worker.js +5 -7
- package/package.json +5 -5
- package/dist/util/hash/BatchedHash.d.ts +0 -25
@@ -3,7 +3,7 @@ export declare const ModuleFederationRuntimePlugin: {
|
|
3
3
|
new (): {
|
4
4
|
name: BuiltinPluginName;
|
5
5
|
_args: [];
|
6
|
-
affectedHooks: "done" | "make" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "
|
6
|
+
affectedHooks: "done" | "compilation" | "make" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | "additionalPass" | undefined;
|
7
7
|
raw(compiler: import("..").Compiler): import("@rspack/binding").BuiltinPlugin;
|
8
8
|
apply(compiler: import("..").Compiler): void;
|
9
9
|
};
|
package/dist/index.js
CHANGED
@@ -1536,7 +1536,7 @@ for(var __webpack_i__ in (()=>{
|
|
1536
1536
|
function serializeObject(map) {
|
1537
1537
|
if (!isNil(map)) return "string" == typeof map ? map ? toBuffer(map) : void 0 : toBuffer(JSON.stringify(map));
|
1538
1538
|
}
|
1539
|
-
function
|
1539
|
+
function concatErrorMsgAndStack(err) {
|
1540
1540
|
return "string" == typeof err ? Error(err) : (!("hideStack" in err && err.hideStack) && "stack" in err ? err.message = err.stack || err.toString() : err.message = err.toString(), err.stack = err.stack || void 0, "loc" in err && (err.loc = JSON.stringify(err.loc)), err);
|
1541
1541
|
}
|
1542
1542
|
function stringifyLoaderObject(o) {
|
@@ -1559,14 +1559,14 @@ for(var __webpack_i__ in (()=>{
|
|
1559
1559
|
case 2:
|
1560
1560
|
return adm.spliceWithArray(index, deleteCount);
|
1561
1561
|
}
|
1562
|
-
return adm.spliceWithArray(index, deleteCount, newItems.map((item)=>
|
1562
|
+
return adm.spliceWithArray(index, deleteCount, newItems.map((item)=>concatErrorMsgAndStack(item)));
|
1563
1563
|
}, arrayExtensions = {
|
1564
1564
|
[Symbol.iterator]: ()=>adm.values().values(),
|
1565
1565
|
splice,
|
1566
|
-
push: (...newItems)=>(adm.spliceWithArray(adm.length, 0, newItems.map((item)=>
|
1566
|
+
push: (...newItems)=>(adm.spliceWithArray(adm.length, 0, newItems.map((item)=>concatErrorMsgAndStack(item))), adm.length),
|
1567
1567
|
pop: ()=>splice(Math.max(adm.length - 1, 0), 1)[0],
|
1568
1568
|
shift: ()=>splice(0, 1)[0],
|
1569
|
-
unshift: (...newItems)=>(adm.spliceWithArray(0, 0, newItems.map((item)=>
|
1569
|
+
unshift: (...newItems)=>(adm.spliceWithArray(0, 0, newItems.map((item)=>concatErrorMsgAndStack(item))), adm.length),
|
1570
1570
|
reverse: ()=>adm.values().reverse(),
|
1571
1571
|
sort (compareFn) {
|
1572
1572
|
let copy = adm.values();
|
@@ -1590,7 +1590,7 @@ for(var __webpack_i__ in (()=>{
|
|
1590
1590
|
get: (target, name)=>"length" === name ? adm.length : "string" != typeof name || Number.isNaN(Number.parseInt(name)) ? Object.prototype.hasOwnProperty.call(arrayExtensions, name) ? arrayExtensions[name] : target[name] : adm.get(Number.parseInt(name)),
|
1591
1591
|
set (target, name, value) {
|
1592
1592
|
if ("length" === name) throw Error("The 'length' property is read-only and cannot be assigned a new value.");
|
1593
|
-
return "symbol" == typeof name || Number.isNaN(Number.parseInt(name)) ? target[name] = value : adm.set(Number.parseInt(name),
|
1593
|
+
return "symbol" == typeof name || Number.isNaN(Number.parseInt(name)) ? target[name] = value : adm.set(Number.parseInt(name), concatErrorMsgAndStack(value)), !0;
|
1594
1594
|
}
|
1595
1595
|
});
|
1596
1596
|
return adm[$proxy] = proxy, proxy;
|
@@ -2254,11 +2254,11 @@ BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a si
|
|
2254
2254
|
this.message = match?.[1] ? createMessage(match[1]) : createMessage();
|
2255
2255
|
}
|
2256
2256
|
}
|
2257
|
-
|
2257
|
+
class AbstractMethodError extends WebpackError {
|
2258
2258
|
constructor(){
|
2259
2259
|
super(new Message().message), this.name = "AbstractMethodError";
|
2260
2260
|
}
|
2261
|
-
}
|
2261
|
+
}
|
2262
2262
|
class Hash {
|
2263
2263
|
update(data, inputEncoding) {
|
2264
2264
|
throw new AbstractMethodError();
|
@@ -2876,9 +2876,7 @@ BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a si
|
|
2876
2876
|
return innerSubCache?.set(identifier, result), result;
|
2877
2877
|
};
|
2878
2878
|
}, cachedFn;
|
2879
|
-
}, makePathsRelative = makeCacheableWithContext((context, identifier)=>identifier.split(SEGMENTS_SPLIT_REGEXP).map((str)=>absoluteToRequest(context, str)).join(""))
|
2880
|
-
makeCacheableWithContext((context, identifier)=>identifier.split(SEGMENTS_SPLIT_REGEXP).map((str)=>requestToAbsolute(context, str)).join(""));
|
2881
|
-
let contextify = makeCacheableWithContext((context, request)=>request.split("!").map((r)=>absoluteToRequest(context, r)).join("!")), absolutify = makeCacheableWithContext((context, request)=>request.split("!").map((r)=>requestToAbsolute(context, r)).join("!")), PATH_QUERY_FRAGMENT_REGEXP = /^((?:\u200b.|[^?#\u200b])*)(\?(?:\u200b.|[^#\u200b])*)?(#.*)?$/, PATH_QUERY_REGEXP = /^((?:\u200b.|[^?\u200b])*)(\?.*)?$/, parseResource = makeCacheable((str)=>{
|
2879
|
+
}, makePathsRelative = makeCacheableWithContext((context, identifier)=>identifier.split(SEGMENTS_SPLIT_REGEXP).map((str)=>absoluteToRequest(context, str)).join("")), contextify = makeCacheableWithContext((context, request)=>request.split("!").map((r)=>absoluteToRequest(context, r)).join("!")), absolutify = makeCacheableWithContext((context, request)=>request.split("!").map((r)=>requestToAbsolute(context, r)).join("!")), PATH_QUERY_FRAGMENT_REGEXP = /^((?:\u200b.|[^?#\u200b])*)(\?(?:\u200b.|[^#\u200b])*)?(#.*)?$/, PATH_QUERY_REGEXP = /^((?:\u200b.|[^?\u200b])*)(\?.*)?$/, parseResource = makeCacheable((str)=>{
|
2882
2880
|
let match = PATH_QUERY_FRAGMENT_REGEXP.exec(str);
|
2883
2881
|
return {
|
2884
2882
|
resource: str,
|
@@ -3263,7 +3261,7 @@ BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a si
|
|
3263
3261
|
}
|
3264
3262
|
}
|
3265
3263
|
function handleResult(loader, module, callback) {
|
3266
|
-
return "function" != typeof module && "object" != typeof module ? callback(new LoaderLoadingError(`Module '${loader.path}' is not a loader (export function or es6 module)`)) : (loader.normal = "function" == typeof module ? module : module.default, loader.pitch = module.pitch, loader.raw = module.raw, "function" != typeof loader.normal && "function" != typeof loader.pitch) ? callback(new LoaderLoadingError(`Module '${loader.path}' is not a loader (must have normal or pitch function)`)) : void callback();
|
3264
|
+
return "function" != typeof module && "object" != typeof module ? callback(new LoaderLoadingError(`Module '${loader.path}' is not a loader (export function or es6 module)`)) : (loader.normal = "function" == typeof module ? module : module.default, loader.pitch = module.pitch, loader.raw = module.raw, loader.pitch || (loader.noPitch = !0), "function" != typeof loader.normal && "function" != typeof loader.pitch) ? callback(new LoaderLoadingError(`Module '${loader.path}' is not a loader (must have normal or pitch function)`)) : void callback();
|
3267
3265
|
}
|
3268
3266
|
let decoder = new TextDecoder(), utils_loadLoader = (0, external_node_util_namespaceObject.promisify)(loadLoader), utils_runSyncOrAsync = (0, external_node_util_namespaceObject.promisify)(function(fn, context, args, callback) {
|
3269
3267
|
let isSync = !0, isDone = !1, isError = !1, reportedError = !1;
|
@@ -3364,6 +3362,9 @@ BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a si
|
|
3364
3362
|
set normalExecuted(value) {
|
3365
3363
|
external_node_assert_default()(value), this.loaderItem.normalExecuted = !0;
|
3366
3364
|
}
|
3365
|
+
set noPitch(value) {
|
3366
|
+
external_node_assert_default()(value), this.loaderItem.noPitch = !0;
|
3367
|
+
}
|
3367
3368
|
shouldYield() {
|
3368
3369
|
return this.request.startsWith(BUILTIN_LOADER_PREFIX);
|
3369
3370
|
}
|
@@ -3508,13 +3509,13 @@ BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a si
|
|
3508
3509
|
].filter(Boolean).join("|"));
|
3509
3510
|
}, loaderContext.rootContext = compiler.context, loaderContext.emitError = function(err) {
|
3510
3511
|
let error = err;
|
3511
|
-
error instanceof Error || (error = new NonErrorEmittedError(error)), error.name = "ModuleError", error.message = `${error.message} (from: ${stringifyLoaderObject(loaderContext.loaders[loaderContext.loaderIndex])})`, (error =
|
3512
|
+
error instanceof Error || (error = new NonErrorEmittedError(error)), error.name = "ModuleError", error.message = `${error.message} (from: ${stringifyLoaderObject(loaderContext.loaders[loaderContext.loaderIndex])})`, (error = concatErrorMsgAndStack(error)).moduleIdentifier = loaderContext._module.identifier(), compiler._lastCompilation.__internal__pushRspackDiagnostic({
|
3512
3513
|
error,
|
3513
3514
|
severity: binding_.JsRspackSeverity.Error
|
3514
3515
|
});
|
3515
3516
|
}, loaderContext.emitWarning = function(warn) {
|
3516
3517
|
let warning = warn;
|
3517
|
-
warning instanceof Error || (warning = new NonErrorEmittedError(warning)), warning.name = "ModuleWarning", warning.message = `${warning.message} (from: ${stringifyLoaderObject(loaderContext.loaders[loaderContext.loaderIndex])})`, (warning =
|
3518
|
+
warning instanceof Error || (warning = new NonErrorEmittedError(warning)), warning.name = "ModuleWarning", warning.message = `${warning.message} (from: ${stringifyLoaderObject(loaderContext.loaders[loaderContext.loaderIndex])})`, (warning = concatErrorMsgAndStack(warning)).moduleIdentifier = loaderContext._module.identifier(), compiler._lastCompilation.__internal__pushRspackDiagnostic({
|
3518
3519
|
error: warning,
|
3519
3520
|
severity: binding_.JsRspackSeverity.Warn
|
3520
3521
|
});
|
@@ -5674,9 +5675,7 @@ Plugins which provide custom chunk loading types must call EnableChunkLoadingPlu
|
|
5674
5675
|
function assertNotNill(value) {
|
5675
5676
|
if (null == value) throw Error(`${value} should not be undefined or null`);
|
5676
5677
|
}
|
5677
|
-
let DYNAMIC_INFO = Symbol("cleverMerge dynamic info"), mergeCache = new WeakMap()
|
5678
|
-
new WeakMap();
|
5679
|
-
let DELETE = Symbol("DELETE"), cachedCleverMerge = (first, second)=>{
|
5678
|
+
let DYNAMIC_INFO = Symbol("cleverMerge dynamic info"), mergeCache = new WeakMap(), DELETE = Symbol("DELETE"), cachedCleverMerge = (first, second)=>{
|
5680
5679
|
if (void 0 === second) return first;
|
5681
5680
|
if (void 0 === first || "object" != typeof second || null === second) return second;
|
5682
5681
|
if ("object" != typeof first || null === first) return first;
|
@@ -6520,7 +6519,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
6520
6519
|
}, applyExperimentsDefaults = (experiments, { production, development })=>{
|
6521
6520
|
F(experiments, "cache", ()=>development), D(experiments, "futureDefaults", !1), D(experiments, "lazyCompilation", !1), D(experiments, "asyncWebAssembly", experiments.futureDefaults), D(experiments, "css", !!experiments.futureDefaults || void 0), D(experiments, "layers", !1), D(experiments, "topLevelAwait", !0), D(experiments, "buildHttp", void 0), experiments.buildHttp && "object" == typeof experiments.buildHttp && D(experiments.buildHttp, "upgrade", !1), D(experiments, "incremental", {}), "object" == typeof experiments.incremental && (D(experiments.incremental, "silent", !0), D(experiments.incremental, "make", !0), D(experiments.incremental, "inferAsyncModules", !1), D(experiments.incremental, "providedExports", !1), D(experiments.incremental, "dependenciesDiagnostics", !1), D(experiments.incremental, "sideEffects", !1), D(experiments.incremental, "buildChunkGraph", !1), D(experiments.incremental, "moduleIds", !1), D(experiments.incremental, "chunkIds", !1), D(experiments.incremental, "modulesHashes", !1), D(experiments.incremental, "modulesCodegen", !1), D(experiments.incremental, "modulesRuntimeRequirements", !1), D(experiments.incremental, "chunksRuntimeRequirements", !1), D(experiments.incremental, "chunksHashes", !1), D(experiments.incremental, "chunksRender", !1), D(experiments.incremental, "emitAssets", !0)), D(experiments, "rspackFuture", {}), D(experiments, "parallelCodeSplitting", !0), D(experiments, "parallelLoader", !1);
|
6522
6521
|
}, applybundlerInfoDefaults = (rspackFuture, library)=>{
|
6523
|
-
"object" == typeof rspackFuture && (D(rspackFuture, "bundlerInfo", {}), "object" == typeof rspackFuture.bundlerInfo && (D(rspackFuture.bundlerInfo, "version", "1.3.
|
6522
|
+
"object" == typeof rspackFuture && (D(rspackFuture, "bundlerInfo", {}), "object" == typeof rspackFuture.bundlerInfo && (D(rspackFuture.bundlerInfo, "version", "1.3.15"), D(rspackFuture.bundlerInfo, "bundler", "rspack"), D(rspackFuture.bundlerInfo, "force", !library)));
|
6524
6523
|
}, applySnapshotDefaults = (_snapshot, _env)=>{}, applyJavascriptParserOptionsDefaults = (parserOptions)=>{
|
6525
6524
|
D(parserOptions, "dynamicImportMode", "lazy"), D(parserOptions, "dynamicImportPrefetch", !1), D(parserOptions, "dynamicImportPreload", !1), D(parserOptions, "url", !0), D(parserOptions, "exprContextCritical", !0), D(parserOptions, "wrappedContextCritical", !1), D(parserOptions, "wrappedContextRegExp", /.*/), D(parserOptions, "strictExportPresence", !1), D(parserOptions, "requireAsExpression", !0), D(parserOptions, "requireDynamic", !0), D(parserOptions, "requireResolve", !0), D(parserOptions, "importDynamic", !0), D(parserOptions, "worker", [
|
6526
6525
|
"..."
|
@@ -7218,6 +7217,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
7218
7217
|
};
|
7219
7218
|
class Resolver {
|
7220
7219
|
binding;
|
7220
|
+
#childCache = new WeakMap();
|
7221
7221
|
constructor(binding){
|
7222
7222
|
this.binding = binding;
|
7223
7223
|
}
|
@@ -7228,13 +7228,15 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
7228
7228
|
resolve(context, path, request, resolveContext, callback) {
|
7229
7229
|
this.binding.resolve(path, request, (error, data)=>callback(error, data?.resource, data));
|
7230
7230
|
}
|
7231
|
-
withOptions(
|
7232
|
-
let
|
7233
|
-
return
|
7231
|
+
withOptions(options) {
|
7232
|
+
let cacheEntry = this.#childCache.get(options);
|
7233
|
+
if (void 0 !== cacheEntry) return cacheEntry;
|
7234
|
+
let { dependencyCategory, resolveToContext, ...resolve } = options, rawResolve = getRawResolve(resolve), resolver = new Resolver(this.binding.withOptions({
|
7234
7235
|
dependencyCategory,
|
7235
7236
|
resolveToContext,
|
7236
7237
|
...rawResolve
|
7237
7238
|
}));
|
7239
|
+
return this.#childCache.set(options, resolver), resolver;
|
7238
7240
|
}
|
7239
7241
|
}
|
7240
7242
|
class ResolverFactory {
|
@@ -7422,7 +7424,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
7422
7424
|
},
|
7423
7425
|
arm: "gnueabihf"
|
7424
7426
|
}
|
7425
|
-
}, BINDING_VERSION = __webpack_require__("@rspack/binding/package.json").version, CORE_VERSION = "1.3.
|
7427
|
+
}, BINDING_VERSION = __webpack_require__("@rspack/binding/package.json").version, CORE_VERSION = "1.3.15", getAddonPlatformArchAbi = ()=>{
|
7426
7428
|
let { platform, arch } = process, binding = "";
|
7427
7429
|
binding += platform;
|
7428
7430
|
let abi = NodePlatformArchToAbi[platform][arch];
|
@@ -7983,7 +7985,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
7983
7985
|
}
|
7984
7986
|
}
|
7985
7987
|
let $assets = Symbol("assets");
|
7986
|
-
Object.defineProperty(binding_.
|
7988
|
+
Object.defineProperty(binding_.KnownBuildInfo.prototype, "assets", {
|
7987
7989
|
enumerable: !0,
|
7988
7990
|
configurable: !0,
|
7989
7991
|
get () {
|
@@ -8001,6 +8003,30 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
8001
8003
|
value: assets
|
8002
8004
|
}), assets;
|
8003
8005
|
}
|
8006
|
+
}), Object.defineProperty(binding_.KnownBuildInfo.prototype, "fileDependencies", {
|
8007
|
+
enumerable: !0,
|
8008
|
+
configurable: !0,
|
8009
|
+
get () {
|
8010
|
+
return new Set(this._fileDependencies);
|
8011
|
+
}
|
8012
|
+
}), Object.defineProperty(binding_.KnownBuildInfo.prototype, "contextDependencies", {
|
8013
|
+
enumerable: !0,
|
8014
|
+
configurable: !0,
|
8015
|
+
get () {
|
8016
|
+
return new Set(this._contextDependencies);
|
8017
|
+
}
|
8018
|
+
}), Object.defineProperty(binding_.KnownBuildInfo.prototype, "missingDependencies", {
|
8019
|
+
enumerable: !0,
|
8020
|
+
configurable: !0,
|
8021
|
+
get () {
|
8022
|
+
return new Set(this._missingDependencies);
|
8023
|
+
}
|
8024
|
+
}), Object.defineProperty(binding_.KnownBuildInfo.prototype, "buildDependencies", {
|
8025
|
+
enumerable: !0,
|
8026
|
+
configurable: !0,
|
8027
|
+
get () {
|
8028
|
+
return new Set(this._buildDependencies);
|
8029
|
+
}
|
8004
8030
|
}), Object.defineProperty(binding_.Module.prototype, "identifier", {
|
8005
8031
|
enumerable: !0,
|
8006
8032
|
configurable: !0,
|
@@ -8738,7 +8764,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
8738
8764
|
obj.children = this.stats.map((stat, idx)=>{
|
8739
8765
|
let obj = stat.toJson(childOptions.children[idx]), compilationName = stat.compilation.name;
|
8740
8766
|
return obj.name = compilationName && makePathsRelative(childOptions.context, compilationName, stat.compilation.compiler.root), obj;
|
8741
|
-
}), childOptions.version && (obj.rspackVersion = "1.3.
|
8767
|
+
}), childOptions.version && (obj.rspackVersion = "1.3.15", obj.version = "5.75.0"), childOptions.hash && (obj.hash = obj.children.map((j)=>j.hash).join(""));
|
8742
8768
|
let mapError = (j, obj)=>({
|
8743
8769
|
...obj,
|
8744
8770
|
compilerPath: obj.compilerPath ? `${j.name}.${obj.compilerPath}` : j.name
|
@@ -8772,7 +8798,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
8772
8798
|
func = asyncLib_noop, fn(err);
|
8773
8799
|
};
|
8774
8800
|
}
|
8775
|
-
let
|
8801
|
+
let asyncLib = {
|
8776
8802
|
each: function(collection, iterator, originalCallback) {
|
8777
8803
|
let callback = once(originalCallback), size = 0, completed = 0;
|
8778
8804
|
if (Array.isArray(collection)) {
|
@@ -8797,11 +8823,11 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
8797
8823
|
this.watchings = watchings, this.compiler = compiler;
|
8798
8824
|
}
|
8799
8825
|
invalidate(callback) {
|
8800
|
-
if (callback)
|
8826
|
+
if (callback) asyncLib.each(this.watchings, (watching, callback)=>watching.invalidate(callback), callback);
|
8801
8827
|
else for (let watching of this.watchings)watching.invalidate();
|
8802
8828
|
}
|
8803
8829
|
close(callback) {
|
8804
|
-
|
8830
|
+
asyncLib.each(this.watchings, (watching, finishedCallback)=>{
|
8805
8831
|
watching.close(finishedCallback);
|
8806
8832
|
}, (err)=>{
|
8807
8833
|
this.compiler.hooks.watchClose.call(), "function" == typeof callback && (this.compiler.running = !1, callback(err));
|
@@ -8972,7 +8998,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
8972
8998
|
for (let node of nodes)0 === node.parents.length && (node.state = "queued", queue.enqueue(node));
|
8973
8999
|
let errored = !1, running = 0, parallelism = this._options.parallelism, nodeDone = (node, err, stats)=>{
|
8974
9000
|
if (!errored) {
|
8975
|
-
if (err) return errored = !0,
|
9001
|
+
if (err) return errored = !0, asyncLib.each(nodes, (node, callback)=>{
|
8976
9002
|
node.compiler.watching ? node.compiler.watching.close(callback) : callback();
|
8977
9003
|
}, ()=>callback(err));
|
8978
9004
|
if (node.result = stats, running--, "running" === node.state) for (let child of (node.state = "done", node.children))"blocked" === child.state && queue.enqueue(child);
|
@@ -9025,7 +9051,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
9025
9051
|
for (let compiler of this.compilers)compiler.inputFileSystem?.purge?.();
|
9026
9052
|
}
|
9027
9053
|
close(callback) {
|
9028
|
-
|
9054
|
+
asyncLib.each(this.compilers, (compiler, cb)=>{
|
9029
9055
|
compiler.close(cb);
|
9030
9056
|
}, callback);
|
9031
9057
|
}
|
@@ -9628,7 +9654,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
9628
9654
|
object.hash = context.getStatsCompilation(compilation).hash;
|
9629
9655
|
},
|
9630
9656
|
version: (object)=>{
|
9631
|
-
object.version = "5.75.0", object.rspackVersion = "1.3.
|
9657
|
+
object.version = "5.75.0", object.rspackVersion = "1.3.15";
|
9632
9658
|
},
|
9633
9659
|
env: (object, _compilation, _context, { _env })=>{
|
9634
9660
|
object.env = _env;
|
@@ -11880,6 +11906,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
11880
11906
|
ZodSwcNodeNextConfig,
|
11881
11907
|
ZodSwcSystemjsConfig
|
11882
11908
|
]), ZodSwcLoaderOptions = zod_index_js_namespaceObject.z.strictObject({
|
11909
|
+
$schema: zod_index_js_namespaceObject.z.string().optional(),
|
11883
11910
|
test: zod_index_js_namespaceObject.z.string().or(zod_index_js_namespaceObject.z.string().array()).optional(),
|
11884
11911
|
exclude: zod_index_js_namespaceObject.z.string().or(zod_index_js_namespaceObject.z.string().array()).optional(),
|
11885
11912
|
env: ZodSwcEnvConfig.optional(),
|
@@ -13291,7 +13318,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
13291
13318
|
let _options = JSON.stringify(options || {});
|
13292
13319
|
return binding_default().transform(source, _options);
|
13293
13320
|
}
|
13294
|
-
let exports_rspackVersion = "1.3.
|
13321
|
+
let exports_rspackVersion = "1.3.15", exports_version = "5.75.0", exports_WebpackError = Error, sources = __webpack_require__("webpack-sources"), exports_config = {
|
13295
13322
|
getNormalizedRspackOptions: getNormalizedRspackOptions,
|
13296
13323
|
applyRspackOptionsDefaults: applyRspackOptionsDefaults,
|
13297
13324
|
getNormalizedWebpackOptions: getNormalizedRspackOptions,
|
@@ -17,34 +17,6 @@ declare abstract class BaseCache {
|
|
17
17
|
abstract store<T>(data: T, callback: CallbackCache<void>): void;
|
18
18
|
abstract storePromise<T>(data: T): Promise<void>;
|
19
19
|
}
|
20
|
-
export declare class MultiItemCache implements BaseCache {
|
21
|
-
_items: ItemCacheFacade[];
|
22
|
-
/**
|
23
|
-
* @param items item caches
|
24
|
-
* @returns
|
25
|
-
*/
|
26
|
-
constructor(items: ItemCacheFacade[]);
|
27
|
-
/**
|
28
|
-
* @param callback signals when the value is retrieved
|
29
|
-
* @returns
|
30
|
-
*/
|
31
|
-
get<T>(callback: CallbackCache<T>): void;
|
32
|
-
/**
|
33
|
-
* @returns promise with the data
|
34
|
-
*/
|
35
|
-
getPromise<T>(): Promise<T | undefined>;
|
36
|
-
/**
|
37
|
-
* @param data the value to store
|
38
|
-
* @param callback signals when the value is stored
|
39
|
-
* @returns
|
40
|
-
*/
|
41
|
-
store<T>(data: T, callback: CallbackCache<void>): void;
|
42
|
-
/**
|
43
|
-
* @param data the value to store
|
44
|
-
* @returns promise signals when the value is stored
|
45
|
-
*/
|
46
|
-
storePromise<T>(data: T): Promise<void>;
|
47
|
-
}
|
48
20
|
export declare class ItemCacheFacade implements BaseCache {
|
49
21
|
_cache: Cache;
|
50
22
|
_name: string;
|
@@ -30,6 +30,7 @@ export declare class LoaderObject {
|
|
30
30
|
set pitchExecuted(value: boolean);
|
31
31
|
get normalExecuted(): boolean;
|
32
32
|
set normalExecuted(value: boolean);
|
33
|
+
set noPitch(value: boolean);
|
33
34
|
shouldYield(): boolean;
|
34
35
|
static __from_binding(loaderItem: JsLoaderItem, compiler: Compiler): LoaderObject;
|
35
36
|
static __to_binding(loader: LoaderObject): JsLoaderItem;
|
@@ -2,7 +2,6 @@ import type * as binding from "@rspack/binding";
|
|
2
2
|
import type { JsOriginRecord } from "@rspack/binding";
|
3
3
|
import type { Compilation } from "../Compilation";
|
4
4
|
import type { StatsOptions } from "../config";
|
5
|
-
import { type Comparator } from "../util/comparators";
|
6
5
|
import type { StatsFactory, StatsFactoryContext } from "./StatsFactory";
|
7
6
|
export type KnownStatsChunkGroup = {
|
8
7
|
name?: string;
|
@@ -290,15 +289,12 @@ export type SimpleExtractors = {
|
|
290
289
|
moduleTraceItem: ExtractorsByOption<binding.JsStatsModuleTrace, StatsModuleTraceItem>;
|
291
290
|
moduleTraceDependency: ExtractorsByOption<binding.JsStatsModuleTraceDependency, StatsModuleTraceDependency>;
|
292
291
|
};
|
293
|
-
export declare const uniqueArray: <T, I>(items: Iterable<T>, selector: (arg: T) => Iterable<I>) => I[];
|
294
|
-
export declare const uniqueOrderedArray: <T, I>(items: Iterable<T>, selector: (arg: T) => Iterable<I>, comparator: Comparator) => I[];
|
295
292
|
export declare const iterateConfig: (config: Record<string, Record<string, Function>>, options: StatsOptions, fn: (a1: string, a2: Function) => void) => void;
|
296
293
|
type Child = {
|
297
294
|
children?: ItemChildren;
|
298
295
|
filteredChildren?: number;
|
299
296
|
};
|
300
297
|
type ItemChildren = Child[];
|
301
|
-
export declare const getTotalItems: (children: ItemChildren) => number;
|
302
298
|
export declare const collapse: (children: ItemChildren) => Child[];
|
303
299
|
export declare const spaceLimited: (itemsAndGroups: ItemChildren, max: number, filteredChildrenLineReserved?: boolean) => {
|
304
300
|
children: any;
|
@@ -1,13 +1,3 @@
|
|
1
|
-
/**
|
2
|
-
* The following code is modified based on
|
3
|
-
* https://github.com/webpack/webpack/blob/4b4ca3b/lib/util/cleverMerge.js
|
4
|
-
*
|
5
|
-
* MIT Licensed
|
6
|
-
* Author Tobias Koppers @sokra
|
7
|
-
* Copyright (c) JS Foundation and other contributors
|
8
|
-
* https://github.com/webpack/webpack/blob/main/LICENSE
|
9
|
-
*/
|
10
|
-
type Obj = Record<PropertyKey, any>;
|
11
1
|
export declare const DELETE: unique symbol;
|
12
2
|
/**
|
13
3
|
* Merges two given objects and caches the result to avoid computation if same objects passed as arguments again.
|
@@ -23,13 +13,6 @@ export declare const DELETE: unique symbol;
|
|
23
13
|
* @returns merged object of first and second object
|
24
14
|
*/
|
25
15
|
export declare const cachedCleverMerge: <First, Second>(first: First, second: Second) => First | Second | (First & Second);
|
26
|
-
/**
|
27
|
-
* @param obj object
|
28
|
-
* @param property property
|
29
|
-
* @param value assignment value
|
30
|
-
* @returns new object
|
31
|
-
*/
|
32
|
-
export declare const cachedSetProperty: (obj: Obj, property: string, value: string | number | boolean) => Obj;
|
33
16
|
/**
|
34
17
|
* Merges two objects. Objects are deeply clever merged.
|
35
18
|
* Arrays might reference the old value with "...".
|
@@ -39,16 +22,3 @@ export declare const cachedSetProperty: (obj: Obj, property: string, value: stri
|
|
39
22
|
* @returns merged object of first and second object
|
40
23
|
*/
|
41
24
|
export declare const cleverMerge: <First, Second>(first: First, second: Second) => First | Second | (First & Second);
|
42
|
-
/**
|
43
|
-
* @param obj the object
|
44
|
-
* @returns the object without operations like "..." or DELETE
|
45
|
-
*/
|
46
|
-
export declare const removeOperations: <O extends Obj>(obj: O) => O;
|
47
|
-
/**
|
48
|
-
* @param obj the object
|
49
|
-
* @param byProperty the by description
|
50
|
-
* @param values values
|
51
|
-
* @returns object with merged byProperty
|
52
|
-
*/
|
53
|
-
export declare const resolveByProperty: <O extends Obj | null, P extends PropertyKey>(obj: O, byProperty: P, ...values: any[]) => Omit<O, P> | undefined;
|
54
|
-
export {};
|
@@ -7,14 +7,10 @@
|
|
7
7
|
* Copyright (c) JS Foundation and other contributors
|
8
8
|
* https://github.com/webpack/webpack/blob/main/LICENSE
|
9
9
|
*/
|
10
|
-
import type { JsStatsChunk as Chunk } from "@rspack/binding";
|
11
|
-
import type { ChunkGroup } from "../ChunkGroup";
|
12
10
|
export type Comparator = <T>(arg0: T, arg1: T) => -1 | 0 | 1;
|
13
11
|
type Selector<A, B> = (input: A) => B;
|
14
12
|
export declare const concatComparators: (...comps: Array<Comparator>) => Comparator;
|
15
13
|
export declare const compareIds: <T = string | number>(a: T, b: T) => -1 | 0 | 1;
|
16
|
-
export declare const compareChunksById: (a: Chunk, b: Chunk) => -1 | 0 | 1;
|
17
|
-
export declare const compareChunkGroupsByIndex: (a: ChunkGroup, b: ChunkGroup) => -1 | 0 | 1;
|
18
14
|
export declare const compareSelect: <T, R>(getter: Selector<T, R>, comparator: Comparator) => Comparator;
|
19
15
|
export declare const compareNumbers: (a: number, b: number) => 0 | 1 | -1;
|
20
16
|
export {};
|
@@ -7,7 +7,6 @@
|
|
7
7
|
* Copyright (c) JS Foundation and other contributors
|
8
8
|
* https://github.com/webpack/webpack/blob/main/LICENSE
|
9
9
|
*/
|
10
|
-
export declare const MAX_SHORT_STRING: number;
|
11
10
|
type Exports = WebAssembly.Instance["exports"] & {
|
12
11
|
init: () => void;
|
13
12
|
update: (b: number) => void;
|
@@ -10,11 +10,6 @@ export declare const makePathsRelative: {
|
|
10
10
|
bindCache(associatedObjectForCache: object | undefined): ((arg0: string, arg1: string) => string);
|
11
11
|
bindContextCache(context: string, associatedObjectForCache: object | undefined): ((arg0: string) => string);
|
12
12
|
};
|
13
|
-
export declare const makePathsAbsolute: {
|
14
|
-
(context: string, identifier: string, associatedObjectForCache: object | undefined): string;
|
15
|
-
bindCache(associatedObjectForCache: object | undefined): ((arg0: string, arg1: string) => string);
|
16
|
-
bindContextCache(context: string, associatedObjectForCache: object | undefined): ((arg0: string) => string);
|
17
|
-
};
|
18
13
|
export declare const contextify: {
|
19
14
|
(context: string, identifier: string, associatedObjectForCache: object | undefined): string;
|
20
15
|
bindCache(associatedObjectForCache: object | undefined): ((arg0: string, arg1: string) => string);
|
@@ -33,11 +28,4 @@ export declare const parseResourceWithoutFragment: {
|
|
33
28
|
(str: string, associatedObjectForCache?: object): ParsedResourceWithoutFragment;
|
34
29
|
bindCache(associatedObjectForCache: object): (str: string) => ParsedResourceWithoutFragment;
|
35
30
|
};
|
36
|
-
/**
|
37
|
-
* @param filename the filename which should be undone
|
38
|
-
* @param outputPath the output path that is restored (only relevant when filename contains "..")
|
39
|
-
* @param enforceRelative true returns ./ for empty paths
|
40
|
-
* @returns repeated ../ to leave the directory of the provided filename to be back on output dir
|
41
|
-
*/
|
42
|
-
export declare const getUndoPath: (filename: string, outputPath: string, enforceRelative: boolean) => string;
|
43
31
|
export {};
|
package/dist/util/index.d.ts
CHANGED
@@ -1,19 +1,13 @@
|
|
1
|
-
import type { JsRspackError
|
1
|
+
import type { JsRspackError } from "@rspack/binding";
|
2
2
|
import type { LoaderObject } from "../loader-runner";
|
3
|
-
export declare function mapValues(record: Record<string, string>, fn: (key: string) => string): {
|
4
|
-
[k: string]: string;
|
5
|
-
};
|
6
3
|
export declare function isNil(value: unknown): value is null | undefined;
|
7
4
|
export declare const toBuffer: (bufLike: string | Buffer | Uint8Array) => Buffer;
|
8
5
|
export declare const toObject: (input: string | Buffer | object) => object;
|
9
6
|
export declare function serializeObject(map: string | object | undefined | null): Buffer | undefined;
|
10
|
-
export declare function isPromiseLike(value: unknown): value is Promise<any>;
|
11
|
-
export declare function isJsStatsError(err: any): err is JsStatsError;
|
12
7
|
export declare function concatErrorMsgAndStack(err: Error | JsRspackError | string): JsRspackError;
|
13
8
|
export declare function indent(str: string, prefix: string): string;
|
14
9
|
export declare function stringifyLoaderObject(o: LoaderObject): string;
|
15
10
|
export declare function asArray<T>(item: T[]): T[];
|
16
11
|
export declare function asArray<T>(item: readonly T[]): readonly T[];
|
17
12
|
export declare function asArray<T>(item: T): T[];
|
18
|
-
export declare const deprecatedWarn: (content: string, enable?: boolean) => void;
|
19
13
|
export declare const unsupported: (name: string, issue?: string) => never;
|
package/dist/util/memoize.d.ts
CHANGED
package/dist/worker.js
CHANGED
@@ -4,9 +4,7 @@ var __webpack_modules__ = {
|
|
4
4
|
__webpack_require__.d(__webpack_exports__, {
|
5
5
|
R_: ()=>cleverMerge
|
6
6
|
});
|
7
|
-
let DYNAMIC_INFO = Symbol("cleverMerge dynamic info"), mergeCache = new WeakMap()
|
8
|
-
new WeakMap();
|
9
|
-
let DELETE = Symbol("DELETE"), cachedCleverMerge = (first, second)=>{
|
7
|
+
let DYNAMIC_INFO = Symbol("cleverMerge dynamic info"), mergeCache = new WeakMap(), DELETE = Symbol("DELETE"), cachedCleverMerge = (first, second)=>{
|
10
8
|
if (void 0 === second) return first;
|
11
9
|
if (void 0 === first || "object" != typeof second || null === second) return second;
|
12
10
|
if ("object" != typeof first || null === first) return first;
|
@@ -209,11 +207,11 @@ var __webpack_modules__ = {
|
|
209
207
|
this.message = match?.[1] ? createMessage(match[1]) : createMessage();
|
210
208
|
}
|
211
209
|
}
|
212
|
-
|
210
|
+
class AbstractMethodError extends WebpackError {
|
213
211
|
constructor(){
|
214
212
|
super(new Message().message), this.name = "AbstractMethodError";
|
215
213
|
}
|
216
|
-
}
|
214
|
+
}
|
217
215
|
class Hash {
|
218
216
|
update(data, inputEncoding) {
|
219
217
|
throw new AbstractMethodError();
|
@@ -505,7 +503,7 @@ for(var __webpack_i__ in (()=>{
|
|
505
503
|
};
|
506
504
|
}, cachedFn;
|
507
505
|
};
|
508
|
-
makeCacheableWithContext((context, identifier)=>identifier.split(SEGMENTS_SPLIT_REGEXP).map((str)=>absoluteToRequest(context, str)).join(""))
|
506
|
+
makeCacheableWithContext((context, identifier)=>identifier.split(SEGMENTS_SPLIT_REGEXP).map((str)=>absoluteToRequest(context, str)).join(""));
|
509
507
|
let contextify = makeCacheableWithContext((context, request)=>request.split("!").map((r)=>absoluteToRequest(context, r)).join("!")), absolutify = makeCacheableWithContext((context, request)=>request.split("!").map((r)=>requestToAbsolute(context, r)).join("!")), PATH_QUERY_FRAGMENT_REGEXP = /^((?:\u200b.|[^?#\u200b])*)(\?(?:\u200b.|[^#\u200b])*)?(#.*)?$/, PATH_QUERY_REGEXP = /^((?:\u200b.|[^?\u200b])*)(\?.*)?$/;
|
510
508
|
makeCacheable((str)=>{
|
511
509
|
let match = PATH_QUERY_FRAGMENT_REGEXP.exec(str);
|
@@ -552,7 +550,7 @@ for(var __webpack_i__ in (()=>{
|
|
552
550
|
}
|
553
551
|
}
|
554
552
|
function handleResult(loader, module, callback) {
|
555
|
-
return "function" != typeof module && "object" != typeof module ? callback(new LoaderLoadingError(`Module '${loader.path}' is not a loader (export function or es6 module)`)) : (loader.normal = "function" == typeof module ? module : module.default, loader.pitch = module.pitch, loader.raw = module.raw, "function" != typeof loader.normal && "function" != typeof loader.pitch) ? callback(new LoaderLoadingError(`Module '${loader.path}' is not a loader (must have normal or pitch function)`)) : void callback();
|
553
|
+
return "function" != typeof module && "object" != typeof module ? callback(new LoaderLoadingError(`Module '${loader.path}' is not a loader (export function or es6 module)`)) : (loader.normal = "function" == typeof module ? module : module.default, loader.pitch = module.pitch, loader.raw = module.raw, loader.pitch || (loader.noPitch = !0), "function" != typeof loader.normal && "function" != typeof loader.pitch) ? callback(new LoaderLoadingError(`Module '${loader.path}' is not a loader (must have normal or pitch function)`)) : void callback();
|
556
554
|
}
|
557
555
|
function isWorkerResponseMessage(message) {
|
558
556
|
return "response" === message.type;
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@rspack/core",
|
3
|
-
"version": "1.3.
|
3
|
+
"version": "1.3.15",
|
4
4
|
"webpackVersion": "5.75.0",
|
5
5
|
"license": "MIT",
|
6
6
|
"description": "The fast Rust-based web bundler with webpack-compatible API",
|
@@ -37,7 +37,7 @@
|
|
37
37
|
"directory": "packages/rspack"
|
38
38
|
},
|
39
39
|
"devDependencies": {
|
40
|
-
"@rslib/core": "0.9.
|
40
|
+
"@rslib/core": "0.9.1",
|
41
41
|
"@swc/core": "1.11.29",
|
42
42
|
"@swc/types": "0.1.21",
|
43
43
|
"@types/graceful-fs": "4.1.9",
|
@@ -50,14 +50,14 @@
|
|
50
50
|
"tsx": "^4.19.4",
|
51
51
|
"typescript": "^5.8.3",
|
52
52
|
"watchpack": "^2.4.4",
|
53
|
-
"webpack-sources": "3.3.
|
54
|
-
"zod": "^3.25.
|
53
|
+
"webpack-sources": "3.3.2",
|
54
|
+
"zod": "^3.25.50",
|
55
55
|
"zod-validation-error": "3.4.1"
|
56
56
|
},
|
57
57
|
"dependencies": {
|
58
58
|
"@module-federation/runtime-tools": "0.14.3",
|
59
59
|
"@rspack/lite-tapable": "1.0.1",
|
60
|
-
"@rspack/binding": "1.3.
|
60
|
+
"@rspack/binding": "1.3.15"
|
61
61
|
},
|
62
62
|
"peerDependencies": {
|
63
63
|
"@swc/helpers": ">=0.5.1"
|
@@ -1,25 +0,0 @@
|
|
1
|
-
/**
|
2
|
-
* The following code is modified based on
|
3
|
-
* https://github.com/webpack/webpack/blob/4b4ca3b/lib/util/hash/BatchedHash.js
|
4
|
-
*
|
5
|
-
* MIT Licensed
|
6
|
-
* Author Tobias Koppers @sokra
|
7
|
-
* Copyright (c) JS Foundation and other contributors
|
8
|
-
* https://github.com/webpack/webpack/blob/main/LICENSE
|
9
|
-
*/
|
10
|
-
import Hash from ".";
|
11
|
-
export default class BatchedHash extends Hash {
|
12
|
-
string: string | undefined;
|
13
|
-
encoding: string | undefined;
|
14
|
-
hash: Hash;
|
15
|
-
constructor(hash: Hash);
|
16
|
-
/**
|
17
|
-
* Update hash {@link https://nodejs.org/api/crypto.html#crypto_hash_update_data_inputencoding}
|
18
|
-
* @param data data
|
19
|
-
* @param inputEncoding data encoding
|
20
|
-
* @returns updated hash
|
21
|
-
*/
|
22
|
-
update(data: string | Buffer, inputEncoding?: string): this;
|
23
|
-
digest(): Buffer;
|
24
|
-
digest(encoding: string): string;
|
25
|
-
}
|