@rspack/core 1.3.12 → 1.3.14
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/README.md +2 -2
- package/compiled/browserslist-load-config/index.d.ts +10 -0
- package/compiled/browserslist-load-config/index.js +266 -0
- package/compiled/browserslist-load-config/license +21 -0
- package/compiled/browserslist-load-config/package.json +1 -0
- package/compiled/watchpack/index.js +18 -14
- package/compiled/watchpack/package.json +1 -1
- 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 +95 -133
- 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 +1 -1
- package/compiled/zod/dist/types/v4/core/registries.d.ts +6 -1
- package/compiled/zod/dist/types/v4/core/schemas.d.ts +145 -117
- 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 +40 -49
- package/compiled/zod/index.js +42 -64
- 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/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/browserslistTargetHandler.d.ts +0 -6
- package/dist/config/zod.d.ts +370 -370
- package/dist/container/ModuleFederationRuntimePlugin.d.ts +1 -1
- package/dist/exports.d.ts +1 -0
- package/dist/index.js +67 -71
- 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 +24 -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/module.d.ts +53 -21
- package/package.json +11 -12
- package/compiled/browserslist/index.d.ts +0 -1
- package/compiled/browserslist/index.js +0 -2123
- package/compiled/browserslist/license +0 -20
- package/compiled/browserslist/package.json +0 -1
- 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/exports.d.ts
CHANGED
@@ -18,6 +18,7 @@ export { ContextModule } from "./ContextModule";
|
|
18
18
|
export { ConcatenatedModule } from "./ConcatenatedModule";
|
19
19
|
export { ExternalModule } from "./ExternalModule";
|
20
20
|
export type { NormalModuleFactory } from "./NormalModuleFactory";
|
21
|
+
export type { default as ModuleGraph } from "./ModuleGraph";
|
21
22
|
export { RuntimeGlobals } from "./RuntimeGlobals";
|
22
23
|
export type { StatsAsset, StatsChunk, StatsCompilation, StatsError, StatsModule } from "./Stats";
|
23
24
|
export { Stats } from "./Stats";
|
package/dist/index.js
CHANGED
@@ -207,8 +207,8 @@ var __webpack_modules__ = {
|
|
207
207
|
}
|
208
208
|
};
|
209
209
|
},
|
210
|
-
browserslist: function(module) {
|
211
|
-
module.exports = require("../compiled/browserslist/index.js");
|
210
|
+
"browserslist-load-config": function(module) {
|
211
|
+
module.exports = require("../compiled/browserslist-load-config/index.js");
|
212
212
|
},
|
213
213
|
watchpack: function(module) {
|
214
214
|
module.exports = require("../compiled/watchpack/index.js");
|
@@ -358,7 +358,6 @@ for(var __webpack_i__ in (()=>{
|
|
358
358
|
});
|
359
359
|
var RequestType, _computedKey, Compilation_computedKey, _computedKey1, _computedKey2, ArrayQueue_computedKey, browserslistTargetHandler_namespaceObject = {};
|
360
360
|
__webpack_require__.r(browserslistTargetHandler_namespaceObject), __webpack_require__.d(browserslistTargetHandler_namespaceObject, {
|
361
|
-
load: ()=>load,
|
362
361
|
resolve: ()=>browserslistTargetHandler_resolve
|
363
362
|
});
|
364
363
|
var ModuleFilenameHelpers_namespaceObject = {};
|
@@ -1537,7 +1536,7 @@ for(var __webpack_i__ in (()=>{
|
|
1537
1536
|
function serializeObject(map) {
|
1538
1537
|
if (!isNil(map)) return "string" == typeof map ? map ? toBuffer(map) : void 0 : toBuffer(JSON.stringify(map));
|
1539
1538
|
}
|
1540
|
-
function
|
1539
|
+
function concatErrorMsgAndStack(err) {
|
1541
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);
|
1542
1541
|
}
|
1543
1542
|
function stringifyLoaderObject(o) {
|
@@ -1560,14 +1559,14 @@ for(var __webpack_i__ in (()=>{
|
|
1560
1559
|
case 2:
|
1561
1560
|
return adm.spliceWithArray(index, deleteCount);
|
1562
1561
|
}
|
1563
|
-
return adm.spliceWithArray(index, deleteCount, newItems.map((item)=>
|
1562
|
+
return adm.spliceWithArray(index, deleteCount, newItems.map((item)=>concatErrorMsgAndStack(item)));
|
1564
1563
|
}, arrayExtensions = {
|
1565
1564
|
[Symbol.iterator]: ()=>adm.values().values(),
|
1566
1565
|
splice,
|
1567
|
-
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),
|
1568
1567
|
pop: ()=>splice(Math.max(adm.length - 1, 0), 1)[0],
|
1569
1568
|
shift: ()=>splice(0, 1)[0],
|
1570
|
-
unshift: (...newItems)=>(adm.spliceWithArray(0, 0, newItems.map((item)=>
|
1569
|
+
unshift: (...newItems)=>(adm.spliceWithArray(0, 0, newItems.map((item)=>concatErrorMsgAndStack(item))), adm.length),
|
1571
1570
|
reverse: ()=>adm.values().reverse(),
|
1572
1571
|
sort (compareFn) {
|
1573
1572
|
let copy = adm.values();
|
@@ -1591,7 +1590,7 @@ for(var __webpack_i__ in (()=>{
|
|
1591
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)),
|
1592
1591
|
set (target, name, value) {
|
1593
1592
|
if ("length" === name) throw Error("The 'length' property is read-only and cannot be assigned a new value.");
|
1594
|
-
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;
|
1595
1594
|
}
|
1596
1595
|
});
|
1597
1596
|
return adm[$proxy] = proxy, proxy;
|
@@ -2255,11 +2254,11 @@ BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a si
|
|
2255
2254
|
this.message = match?.[1] ? createMessage(match[1]) : createMessage();
|
2256
2255
|
}
|
2257
2256
|
}
|
2258
|
-
|
2257
|
+
class AbstractMethodError extends WebpackError {
|
2259
2258
|
constructor(){
|
2260
2259
|
super(new Message().message), this.name = "AbstractMethodError";
|
2261
2260
|
}
|
2262
|
-
}
|
2261
|
+
}
|
2263
2262
|
class Hash {
|
2264
2263
|
update(data, inputEncoding) {
|
2265
2264
|
throw new AbstractMethodError();
|
@@ -2877,9 +2876,7 @@ BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a si
|
|
2877
2876
|
return innerSubCache?.set(identifier, result), result;
|
2878
2877
|
};
|
2879
2878
|
}, cachedFn;
|
2880
|
-
}, makePathsRelative = makeCacheableWithContext((context, identifier)=>identifier.split(SEGMENTS_SPLIT_REGEXP).map((str)=>absoluteToRequest(context, str)).join(""))
|
2881
|
-
makeCacheableWithContext((context, identifier)=>identifier.split(SEGMENTS_SPLIT_REGEXP).map((str)=>requestToAbsolute(context, str)).join(""));
|
2882
|
-
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)=>{
|
2883
2880
|
let match = PATH_QUERY_FRAGMENT_REGEXP.exec(str);
|
2884
2881
|
return {
|
2885
2882
|
resource: str,
|
@@ -3264,7 +3261,7 @@ BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a si
|
|
3264
3261
|
}
|
3265
3262
|
}
|
3266
3263
|
function handleResult(loader, module, callback) {
|
3267
|
-
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();
|
3268
3265
|
}
|
3269
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) {
|
3270
3267
|
let isSync = !0, isDone = !1, isError = !1, reportedError = !1;
|
@@ -3365,6 +3362,9 @@ BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a si
|
|
3365
3362
|
set normalExecuted(value) {
|
3366
3363
|
external_node_assert_default()(value), this.loaderItem.normalExecuted = !0;
|
3367
3364
|
}
|
3365
|
+
set noPitch(value) {
|
3366
|
+
external_node_assert_default()(value), this.loaderItem.noPitch = !0;
|
3367
|
+
}
|
3368
3368
|
shouldYield() {
|
3369
3369
|
return this.request.startsWith(BUILTIN_LOADER_PREFIX);
|
3370
3370
|
}
|
@@ -3387,7 +3387,7 @@ BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a si
|
|
3387
3387
|
return loaderContext.loaders?.length && index < loaderContext.loaders.length && index >= 0 && loaderContext.loaders[index] ? loaderContext.loaders[index] : null;
|
3388
3388
|
}
|
3389
3389
|
async function runLoaders(compiler, context) {
|
3390
|
-
let loaderState = context.loaderState, pitch = loaderState === binding_.JsLoaderState.Pitching, { resource } = context
|
3390
|
+
let loaderState = context.loaderState, pitch = loaderState === binding_.JsLoaderState.Pitching, { resource } = context;
|
3391
3391
|
JavaScriptTracer.startAsync({
|
3392
3392
|
name: `run_js_loaders${pitch ? ":pitch" : ":normal"}`,
|
3393
3393
|
args: {
|
@@ -3509,13 +3509,13 @@ BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a si
|
|
3509
3509
|
].filter(Boolean).join("|"));
|
3510
3510
|
}, loaderContext.rootContext = compiler.context, loaderContext.emitError = function(err) {
|
3511
3511
|
let error = err;
|
3512
|
-
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({
|
3513
3513
|
error,
|
3514
3514
|
severity: binding_.JsRspackSeverity.Error
|
3515
3515
|
});
|
3516
3516
|
}, loaderContext.emitWarning = function(warn) {
|
3517
3517
|
let warning = warn;
|
3518
|
-
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({
|
3519
3519
|
error: warning,
|
3520
3520
|
severity: binding_.JsRspackSeverity.Warn
|
3521
3521
|
});
|
@@ -3622,7 +3622,7 @@ BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a si
|
|
3622
3622
|
}
|
3623
3623
|
};
|
3624
3624
|
return Object.assign(workerLoaderContext, compiler.options.loader), workerLoaderContext;
|
3625
|
-
}, enableParallelism = (currentLoaderObject)=>compiler.options.experiments.parallelLoader && currentLoaderObject?.parallel, isomorphoicRun = async (fn, args
|
3625
|
+
}, enableParallelism = (currentLoaderObject)=>compiler.options.experiments.parallelLoader && currentLoaderObject?.parallel, isomorphoicRun = async (fn, args)=>{
|
3626
3626
|
let result, currentLoaderObject = getCurrentLoader(loaderContext), parallelism = enableParallelism(currentLoaderObject), pitch = loaderState === binding_.JsLoaderState.Pitching, loaderName = function(loaderPath, cwd = "") {
|
3627
3627
|
let res = loaderPath.replace(cwd, "");
|
3628
3628
|
if (!external_node_path_default().isAbsolute(res)) return res;
|
@@ -3784,7 +3784,7 @@ BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a si
|
|
3784
3784
|
loaderContext.remainingRequest,
|
3785
3785
|
loaderContext.previousRequest,
|
3786
3786
|
currentLoaderObject.loaderItem.data
|
3787
|
-
]
|
3787
|
+
]);
|
3788
3788
|
if (args.some((value)=>void 0 !== value)) {
|
3789
3789
|
let [content, sourceMap, additionalData] = args;
|
3790
3790
|
context.content = isNil(content) ? null : toBuffer(content), context.sourceMap = serializeObject(sourceMap), context.additionalData = additionalData || void 0;
|
@@ -3808,7 +3808,7 @@ BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a si
|
|
3808
3808
|
content,
|
3809
3809
|
sourceMap,
|
3810
3810
|
additionalData
|
3811
|
-
]
|
3811
|
+
]));
|
3812
3812
|
}
|
3813
3813
|
context.content = isNil(content) ? null : toBuffer(content), context.sourceMap = JsSourceMap.__to_binding(sourceMap), context.additionalData = additionalData || void 0, context.__internal__utf8Hint = "string" == typeof content;
|
3814
3814
|
break;
|
@@ -5675,9 +5675,7 @@ Plugins which provide custom chunk loading types must call EnableChunkLoadingPlu
|
|
5675
5675
|
function assertNotNill(value) {
|
5676
5676
|
if (null == value) throw Error(`${value} should not be undefined or null`);
|
5677
5677
|
}
|
5678
|
-
let DYNAMIC_INFO = Symbol("cleverMerge dynamic info"), mergeCache = new WeakMap()
|
5679
|
-
new WeakMap();
|
5680
|
-
let DELETE = Symbol("DELETE"), cachedCleverMerge = (first, second)=>{
|
5678
|
+
let DYNAMIC_INFO = Symbol("cleverMerge dynamic info"), mergeCache = new WeakMap(), DELETE = Symbol("DELETE"), cachedCleverMerge = (first, second)=>{
|
5681
5679
|
if (void 0 === second) return first;
|
5682
5680
|
if (void 0 === first || "object" != typeof second || null === second) return second;
|
5683
5681
|
if ("object" != typeof first || null === first) return first;
|
@@ -5849,30 +5847,6 @@ Plugins which provide custom chunk loading types must call EnableChunkLoadingPlu
|
|
5849
5847
|
default:
|
5850
5848
|
throw Error("Not implemented");
|
5851
5849
|
}
|
5852
|
-
}, inputRx = /^(?:((?:[A-Z]:)?[/\\].*?))?(?::(.+?))?$/i, parse = (input, context)=>{
|
5853
|
-
if (!input) return {};
|
5854
|
-
if (external_node_path_default().isAbsolute(input)) {
|
5855
|
-
let [, configPath, env] = inputRx.exec(input) || [];
|
5856
|
-
return {
|
5857
|
-
configPath,
|
5858
|
-
env
|
5859
|
-
};
|
5860
|
-
}
|
5861
|
-
let config = __webpack_require__("browserslist").findConfig(context);
|
5862
|
-
return config && Object.keys(config).includes(input) ? {
|
5863
|
-
env: input
|
5864
|
-
} : {
|
5865
|
-
query: input
|
5866
|
-
};
|
5867
|
-
}, load = (input, context)=>{
|
5868
|
-
let browserslist = __webpack_require__("browserslist"), { configPath, env, query } = parse(input, context), config = query || (configPath ? browserslist.loadConfig({
|
5869
|
-
config: configPath,
|
5870
|
-
env
|
5871
|
-
}) : browserslist.loadConfig({
|
5872
|
-
path: context,
|
5873
|
-
env
|
5874
|
-
}));
|
5875
|
-
if (config) return browserslist(config);
|
5876
5850
|
}, browserslistTargetHandler_resolve = (browsers)=>{
|
5877
5851
|
let rawChecker = (versions)=>browsers.every((v)=>{
|
5878
5852
|
let [name, parsedVersion] = v.split(" ");
|
@@ -6270,7 +6244,10 @@ Plugins which provide custom chunk loading types must call EnableChunkLoadingPlu
|
|
6270
6244
|
}),
|
6271
6245
|
require: nodeProperty
|
6272
6246
|
};
|
6273
|
-
}, getBrowserslistTargetHandler = memoize(()=>browserslistTargetHandler_namespaceObject),
|
6247
|
+
}, getBrowserslistTargetHandler = memoize(()=>browserslistTargetHandler_namespaceObject), hasBrowserslistConfig = (context)=>{
|
6248
|
+
let { findConfig } = __webpack_require__("browserslist-load-config");
|
6249
|
+
return !!findConfig(context);
|
6250
|
+
}, getDefaultTarget = (context)=>hasBrowserslistConfig(context) ? "browserslist" : "web", versionDependent = (major, minor)=>{
|
6274
6251
|
if (!major) return ()=>void 0;
|
6275
6252
|
let nMajor = +major, nMinor = minor ? +minor : 0;
|
6276
6253
|
return (vMajor, vMinor = 0)=>nMajor > vMajor || nMajor === vMajor && nMinor >= vMinor;
|
@@ -6280,12 +6257,12 @@ Plugins which provide custom chunk loading types must call EnableChunkLoadingPlu
|
|
6280
6257
|
"Resolve features from browserslist. Will resolve browserslist config automatically. Only browser or node queries are supported (electron is not supported). Examples: 'browserslist:modern' to use 'modern' environment from browserslist config",
|
6281
6258
|
/^browserslist(?::(.+))?$/,
|
6282
6259
|
(rest, context)=>{
|
6283
|
-
let
|
6284
|
-
if (!browsers) throw Error(`No browserslist config found to handle the 'browserslist' target.
|
6260
|
+
let inlineQuery = rest ? rest.trim() : null, browsers = binding_default().loadBrowserslist(inlineQuery, context);
|
6261
|
+
if (!browsers || !inlineQuery && !hasBrowserslistConfig(context)) throw Error(`No browserslist config found to handle the 'browserslist' target.
|
6285
6262
|
See https://github.com/browserslist/browserslist#queries for possible ways to provide a config.
|
6286
6263
|
The recommended way is to add a 'browserslist' key to your package.json and list supported browsers (resp. node.js versions).
|
6287
6264
|
You can also more options via the 'target' option: 'browserslist' / 'browserslist:env' / 'browserslist:query' / 'browserslist:path-to-config' / 'browserslist:path-to-config:env'`);
|
6288
|
-
return
|
6265
|
+
return getBrowserslistTargetHandler().resolve(browsers);
|
6289
6266
|
}
|
6290
6267
|
],
|
6291
6268
|
[
|
@@ -6542,7 +6519,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
6542
6519
|
}, applyExperimentsDefaults = (experiments, { production, development })=>{
|
6543
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);
|
6544
6521
|
}, applybundlerInfoDefaults = (rspackFuture, library)=>{
|
6545
|
-
"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.14"), D(rspackFuture.bundlerInfo, "bundler", "rspack"), D(rspackFuture.bundlerInfo, "force", !library)));
|
6546
6523
|
}, applySnapshotDefaults = (_snapshot, _env)=>{}, applyJavascriptParserOptionsDefaults = (parserOptions)=>{
|
6547
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", [
|
6548
6525
|
"..."
|
@@ -7248,13 +7225,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
7248
7225
|
return !1 === data ? data : data.resource;
|
7249
7226
|
}
|
7250
7227
|
resolve(context, path, request, resolveContext, callback) {
|
7251
|
-
|
7252
|
-
let data = this.binding.resolveSync(path, request);
|
7253
|
-
if (!1 === data) return void callback(null, !1);
|
7254
|
-
callback(null, data.resource, data);
|
7255
|
-
} catch (err) {
|
7256
|
-
callback(err);
|
7257
|
-
}
|
7228
|
+
this.binding.resolve(path, request, (error, data)=>callback(error, data?.resource, data));
|
7258
7229
|
}
|
7259
7230
|
withOptions({ dependencyCategory, resolveToContext, ...resolve }) {
|
7260
7231
|
let rawResolve = getRawResolve(resolve);
|
@@ -7450,7 +7421,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
7450
7421
|
},
|
7451
7422
|
arm: "gnueabihf"
|
7452
7423
|
}
|
7453
|
-
}, BINDING_VERSION = __webpack_require__("@rspack/binding/package.json").version, CORE_VERSION = "1.3.
|
7424
|
+
}, BINDING_VERSION = __webpack_require__("@rspack/binding/package.json").version, CORE_VERSION = "1.3.14", getAddonPlatformArchAbi = ()=>{
|
7454
7425
|
let { platform, arch } = process, binding = "";
|
7455
7426
|
binding += platform;
|
7456
7427
|
let abi = NodePlatformArchToAbi[platform][arch];
|
@@ -8011,7 +7982,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
8011
7982
|
}
|
8012
7983
|
}
|
8013
7984
|
let $assets = Symbol("assets");
|
8014
|
-
Object.defineProperty(binding_.
|
7985
|
+
Object.defineProperty(binding_.KnownBuildInfo.prototype, "assets", {
|
8015
7986
|
enumerable: !0,
|
8016
7987
|
configurable: !0,
|
8017
7988
|
get () {
|
@@ -8029,6 +8000,30 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
8029
8000
|
value: assets
|
8030
8001
|
}), assets;
|
8031
8002
|
}
|
8003
|
+
}), Object.defineProperty(binding_.KnownBuildInfo.prototype, "fileDependencies", {
|
8004
|
+
enumerable: !0,
|
8005
|
+
configurable: !0,
|
8006
|
+
get () {
|
8007
|
+
return new Set(this._fileDependencies);
|
8008
|
+
}
|
8009
|
+
}), Object.defineProperty(binding_.KnownBuildInfo.prototype, "contextDependencies", {
|
8010
|
+
enumerable: !0,
|
8011
|
+
configurable: !0,
|
8012
|
+
get () {
|
8013
|
+
return new Set(this._contextDependencies);
|
8014
|
+
}
|
8015
|
+
}), Object.defineProperty(binding_.KnownBuildInfo.prototype, "missingDependencies", {
|
8016
|
+
enumerable: !0,
|
8017
|
+
configurable: !0,
|
8018
|
+
get () {
|
8019
|
+
return new Set(this._missingDependencies);
|
8020
|
+
}
|
8021
|
+
}), Object.defineProperty(binding_.KnownBuildInfo.prototype, "buildDependencies", {
|
8022
|
+
enumerable: !0,
|
8023
|
+
configurable: !0,
|
8024
|
+
get () {
|
8025
|
+
return new Set(this._buildDependencies);
|
8026
|
+
}
|
8032
8027
|
}), Object.defineProperty(binding_.Module.prototype, "identifier", {
|
8033
8028
|
enumerable: !0,
|
8034
8029
|
configurable: !0,
|
@@ -8766,7 +8761,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
8766
8761
|
obj.children = this.stats.map((stat, idx)=>{
|
8767
8762
|
let obj = stat.toJson(childOptions.children[idx]), compilationName = stat.compilation.name;
|
8768
8763
|
return obj.name = compilationName && makePathsRelative(childOptions.context, compilationName, stat.compilation.compiler.root), obj;
|
8769
|
-
}), childOptions.version && (obj.rspackVersion = "1.3.
|
8764
|
+
}), childOptions.version && (obj.rspackVersion = "1.3.14", obj.version = "5.75.0"), childOptions.hash && (obj.hash = obj.children.map((j)=>j.hash).join(""));
|
8770
8765
|
let mapError = (j, obj)=>({
|
8771
8766
|
...obj,
|
8772
8767
|
compilerPath: obj.compilerPath ? `${j.name}.${obj.compilerPath}` : j.name
|
@@ -8800,7 +8795,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
8800
8795
|
func = asyncLib_noop, fn(err);
|
8801
8796
|
};
|
8802
8797
|
}
|
8803
|
-
let
|
8798
|
+
let asyncLib = {
|
8804
8799
|
each: function(collection, iterator, originalCallback) {
|
8805
8800
|
let callback = once(originalCallback), size = 0, completed = 0;
|
8806
8801
|
if (Array.isArray(collection)) {
|
@@ -8825,11 +8820,11 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
8825
8820
|
this.watchings = watchings, this.compiler = compiler;
|
8826
8821
|
}
|
8827
8822
|
invalidate(callback) {
|
8828
|
-
if (callback)
|
8823
|
+
if (callback) asyncLib.each(this.watchings, (watching, callback)=>watching.invalidate(callback), callback);
|
8829
8824
|
else for (let watching of this.watchings)watching.invalidate();
|
8830
8825
|
}
|
8831
8826
|
close(callback) {
|
8832
|
-
|
8827
|
+
asyncLib.each(this.watchings, (watching, finishedCallback)=>{
|
8833
8828
|
watching.close(finishedCallback);
|
8834
8829
|
}, (err)=>{
|
8835
8830
|
this.compiler.hooks.watchClose.call(), "function" == typeof callback && (this.compiler.running = !1, callback(err));
|
@@ -9000,7 +8995,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
9000
8995
|
for (let node of nodes)0 === node.parents.length && (node.state = "queued", queue.enqueue(node));
|
9001
8996
|
let errored = !1, running = 0, parallelism = this._options.parallelism, nodeDone = (node, err, stats)=>{
|
9002
8997
|
if (!errored) {
|
9003
|
-
if (err) return errored = !0,
|
8998
|
+
if (err) return errored = !0, asyncLib.each(nodes, (node, callback)=>{
|
9004
8999
|
node.compiler.watching ? node.compiler.watching.close(callback) : callback();
|
9005
9000
|
}, ()=>callback(err));
|
9006
9001
|
if (node.result = stats, running--, "running" === node.state) for (let child of (node.state = "done", node.children))"blocked" === child.state && queue.enqueue(child);
|
@@ -9053,7 +9048,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
9053
9048
|
for (let compiler of this.compilers)compiler.inputFileSystem?.purge?.();
|
9054
9049
|
}
|
9055
9050
|
close(callback) {
|
9056
|
-
|
9051
|
+
asyncLib.each(this.compilers, (compiler, cb)=>{
|
9057
9052
|
compiler.close(cb);
|
9058
9053
|
}, callback);
|
9059
9054
|
}
|
@@ -9543,7 +9538,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
9543
9538
|
}
|
9544
9539
|
}, EXTRACT_ERROR = {
|
9545
9540
|
_: (object, error)=>{
|
9546
|
-
object.message = error.message, error.chunkName && (object.chunkName = error.chunkName), error.chunkEntry && (object.chunkEntry = error.chunkEntry), error.chunkInitial && (object.chunkInitial = error.chunkInitial), error.file && (object.file = error.file), error.moduleDescriptor && (object.moduleIdentifier = error.moduleDescriptor.identifier, object.moduleName = error.moduleDescriptor.name), "loc" in error && (object.loc = error.loc);
|
9541
|
+
object.message = error.message, error.code && (object.code = error.code), error.chunkName && (object.chunkName = error.chunkName), error.chunkEntry && (object.chunkEntry = error.chunkEntry), error.chunkInitial && (object.chunkInitial = error.chunkInitial), error.file && (object.file = error.file), error.moduleDescriptor && (object.moduleIdentifier = error.moduleDescriptor.identifier, object.moduleName = error.moduleDescriptor.name), "loc" in error && (object.loc = error.loc);
|
9547
9542
|
},
|
9548
9543
|
ids: (object, error)=>{
|
9549
9544
|
error.chunkId && (object.chunkId = error.chunkId), error.moduleDescriptor && (object.moduleId = error.moduleDescriptor.id);
|
@@ -9656,7 +9651,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
9656
9651
|
object.hash = context.getStatsCompilation(compilation).hash;
|
9657
9652
|
},
|
9658
9653
|
version: (object)=>{
|
9659
|
-
object.version = "5.75.0", object.rspackVersion = "1.3.
|
9654
|
+
object.version = "5.75.0", object.rspackVersion = "1.3.14";
|
9660
9655
|
},
|
9661
9656
|
env: (object, _compilation, _context, { _env })=>{
|
9662
9657
|
object.env = _env;
|
@@ -11259,7 +11254,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
11259
11254
|
for (let key of this.keys){
|
11260
11255
|
let value = void 0 !== process.env[key] ? process.env[key] : this.defaultValues[key];
|
11261
11256
|
void 0 === value && compiler.hooks.thisCompilation.tap("EnvironmentPlugin", (compilation)=>{
|
11262
|
-
let error = new WebpackError(`EnvironmentPlugin - ${key} environment variable is undefined.\n\nYou can pass an object with default values to suppress this warning.\nSee https://rspack.
|
11257
|
+
let error = new WebpackError(`EnvironmentPlugin - ${key} environment variable is undefined.\n\nYou can pass an object with default values to suppress this warning.\nSee https://rspack.rs/plugins/webpack/environment-plugin for example.`);
|
11263
11258
|
error.name = "EnvVariableNotDefinedError", compilation.errors.push(error);
|
11264
11259
|
}), definitions[`process.env.${key}`] = void 0 === value ? "undefined" : JSON.stringify(value);
|
11265
11260
|
}
|
@@ -11908,6 +11903,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
11908
11903
|
ZodSwcNodeNextConfig,
|
11909
11904
|
ZodSwcSystemjsConfig
|
11910
11905
|
]), ZodSwcLoaderOptions = zod_index_js_namespaceObject.z.strictObject({
|
11906
|
+
$schema: zod_index_js_namespaceObject.z.string().optional(),
|
11911
11907
|
test: zod_index_js_namespaceObject.z.string().or(zod_index_js_namespaceObject.z.string().array()).optional(),
|
11912
11908
|
exclude: zod_index_js_namespaceObject.z.string().or(zod_index_js_namespaceObject.z.string().array()).optional(),
|
11913
11909
|
env: ZodSwcEnvConfig.optional(),
|
@@ -13319,7 +13315,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
13319
13315
|
let _options = JSON.stringify(options || {});
|
13320
13316
|
return binding_default().transform(source, _options);
|
13321
13317
|
}
|
13322
|
-
let exports_rspackVersion = "1.3.
|
13318
|
+
let exports_rspackVersion = "1.3.14", exports_version = "5.75.0", exports_WebpackError = Error, sources = __webpack_require__("webpack-sources"), exports_config = {
|
13323
13319
|
getNormalizedRspackOptions: getNormalizedRspackOptions,
|
13324
13320
|
applyRspackOptionsDefaults: applyRspackOptionsDefaults,
|
13325
13321
|
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;
|
@@ -141,8 +140,32 @@ export type KnownStatsModuleIssuer = {
|
|
141
140
|
id?: string | number | null;
|
142
141
|
};
|
143
142
|
export type StatsModuleIssuer = KnownStatsModuleIssuer & Record<string, any>;
|
143
|
+
export declare enum StatsErrorCode {
|
144
|
+
/**
|
145
|
+
* Warning generated when either builtin `SwcJsMinimizer` or `LightningcssMinimizer` fails to minify the code.
|
146
|
+
*/
|
147
|
+
ChunkMinificationError = "ChunkMinificationError",
|
148
|
+
/**
|
149
|
+
* Warning generated when either builtin `SwcJsMinimizer` or `LightningcssMinimizer` fails to minify the code.
|
150
|
+
*/
|
151
|
+
ChunkMinificationWarning = "ChunkMinificationWarning",
|
152
|
+
/**
|
153
|
+
* Error generated when a module is failed to be parsed
|
154
|
+
*/
|
155
|
+
ModuleParseError = "ModuleParseError",
|
156
|
+
/**
|
157
|
+
* Warning generated when a module is failed to be parsed
|
158
|
+
*/
|
159
|
+
ModuleParseWarning = "ModuleParseWarning",
|
160
|
+
/**
|
161
|
+
* Error generated when a module is failed to be built (i.e being built by a
|
162
|
+
* loader)
|
163
|
+
*/
|
164
|
+
ModuleBuildError = "ModuleBuildError"
|
165
|
+
}
|
144
166
|
export type KnownStatsError = {
|
145
167
|
message: string;
|
168
|
+
code?: StatsErrorCode | string;
|
146
169
|
chunkName?: string;
|
147
170
|
chunkEntry?: boolean;
|
148
171
|
chunkInitial?: boolean;
|
@@ -266,15 +289,12 @@ export type SimpleExtractors = {
|
|
266
289
|
moduleTraceItem: ExtractorsByOption<binding.JsStatsModuleTrace, StatsModuleTraceItem>;
|
267
290
|
moduleTraceDependency: ExtractorsByOption<binding.JsStatsModuleTraceDependency, StatsModuleTraceDependency>;
|
268
291
|
};
|
269
|
-
export declare const uniqueArray: <T, I>(items: Iterable<T>, selector: (arg: T) => Iterable<I>) => I[];
|
270
|
-
export declare const uniqueOrderedArray: <T, I>(items: Iterable<T>, selector: (arg: T) => Iterable<I>, comparator: Comparator) => I[];
|
271
292
|
export declare const iterateConfig: (config: Record<string, Record<string, Function>>, options: StatsOptions, fn: (a1: string, a2: Function) => void) => void;
|
272
293
|
type Child = {
|
273
294
|
children?: ItemChildren;
|
274
295
|
filteredChildren?: number;
|
275
296
|
};
|
276
297
|
type ItemChildren = Child[];
|
277
|
-
export declare const getTotalItems: (children: ItemChildren) => number;
|
278
298
|
export declare const collapse: (children: ItemChildren) => Child[];
|
279
299
|
export declare const spaceLimited: (itemsAndGroups: ItemChildren, max: number, filteredChildrenLineReserved?: boolean) => {
|
280
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;
|