@rspack/cli 2.0.0-rc.0 → 2.0.0-rc.2
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/bin/rspack.js +5 -1
- package/compiled/jiti/dist/babel.cjs +246 -0
- package/compiled/jiti/dist/jiti.cjs +1 -0
- package/compiled/jiti/index.d.ts +388 -0
- package/compiled/jiti/index.js +30 -0
- package/compiled/jiti/license +21 -0
- package/compiled/jiti/package.json +1 -0
- package/dist/162.js +1300 -0
- package/dist/cli.d.ts +7 -0
- package/dist/constants.d.ts +1 -1
- package/dist/exit-hook.js +61 -0
- package/dist/index.js +1 -1319
- package/dist/json-ext.js +776 -0
- package/dist/profile.js +1 -1
- package/dist/utils/loadConfig.d.ts +2 -2
- package/dist/utils/options.d.ts +2 -1
- package/package.json +10 -11
- package/dist/utils/crossImport.d.ts +0 -1
- package/dist/utils/isEsmFile.d.ts +0 -1
- package/dist/utils/readPackageUp.d.ts +0 -4
package/dist/profile.js
CHANGED
|
@@ -3,7 +3,7 @@ import node_path from "node:path";
|
|
|
3
3
|
import { rspack } from "@rspack/core";
|
|
4
4
|
const DEFAULT_RUST_TRACE_LAYER = 'perfetto';
|
|
5
5
|
async function applyProfile(filterValue, traceLayer = DEFAULT_RUST_TRACE_LAYER, traceOutput) {
|
|
6
|
-
const { asyncExitHook } = await import("exit-hook");
|
|
6
|
+
const { asyncExitHook } = await import("./exit-hook.js");
|
|
7
7
|
if ('logger' !== traceLayer && 'perfetto' !== traceLayer) throw new Error(`unsupported trace layer: ${traceLayer}`);
|
|
8
8
|
const timestamp = Date.now();
|
|
9
9
|
const defaultOutputDir = node_path.resolve(`.rspack-profile-${timestamp}-${process.pid}`);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { MultiRspackOptions, RspackOptions } from '@rspack/core';
|
|
2
2
|
import type { CommonOptions } from './options';
|
|
3
|
-
export
|
|
4
|
-
export
|
|
3
|
+
export type LoadedRspackConfig = undefined | RspackOptions | MultiRspackOptions | ((env: Record<string, any>, argv?: Record<string, any>) => RspackOptions | MultiRspackOptions | Promise<RspackOptions | MultiRspackOptions>);
|
|
4
|
+
export declare const resolveRspackConfigExport: (configExport: LoadedRspackConfig, options: CommonOptions) => Promise<RspackOptions | MultiRspackOptions>;
|
|
5
5
|
/**
|
|
6
6
|
* Loads and merges configurations from the 'extends' property
|
|
7
7
|
* @param config The configuration object that may contain an 'extends' property
|
package/dist/utils/options.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { Command } from 'cac';
|
|
2
|
+
export type ConfigLoader = 'auto' | 'jiti' | 'native';
|
|
2
3
|
/**
|
|
3
4
|
* Apply common options for all commands
|
|
4
5
|
*/
|
|
@@ -6,7 +7,7 @@ export declare const commonOptions: (command: Command) => Command;
|
|
|
6
7
|
export type CommonOptions = {
|
|
7
8
|
config?: string;
|
|
8
9
|
configName?: string[];
|
|
9
|
-
configLoader?:
|
|
10
|
+
configLoader?: ConfigLoader;
|
|
10
11
|
env?: Record<string, unknown> | string[];
|
|
11
12
|
nodeEnv?: string;
|
|
12
13
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rspack/cli",
|
|
3
|
-
"version": "2.0.0-rc.
|
|
3
|
+
"version": "2.0.0-rc.2",
|
|
4
4
|
"description": "CLI for rspack",
|
|
5
5
|
"homepage": "https://rspack.rs",
|
|
6
6
|
"bugs": "https://github.com/web-infra-dev/rspack/issues",
|
|
@@ -24,24 +24,23 @@
|
|
|
24
24
|
},
|
|
25
25
|
"files": [
|
|
26
26
|
"bin",
|
|
27
|
+
"compiled",
|
|
27
28
|
"dist"
|
|
28
29
|
],
|
|
29
|
-
"dependencies": {
|
|
30
|
-
"@discoveryjs/json-ext": "^0.5.7",
|
|
31
|
-
"exit-hook": "^4.0.0"
|
|
32
|
-
},
|
|
33
30
|
"devDependencies": {
|
|
34
|
-
"@
|
|
35
|
-
"@
|
|
31
|
+
"@discoveryjs/json-ext": "^0.5.7",
|
|
32
|
+
"@rslib/core": "0.21.0",
|
|
33
|
+
"@rspack/dev-server": "2.0.0-rc.2",
|
|
36
34
|
"cac": "^7.0.0",
|
|
37
35
|
"concat-stream": "^2.0.0",
|
|
38
36
|
"cross-env": "^10.1.0",
|
|
39
37
|
"execa": "^5.1.1",
|
|
40
|
-
"
|
|
41
|
-
"
|
|
38
|
+
"exit-hook": "^4.0.0",
|
|
39
|
+
"jiti": "^2.6.1",
|
|
40
|
+
"prebundle": "^1.6.4",
|
|
42
41
|
"typescript": "^6.0.2",
|
|
43
|
-
"@rspack/core": "2.0.0-rc.
|
|
44
|
-
"@rspack/test-tools": "2.0.0-rc.
|
|
42
|
+
"@rspack/core": "2.0.0-rc.2",
|
|
43
|
+
"@rspack/test-tools": "2.0.0-rc.2"
|
|
45
44
|
},
|
|
46
45
|
"peerDependencies": {
|
|
47
46
|
"@rspack/core": "^2.0.0-0",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const crossImport: <T = any>(path: string) => Promise<T>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const isEsmFile: (filePath: string) => boolean;
|