@nestjs/cli 10.1.11 → 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.
@@ -21,7 +21,7 @@ jobs:
21
21
  build:
22
22
  working_directory: ~/nest
23
23
  docker:
24
- - image: cimg/node:20.2
24
+ - image: cimg/node:20.5
25
25
  steps:
26
26
  - checkout
27
27
  - run:
@@ -43,7 +43,7 @@ jobs:
43
43
  unit_tests:
44
44
  working_directory: ~/nest
45
45
  docker:
46
- - image: cimg/node:20.2
46
+ - image: cimg/node:20.5
47
47
  steps:
48
48
  - checkout
49
49
  - *restore-cache
@@ -70,6 +70,8 @@ class StartAction extends build_action_1.BuildAction {
70
70
  if (!fs.existsSync(outputFilePath + '.js')) {
71
71
  outputFilePath = (0, path_1.join)(outDirName, entryFile);
72
72
  }
73
+ // Resolve to real file path
74
+ outputFilePath = require.resolve(outputFilePath);
73
75
  let childProcessArgs = [];
74
76
  const argsStartIndex = process.argv.indexOf('--');
75
77
  if (argsStartIndex >= 0) {
@@ -8,6 +8,7 @@ class StartCommand extends abstract_command_1.AbstractCommand {
8
8
  load(program) {
9
9
  program
10
10
  .command('start [app]')
11
+ .allowUnknownOption()
11
12
  .option('-c, --config [path]', 'Path to nest-cli configuration file.')
12
13
  .option('-p, --path [path]', 'Path to tsconfig file.')
13
14
  .option('-w, --watch', 'Run in watch mode (live-reload).')
@@ -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,13 +40,11 @@ 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
  }
46
- else {
47
- extras.assetsManager?.closeWatchers();
48
- }
47
+ extras.assetsManager?.closeWatchers();
49
48
  }
50
49
  }
51
50
  runTypeChecker(configuration, tsConfigPath, appName, extras) {
@@ -97,11 +96,21 @@ class SwcCompiler extends base_compiler_1.BaseCompiler {
97
96
  });
98
97
  }
99
98
  }
100
- async runSwc(options, extras, swcrcFilePath) {
99
+ async runSwc(configuration, options, extras, swcrcFilePath) {
101
100
  process.nextTick(() => console.log(constants_1.SWC_LOG_PREFIX, chalk.cyan('Running...')));
102
101
  const swcCli = this.loadSwcCliBinary();
103
102
  const swcRcFile = await this.getSwcRcFileContentIfExists(swcrcFilePath);
104
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
+ }
105
114
  await swcCli.default({
106
115
  ...options,
107
116
  swcOptions,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nestjs/cli",
3
- "version": "10.1.11",
3
+ "version": "10.1.13",
4
4
  "description": "Nest - modern, fast, powerful node.js web framework (@cli)",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -38,16 +38,16 @@
38
38
  },
39
39
  "homepage": "https://github.com/nestjs/nest-cli#readme",
40
40
  "dependencies": {
41
- "@angular-devkit/core": "16.1.4",
42
- "@angular-devkit/schematics": "16.1.4",
43
- "@angular-devkit/schematics-cli": "16.1.4",
41
+ "@angular-devkit/core": "16.2.0",
42
+ "@angular-devkit/schematics": "16.2.0",
43
+ "@angular-devkit/schematics-cli": "16.2.0",
44
44
  "@nestjs/schematics": "^10.0.1",
45
45
  "chalk": "4.1.2",
46
46
  "chokidar": "3.5.3",
47
47
  "cli-table3": "0.6.3",
48
48
  "commander": "4.1.1",
49
49
  "fork-ts-checker-webpack-plugin": "8.0.0",
50
- "inquirer": "8.2.5",
50
+ "inquirer": "8.2.6",
51
51
  "node-emoji": "1.11.0",
52
52
  "ora": "5.4.1",
53
53
  "os-name": "4.0.1",
@@ -58,32 +58,32 @@
58
58
  "tsconfig-paths": "4.2.0",
59
59
  "tsconfig-paths-webpack-plugin": "4.1.0",
60
60
  "typescript": "5.1.6",
61
- "webpack": "5.88.1",
61
+ "webpack": "5.88.2",
62
62
  "webpack-node-externals": "3.0.0"
63
63
  },
64
64
  "devDependencies": {
65
- "@commitlint/cli": "17.6.7",
66
- "@commitlint/config-angular": "17.6.7",
65
+ "@commitlint/cli": "17.7.1",
66
+ "@commitlint/config-angular": "17.7.0",
67
67
  "@swc/cli": "0.1.62",
68
- "@swc/core": "1.3.72",
69
- "@types/inquirer": "8.2.6",
68
+ "@swc/core": "1.3.78",
69
+ "@types/inquirer": "9.0.3",
70
70
  "@types/jest": "29.5.3",
71
- "@types/node": "18.17.1",
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.2.0",
76
- "@typescript-eslint/parser": "6.2.0",
75
+ "@typescript-eslint/eslint-plugin": "6.4.1",
76
+ "@typescript-eslint/parser": "6.4.1",
77
77
  "delete-empty": "3.0.0",
78
- "eslint": "8.46.0",
79
- "eslint-config-prettier": "8.9.0",
78
+ "eslint": "8.47.0",
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.2",
84
- "lint-staged": "13.2.3",
85
- "prettier": "3.0.0",
86
- "release-it": "16.1.3",
83
+ "jest": "29.6.3",
84
+ "lint-staged": "14.0.1",
85
+ "prettier": "3.0.2",
86
+ "release-it": "16.1.5",
87
87
  "ts-jest": "29.1.1",
88
88
  "ts-loader": "9.4.4"
89
89
  },