@nestjs/cli 10.1.12 → 10.1.13
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.
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.SwcCompiler = void 0;
|
|
4
4
|
const chalk = require("chalk");
|
|
5
|
+
const path = require("path");
|
|
5
6
|
const child_process_1 = require("child_process");
|
|
6
7
|
const chokidar = require("chokidar");
|
|
7
8
|
const fs_1 = require("fs");
|
|
@@ -27,7 +28,7 @@ class SwcCompiler extends base_compiler_1.BaseCompiler {
|
|
|
27
28
|
if (extras.typeCheck) {
|
|
28
29
|
this.runTypeChecker(configuration, tsConfigPath, appName, extras);
|
|
29
30
|
}
|
|
30
|
-
await this.runSwc(swcOptions, extras, swcrcFilePath);
|
|
31
|
+
await this.runSwc(configuration, swcOptions, extras, swcrcFilePath);
|
|
31
32
|
if (onSuccess) {
|
|
32
33
|
onSuccess();
|
|
33
34
|
const debounceTime = 150;
|
|
@@ -39,7 +40,7 @@ class SwcCompiler extends base_compiler_1.BaseCompiler {
|
|
|
39
40
|
if (extras.typeCheck) {
|
|
40
41
|
await this.runTypeChecker(configuration, tsConfigPath, appName, extras);
|
|
41
42
|
}
|
|
42
|
-
await this.runSwc(swcOptions, extras, swcrcFilePath);
|
|
43
|
+
await this.runSwc(configuration, swcOptions, extras, swcrcFilePath);
|
|
43
44
|
if (onSuccess) {
|
|
44
45
|
onSuccess();
|
|
45
46
|
}
|
|
@@ -95,11 +96,21 @@ class SwcCompiler extends base_compiler_1.BaseCompiler {
|
|
|
95
96
|
});
|
|
96
97
|
}
|
|
97
98
|
}
|
|
98
|
-
async runSwc(options, extras, swcrcFilePath) {
|
|
99
|
+
async runSwc(configuration, options, extras, swcrcFilePath) {
|
|
99
100
|
process.nextTick(() => console.log(constants_1.SWC_LOG_PREFIX, chalk.cyan('Running...')));
|
|
100
101
|
const swcCli = this.loadSwcCliBinary();
|
|
101
102
|
const swcRcFile = await this.getSwcRcFileContentIfExists(swcrcFilePath);
|
|
102
103
|
const swcOptions = this.deepMerge(options.swcOptions, swcRcFile);
|
|
104
|
+
// jsc.baseUrl should be resolved by the caller, if it's passed as an object.
|
|
105
|
+
// https://github.com/swc-project/swc/pull/7827
|
|
106
|
+
if (swcOptions?.jsc?.baseUrl) {
|
|
107
|
+
if (swcrcFilePath) {
|
|
108
|
+
swcOptions.jsc.baseUrl = path.join(path.dirname(swcrcFilePath), swcOptions.jsc.baseUrl);
|
|
109
|
+
}
|
|
110
|
+
else {
|
|
111
|
+
swcOptions.jsc.baseUrl = path.join(path.dirname(configuration.sourceRoot), swcOptions.jsc.baseUrl);
|
|
112
|
+
}
|
|
113
|
+
}
|
|
103
114
|
await swcCli.default({
|
|
104
115
|
...options,
|
|
105
116
|
swcOptions,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nestjs/cli",
|
|
3
|
-
"version": "10.1.
|
|
3
|
+
"version": "10.1.13",
|
|
4
4
|
"description": "Nest - modern, fast, powerful node.js web framework (@cli)",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -65,23 +65,23 @@
|
|
|
65
65
|
"@commitlint/cli": "17.7.1",
|
|
66
66
|
"@commitlint/config-angular": "17.7.0",
|
|
67
67
|
"@swc/cli": "0.1.62",
|
|
68
|
-
"@swc/core": "1.3.
|
|
68
|
+
"@swc/core": "1.3.78",
|
|
69
69
|
"@types/inquirer": "9.0.3",
|
|
70
70
|
"@types/jest": "29.5.3",
|
|
71
|
-
"@types/node": "18.17.
|
|
71
|
+
"@types/node": "18.17.7",
|
|
72
72
|
"@types/node-emoji": "1.8.2",
|
|
73
73
|
"@types/shelljs": "0.8.12",
|
|
74
74
|
"@types/webpack-node-externals": "3.0.0",
|
|
75
|
-
"@typescript-eslint/eslint-plugin": "6.4.
|
|
76
|
-
"@typescript-eslint/parser": "6.4.
|
|
75
|
+
"@typescript-eslint/eslint-plugin": "6.4.1",
|
|
76
|
+
"@typescript-eslint/parser": "6.4.1",
|
|
77
77
|
"delete-empty": "3.0.0",
|
|
78
78
|
"eslint": "8.47.0",
|
|
79
79
|
"eslint-config-prettier": "9.0.0",
|
|
80
80
|
"gulp": "4.0.2",
|
|
81
81
|
"gulp-clean": "0.4.0",
|
|
82
82
|
"husky": "8.0.3",
|
|
83
|
-
"jest": "29.6.
|
|
84
|
-
"lint-staged": "14.0.
|
|
83
|
+
"jest": "29.6.3",
|
|
84
|
+
"lint-staged": "14.0.1",
|
|
85
85
|
"prettier": "3.0.2",
|
|
86
86
|
"release-it": "16.1.5",
|
|
87
87
|
"ts-jest": "29.1.1",
|