@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
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/module.d.ts
CHANGED
@@ -9,6 +9,8 @@
|
|
9
9
|
*/
|
10
10
|
|
11
11
|
declare namespace Rspack {
|
12
|
+
type ModuleId = string | number;
|
13
|
+
|
12
14
|
type DeclinedEvent =
|
13
15
|
| {
|
14
16
|
type: "declined";
|
@@ -169,6 +171,49 @@ declare namespace Rspack {
|
|
169
171
|
id: string | number;
|
170
172
|
(dependency: string): unknown;
|
171
173
|
}
|
174
|
+
|
175
|
+
interface Module {
|
176
|
+
exports: any;
|
177
|
+
id: ModuleId;
|
178
|
+
loaded: boolean;
|
179
|
+
parents: NodeJS.Module["id"][] | null | undefined;
|
180
|
+
children: NodeJS.Module["id"][];
|
181
|
+
hot?: Hot | undefined;
|
182
|
+
}
|
183
|
+
|
184
|
+
interface RequireResolve {
|
185
|
+
(id: string): ModuleId;
|
186
|
+
}
|
187
|
+
|
188
|
+
interface Require {
|
189
|
+
(path: string): any;
|
190
|
+
<T>(path: string): T;
|
191
|
+
(paths: string[], callback: (...modules: any[]) => void): void;
|
192
|
+
resolve: NodeJS.RequireResolve;
|
193
|
+
ensure(
|
194
|
+
dependencies: string[],
|
195
|
+
callback: (require: (module: string) => void) => void,
|
196
|
+
errorCallback?: (error: Error) => void,
|
197
|
+
chunkName?: string
|
198
|
+
): Rspack.Context;
|
199
|
+
context(
|
200
|
+
request: string,
|
201
|
+
includeSubdirectories?: boolean,
|
202
|
+
filter?: RegExp,
|
203
|
+
mode?: "sync" | "eager" | "weak" | "lazy" | "lazy-once"
|
204
|
+
): Rspack.Context;
|
205
|
+
resolveWeak(dependency: string): void;
|
206
|
+
cache: {
|
207
|
+
[id: string]: NodeJS.Module | undefined;
|
208
|
+
};
|
209
|
+
}
|
210
|
+
|
211
|
+
interface Process {
|
212
|
+
env: {
|
213
|
+
[key: string]: any;
|
214
|
+
NODE_ENV: 'development' | 'production' | (string & {});
|
215
|
+
};
|
216
|
+
}
|
172
217
|
}
|
173
218
|
|
174
219
|
interface ImportMeta {
|
@@ -220,25 +265,12 @@ declare var __non_webpack_require__: (id: any) => unknown;
|
|
220
265
|
declare const __system_context__: object;
|
221
266
|
|
222
267
|
declare namespace NodeJS {
|
223
|
-
interface Module {
|
224
|
-
|
225
|
-
}
|
226
|
-
|
227
|
-
interface Require {
|
228
|
-
ensure(
|
229
|
-
dependencies: string[],
|
230
|
-
callback: (require: (module: string) => void) => void,
|
231
|
-
errorCallback?: (error: Error) => void,
|
232
|
-
chunkName?: string
|
233
|
-
): void;
|
234
|
-
context(
|
235
|
-
request: string,
|
236
|
-
includeSubdirectories?: boolean,
|
237
|
-
filter?: RegExp,
|
238
|
-
mode?: "sync" | "eager" | "weak" | "lazy" | "lazy-once"
|
239
|
-
): Rspack.Context;
|
240
|
-
include(dependency: string): void;
|
241
|
-
resolveWeak(dependency: string): void;
|
242
|
-
onError?: (error: Error) => void;
|
243
|
-
}
|
268
|
+
interface Module extends Rspack.Module {}
|
269
|
+
interface Require extends Rspack.Require {}
|
270
|
+
interface RequireResolve extends Rspack.RequireResolve {}
|
271
|
+
interface Process extends Rspack.Process {}
|
244
272
|
}
|
273
|
+
|
274
|
+
declare var module: NodeJS.Module;
|
275
|
+
declare var require: NodeJS.Require;
|
276
|
+
declare var process: NodeJS.Process;
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@rspack/core",
|
3
|
-
"version": "1.3.
|
3
|
+
"version": "1.3.14",
|
4
4
|
"webpackVersion": "5.75.0",
|
5
5
|
"license": "MIT",
|
6
6
|
"description": "The fast Rust-based web bundler with webpack-compatible API",
|
@@ -29,7 +29,7 @@
|
|
29
29
|
"engines": {
|
30
30
|
"node": ">=16.0.0"
|
31
31
|
},
|
32
|
-
"homepage": "https://rspack.
|
32
|
+
"homepage": "https://rspack.rs",
|
33
33
|
"bugs": "https://github.com/web-infra-dev/rspack/issues",
|
34
34
|
"repository": {
|
35
35
|
"type": "git",
|
@@ -37,28 +37,27 @@
|
|
37
37
|
"directory": "packages/rspack"
|
38
38
|
},
|
39
39
|
"devDependencies": {
|
40
|
-
"@
|
40
|
+
"@rslib/core": "0.9.1",
|
41
|
+
"@swc/core": "1.11.29",
|
41
42
|
"@swc/types": "0.1.21",
|
42
|
-
"@rslib/core": "0.8.0",
|
43
43
|
"@types/graceful-fs": "4.1.9",
|
44
44
|
"@types/watchpack": "^2.4.4",
|
45
|
-
"browserslist": "^
|
45
|
+
"browserslist-load-config": "^1.0.0",
|
46
46
|
"enhanced-resolve": "5.18.1",
|
47
47
|
"graceful-fs": "^4.2.11",
|
48
48
|
"prebundle": "^1.3.3",
|
49
|
+
"tinypool": "^1.0.2",
|
49
50
|
"tsx": "^4.19.4",
|
50
51
|
"typescript": "^5.8.3",
|
51
|
-
"watchpack": "^2.4.
|
52
|
+
"watchpack": "^2.4.4",
|
52
53
|
"webpack-sources": "3.3.0",
|
53
|
-
"zod": "^3.25.
|
54
|
-
"zod-validation-error": "3.4.1"
|
55
|
-
"tinypool": "^1.0.2"
|
54
|
+
"zod": "^3.25.50",
|
55
|
+
"zod-validation-error": "3.4.1"
|
56
56
|
},
|
57
57
|
"dependencies": {
|
58
|
-
"@module-federation/runtime-tools": "0.14.
|
58
|
+
"@module-federation/runtime-tools": "0.14.3",
|
59
59
|
"@rspack/lite-tapable": "1.0.1",
|
60
|
-
"
|
61
|
-
"@rspack/binding": "1.3.12"
|
60
|
+
"@rspack/binding": "1.3.14"
|
62
61
|
},
|
63
62
|
"peerDependencies": {
|
64
63
|
"@swc/helpers": ">=0.5.1"
|
@@ -1 +0,0 @@
|
|
1
|
-
export = any;
|