@nestjs/cli 10.0.3 → 10.0.5
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/actions/build.action.js +3 -2
- package/lib/compiler/defaults/swc-defaults.d.ts +4 -2
- package/lib/compiler/defaults/swc-defaults.js +3 -2
- package/lib/compiler/defaults/webpack-defaults.js +2 -1
- package/lib/compiler/swc/swc-compiler.d.ts +2 -0
- package/lib/compiler/swc/swc-compiler.js +1 -1
- package/package.json +7 -7
package/actions/build.action.js
CHANGED
|
@@ -68,14 +68,15 @@ class BuildAction extends abstract_action_1.AbstractAction {
|
|
|
68
68
|
case 'webpack':
|
|
69
69
|
return this.runWebpack(configuration, appName, options, pathToTsconfig, isDebugEnabled, watchMode, onSuccess);
|
|
70
70
|
case 'swc':
|
|
71
|
-
return this.runSwc(configuration, appName, pathToTsconfig, watchMode, options, onSuccess);
|
|
71
|
+
return this.runSwc(configuration, appName, pathToTsconfig, watchMode, options, tsOptions, onSuccess);
|
|
72
72
|
}
|
|
73
73
|
}
|
|
74
|
-
async runSwc(configuration, appName, pathToTsconfig, watchMode, options, onSuccess) {
|
|
74
|
+
async runSwc(configuration, appName, pathToTsconfig, watchMode, options, tsOptions, onSuccess) {
|
|
75
75
|
const swc = new swc_compiler_1.SwcCompiler(this.pluginsLoader);
|
|
76
76
|
await swc.run(configuration, pathToTsconfig, appName, {
|
|
77
77
|
watch: watchMode,
|
|
78
78
|
typeCheck: (0, get_value_or_default_1.getValueOrDefault)(configuration, 'compilerOptions.typeCheck', appName, 'typeCheck', options),
|
|
79
|
+
tsOptions,
|
|
79
80
|
assetsManager: this.assetsManager,
|
|
80
81
|
}, onSuccess);
|
|
81
82
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
import * as ts from 'typescript';
|
|
2
|
+
export declare const swcDefaultsFactory: (tsOptions: ts.CompilerOptions) => {
|
|
2
3
|
swcOptions: {
|
|
3
4
|
module: {
|
|
4
5
|
type: string;
|
|
@@ -15,7 +16,8 @@ export declare const swcDefaultsFactory: () => {
|
|
|
15
16
|
decoratorMetadata: boolean;
|
|
16
17
|
};
|
|
17
18
|
keepClassNames: boolean;
|
|
18
|
-
baseUrl: string;
|
|
19
|
+
baseUrl: string | undefined;
|
|
20
|
+
paths: ts.MapLike<string[]> | undefined;
|
|
19
21
|
};
|
|
20
22
|
minify: boolean;
|
|
21
23
|
swcrc: boolean;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.swcDefaultsFactory = void 0;
|
|
4
|
-
const swcDefaultsFactory = () => {
|
|
4
|
+
const swcDefaultsFactory = (tsOptions) => {
|
|
5
5
|
return {
|
|
6
6
|
swcOptions: {
|
|
7
7
|
module: {
|
|
@@ -19,7 +19,8 @@ const swcDefaultsFactory = () => {
|
|
|
19
19
|
decoratorMetadata: true,
|
|
20
20
|
},
|
|
21
21
|
keepClassNames: true,
|
|
22
|
-
baseUrl:
|
|
22
|
+
baseUrl: tsOptions.baseUrl,
|
|
23
|
+
paths: tsOptions.paths,
|
|
23
24
|
},
|
|
24
25
|
minify: false,
|
|
25
26
|
swcrc: true,
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.webpackDefaultsFactory = void 0;
|
|
4
|
-
const ForkTsCheckerWebpackPlugin = require("fork-ts-checker-webpack-plugin");
|
|
5
4
|
const path_1 = require("path");
|
|
6
5
|
const tsconfig_paths_webpack_plugin_1 = require("tsconfig-paths-webpack-plugin");
|
|
7
6
|
const defaults_1 = require("../../configuration/defaults");
|
|
@@ -84,6 +83,8 @@ const webpackDefaultsFactory = (sourceRoot, relativeSourceRoot, entryFilename, i
|
|
|
84
83
|
],
|
|
85
84
|
};
|
|
86
85
|
if (!isPluginRegistered) {
|
|
86
|
+
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
|
87
|
+
const ForkTsCheckerWebpackPlugin = require('fork-ts-checker-webpack-plugin');
|
|
87
88
|
webpackConfiguration.plugins.push(new ForkTsCheckerWebpackPlugin({
|
|
88
89
|
typescript: {
|
|
89
90
|
configFile: tsConfigFile,
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import * as ts from 'typescript';
|
|
1
2
|
import { Configuration } from '../../configuration';
|
|
2
3
|
import { AssetsManager } from '../assets-manager';
|
|
3
4
|
import { BaseCompiler } from '../base-compiler';
|
|
@@ -6,6 +7,7 @@ export type SwcCompilerExtras = {
|
|
|
6
7
|
watch: boolean;
|
|
7
8
|
typeCheck: boolean;
|
|
8
9
|
assetsManager: AssetsManager;
|
|
10
|
+
tsOptions: ts.CompilerOptions;
|
|
9
11
|
};
|
|
10
12
|
export declare class SwcCompiler extends BaseCompiler {
|
|
11
13
|
private readonly pluginMetadataGenerator;
|
|
@@ -20,7 +20,7 @@ class SwcCompiler extends base_compiler_1.BaseCompiler {
|
|
|
20
20
|
this.typeCheckerHost = new type_checker_host_1.TypeCheckerHost();
|
|
21
21
|
}
|
|
22
22
|
async run(configuration, tsConfigPath, appName, extras, onSuccess) {
|
|
23
|
-
const swcOptions = (0, swc_defaults_1.swcDefaultsFactory)();
|
|
23
|
+
const swcOptions = (0, swc_defaults_1.swcDefaultsFactory)(extras.tsOptions);
|
|
24
24
|
if (extras.watch) {
|
|
25
25
|
if (extras.typeCheck) {
|
|
26
26
|
this.runTypeChecker(configuration, tsConfigPath, appName, extras);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nestjs/cli",
|
|
3
|
-
"version": "10.0.
|
|
3
|
+
"version": "10.0.5",
|
|
4
4
|
"description": "Nest - modern, fast, powerful node.js web framework (@cli)",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -62,20 +62,20 @@
|
|
|
62
62
|
"webpack-node-externals": "3.0.0"
|
|
63
63
|
},
|
|
64
64
|
"devDependencies": {
|
|
65
|
-
"@commitlint/cli": "17.6.
|
|
66
|
-
"@commitlint/config-angular": "17.6.
|
|
65
|
+
"@commitlint/cli": "17.6.6",
|
|
66
|
+
"@commitlint/config-angular": "17.6.6",
|
|
67
67
|
"@swc/cli": "0.1.62",
|
|
68
|
-
"@swc/core": "1.3.
|
|
68
|
+
"@swc/core": "1.3.66",
|
|
69
69
|
"@types/inquirer": "8.2.6",
|
|
70
70
|
"@types/jest": "29.5.2",
|
|
71
71
|
"@types/node": "18.16.18",
|
|
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": "5.
|
|
76
|
-
"@typescript-eslint/parser": "5.
|
|
75
|
+
"@typescript-eslint/eslint-plugin": "5.60.0",
|
|
76
|
+
"@typescript-eslint/parser": "5.60.0",
|
|
77
77
|
"delete-empty": "3.0.0",
|
|
78
|
-
"eslint": "8.
|
|
78
|
+
"eslint": "8.43.0",
|
|
79
79
|
"eslint-config-prettier": "8.8.0",
|
|
80
80
|
"gulp": "4.0.2",
|
|
81
81
|
"gulp-clean": "0.4.0",
|