@rspack/core 1.0.14 → 1.1.0
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/@swc/types/index.d.ts +1962 -0
- package/compiled/@swc/types/index.js +19 -0
- package/compiled/@swc/types/license +201 -0
- package/compiled/@swc/types/package.json +1 -0
- package/compiled/enhanced-resolve/CachedInputFileSystem.js +267 -80
- package/compiled/enhanced-resolve/index.d.ts +849 -236
- package/compiled/enhanced-resolve/package.json +1 -1
- package/compiled/graceful-fs/index.js +10 -10
- package/compiled/graceful-fs/package.json +1 -1
- package/compiled/zod/index.d.ts +2 -2
- package/dist/Compilation.d.ts +7 -18
- package/dist/DependenciesBlock.d.ts +6 -4
- package/dist/FileSystem.d.ts +7 -2
- package/dist/Module.d.ts +17 -14
- package/dist/builtin-loader/swc/types.d.ts +9 -435
- package/dist/builtin-plugin/EntryPlugin.d.ts +14 -11
- package/dist/builtin-plugin/FlagDependencyUsagePlugin.d.ts +10 -10
- package/dist/builtin-plugin/HtmlRspackPlugin.d.ts +1 -1
- package/dist/builtin-plugin/MangleExportsPlugin.d.ts +10 -10
- package/dist/builtin-plugin/ModuleConcatenationPlugin.d.ts +8 -10
- package/dist/builtin-plugin/RemoveDuplicateModulesPlugin.d.ts +10 -0
- package/dist/builtin-plugin/SizeLimitsPlugin.d.ts +8 -8
- package/dist/builtin-plugin/SplitChunksPlugin.d.ts +1 -1
- package/dist/builtin-plugin/index.d.ts +4 -2
- package/dist/builtin-plugin/lazy-compilation/lazyCompilation.d.ts +3 -3
- package/dist/builtin-plugin/lazy-compilation/plugin.d.ts +3 -3
- package/dist/config/adapter.d.ts +1 -1
- package/dist/config/adapterRuleUse.d.ts +1 -1
- package/dist/config/index.d.ts +1 -0
- package/dist/config/normalization.d.ts +4 -11
- package/dist/config/types.d.ts +417 -9
- package/dist/config/zod.d.ts +1044 -1303
- package/dist/exports.d.ts +4 -2
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1023 -5103
- package/dist/util/ArrayQueue.d.ts +1 -9
- package/dist/util/asyncLib.d.ts +54 -0
- package/package.json +9 -9
- package/dist/builtin-loader/swc/react.d.ts +0 -15
- package/dist/lib/Dependency.d.ts +0 -23
- package/dist/lib/formatLocation.d.ts +0 -16
- package/dist/logging/runtime.d.ts +0 -16
- package/dist/util/IterableHelpers.d.ts +0 -12
- package/dist/util/scheme.d.ts +0 -6
- package/dist/util/webpack.d.ts +0 -4
- /package/dist/builtin-plugin/{LightningCssMiminizerRspackPlugin.d.ts → LightningCssMinimizerRspackPlugin.d.ts} +0 -0
|
@@ -40,14 +40,6 @@ declare class ArrayQueue<T> {
|
|
|
40
40
|
* @returns {void}
|
|
41
41
|
*/
|
|
42
42
|
delete(item: T): void;
|
|
43
|
-
[Symbol.iterator]():
|
|
44
|
-
next: () => {
|
|
45
|
-
done: boolean;
|
|
46
|
-
value: T;
|
|
47
|
-
} | {
|
|
48
|
-
done: boolean;
|
|
49
|
-
value: undefined;
|
|
50
|
-
};
|
|
51
|
-
};
|
|
43
|
+
[Symbol.iterator](): Generator<T, void, unknown>;
|
|
52
44
|
}
|
|
53
45
|
export default ArrayQueue;
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The following code is modified based on
|
|
3
|
+
* https://github.com/suguru03/neo-async/blob/master/lib/async.js
|
|
4
|
+
*
|
|
5
|
+
* MIT Licensed
|
|
6
|
+
* Author Suguru Motegi
|
|
7
|
+
* Copyright (c) 2014-2018 Suguru Motegi
|
|
8
|
+
* https://github.com/suguru03/neo-async/blob/master/LICENSE
|
|
9
|
+
*/
|
|
10
|
+
export interface Dictionary<T> {
|
|
11
|
+
[key: string]: T;
|
|
12
|
+
}
|
|
13
|
+
export type IterableCollection<T> = T[] | IterableIterator<T> | Dictionary<T>;
|
|
14
|
+
export type ErrorCallback<E = Error> = (err?: E | null) => void;
|
|
15
|
+
export type AsyncIterator<T, E = Error> = (item: T, callback: ErrorCallback<E>) => void;
|
|
16
|
+
/**
|
|
17
|
+
* @example
|
|
18
|
+
*
|
|
19
|
+
* // array
|
|
20
|
+
* var order = [];
|
|
21
|
+
* var array = [1, 3, 2];
|
|
22
|
+
* var iterator = function(num, done) {
|
|
23
|
+
* setTimeout(function() {
|
|
24
|
+
* order.push(num);
|
|
25
|
+
* done();
|
|
26
|
+
* }, num * 10);
|
|
27
|
+
* };
|
|
28
|
+
* asyncLib.each(array, iterator, function(err, res) {
|
|
29
|
+
* console.log(res); // undefined
|
|
30
|
+
* console.log(order); // [1, 2, 3]
|
|
31
|
+
* });
|
|
32
|
+
*
|
|
33
|
+
* @example
|
|
34
|
+
*
|
|
35
|
+
* // break
|
|
36
|
+
* var order = [];
|
|
37
|
+
* var array = [1, 3, 2];
|
|
38
|
+
* var iterator = function(num, done) {
|
|
39
|
+
* setTimeout(function() {
|
|
40
|
+
* order.push(num);
|
|
41
|
+
* done(null, num !== 2);
|
|
42
|
+
* }, num * 10);
|
|
43
|
+
* };
|
|
44
|
+
* asyncLib.each(array, iterator, function(err, res) {
|
|
45
|
+
* console.log(res); // undefined
|
|
46
|
+
* console.log(order); // [1, 2]
|
|
47
|
+
* });
|
|
48
|
+
*
|
|
49
|
+
*/
|
|
50
|
+
declare function each<T, E = Error>(collection: IterableCollection<T>, iterator: AsyncIterator<T, E>, originalCallback: ErrorCallback<E>): void;
|
|
51
|
+
declare const _default: {
|
|
52
|
+
each: typeof each;
|
|
53
|
+
};
|
|
54
|
+
export default _default;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rspack/core",
|
|
3
|
-
"version": "1.0
|
|
3
|
+
"version": "1.1.0",
|
|
4
4
|
"webpackVersion": "5.75.0",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"description": "The fast Rust-based web bundler with webpack-compatible API",
|
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
},
|
|
13
13
|
"exports": {
|
|
14
14
|
".": {
|
|
15
|
+
"types": "./dist/index.d.ts",
|
|
15
16
|
"default": "./dist/index.js"
|
|
16
17
|
},
|
|
17
18
|
"./hot/*": "./hot/*.js",
|
|
@@ -36,17 +37,16 @@
|
|
|
36
37
|
"directory": "packages/rspack"
|
|
37
38
|
},
|
|
38
39
|
"devDependencies": {
|
|
39
|
-
"@swc/core": "1.
|
|
40
|
+
"@swc/core": "1.7.40",
|
|
41
|
+
"@swc/types": "0.1.12",
|
|
40
42
|
"@types/graceful-fs": "4.1.9",
|
|
41
|
-
"@types/neo-async": "^2.6.6",
|
|
42
43
|
"@types/watchpack": "^2.4.0",
|
|
43
44
|
"@types/webpack-sources": "3.2.3",
|
|
44
45
|
"browserslist": "^4.21.3",
|
|
45
46
|
"cross-env": "^7.0.3",
|
|
46
|
-
"enhanced-resolve": "5.
|
|
47
|
-
"graceful-fs": "4.2.
|
|
47
|
+
"enhanced-resolve": "5.17.1",
|
|
48
|
+
"graceful-fs": "4.2.11",
|
|
48
49
|
"json-parse-even-better-errors": "^3.0.0",
|
|
49
|
-
"neo-async": "2.6.2",
|
|
50
50
|
"prebundle": "^1.1.0",
|
|
51
51
|
"tsc-alias": "^1.8.8",
|
|
52
52
|
"tsup": "^8.3.0",
|
|
@@ -55,13 +55,13 @@
|
|
|
55
55
|
"webpack-dev-server": "5.0.4",
|
|
56
56
|
"webpack-sources": "3.2.3",
|
|
57
57
|
"zod": "^3.23.8",
|
|
58
|
-
"zod-validation-error": "3.
|
|
58
|
+
"zod-validation-error": "3.4.0"
|
|
59
59
|
},
|
|
60
60
|
"dependencies": {
|
|
61
61
|
"@module-federation/runtime-tools": "0.5.1",
|
|
62
62
|
"@rspack/lite-tapable": "1.0.1",
|
|
63
63
|
"caniuse-lite": "^1.0.30001616",
|
|
64
|
-
"@rspack/binding": "1.0
|
|
64
|
+
"@rspack/binding": "1.1.0"
|
|
65
65
|
},
|
|
66
66
|
"peerDependencies": {
|
|
67
67
|
"@swc/helpers": ">=0.5.1"
|
|
@@ -80,6 +80,6 @@
|
|
|
80
80
|
"prepare-container-runtime": "node ./scripts/prepare-container-runtime.js",
|
|
81
81
|
"doc-coverage": "node scripts/check-documentation-coverage.mjs",
|
|
82
82
|
"api-extractor": "api-extractor run --verbose",
|
|
83
|
-
"api-extractor:ci": "api-extractor run --verbose || diff temp/api.md etc/api.md"
|
|
83
|
+
"api-extractor:ci": "api-extractor run --verbose || diff temp/core.api.md etc/core.api.md"
|
|
84
84
|
}
|
|
85
85
|
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
type RawReactOptions = {
|
|
2
|
-
runtime?: "automatic" | "classic";
|
|
3
|
-
importSource?: string;
|
|
4
|
-
pragma?: string;
|
|
5
|
-
pragmaFrag?: string;
|
|
6
|
-
throwIfNamespace?: boolean;
|
|
7
|
-
development?: boolean;
|
|
8
|
-
useBuiltins?: boolean;
|
|
9
|
-
useSpread?: boolean;
|
|
10
|
-
refresh?: boolean;
|
|
11
|
-
};
|
|
12
|
-
declare function resolveReact(react: ReactOptions): RawReactOptions;
|
|
13
|
-
type ReactOptions = RawReactOptions | undefined;
|
|
14
|
-
export { resolveReact };
|
|
15
|
-
export type { ReactOptions };
|
package/dist/lib/Dependency.d.ts
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The following code is modified based on
|
|
3
|
-
* https://github.com/webpack/webpack/blob/4b4ca3b/lib/Dependency.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
|
-
export type SourcePosition = {
|
|
11
|
-
line: number;
|
|
12
|
-
column?: number;
|
|
13
|
-
};
|
|
14
|
-
export type RealDependencyLocation = {
|
|
15
|
-
start: SourcePosition;
|
|
16
|
-
end?: SourcePosition;
|
|
17
|
-
index?: number;
|
|
18
|
-
};
|
|
19
|
-
export type SyntheticDependencyLocation = {
|
|
20
|
-
name: string;
|
|
21
|
-
index?: number;
|
|
22
|
-
};
|
|
23
|
-
export type DependencyLocation = SyntheticDependencyLocation | RealDependencyLocation;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The following code is modified based on
|
|
3
|
-
* https://github.com/webpack/webpack/blob/4b4ca3b/lib/formatLocation.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 type { DependencyLocation } from "./Dependency";
|
|
11
|
-
/**
|
|
12
|
-
* @param loc location
|
|
13
|
-
* @returns formatted location
|
|
14
|
-
*/
|
|
15
|
-
declare const formatLocation: (loc: DependencyLocation) => string;
|
|
16
|
-
export default formatLocation;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The following code is modified based on
|
|
3
|
-
* https://github.com/webpack/webpack/blob/4b4ca3b/lib/logging/runtime.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 { Logger } from "./Logger";
|
|
11
|
-
import { type LoggerOptions } from "./createConsoleLogger";
|
|
12
|
-
export declare const getLogger: (name: string) => Logger;
|
|
13
|
-
export declare const configureDefaultLogger: (options: LoggerOptions) => void;
|
|
14
|
-
export declare const hooks: {
|
|
15
|
-
log: any;
|
|
16
|
-
};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The following code is modified based on
|
|
3
|
-
* https://github.com/webpack/webpack/tree/4b4ca3bb53f36a5b8fc6bc1bd976ed7af161bd80/lib/util
|
|
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
|
-
export declare const last: <T>(set: Iterable<T>) => T | undefined;
|
|
11
|
-
export declare const someInIterable: <T>(iterable: Iterable<T>, filter: (arg: T) => boolean) => boolean;
|
|
12
|
-
export declare const countIterable: <T>(iterable: Iterable<T>) => number;
|
package/dist/util/scheme.d.ts
DELETED
package/dist/util/webpack.d.ts
DELETED
|
File without changes
|