@nestjs/cli 10.0.0 → 10.0.1

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.
@@ -7,6 +7,7 @@ const chokidar = require("chokidar");
7
7
  const fs_1 = require("fs");
8
8
  const path_1 = require("path");
9
9
  const ui_1 = require("../../ui");
10
+ const tree_kill_1 = require("../../utils/tree-kill");
10
11
  const base_compiler_1 = require("../base-compiler");
11
12
  const swc_defaults_1 = require("../defaults/swc-defaults");
12
13
  const plugin_metadata_generator_1 = require("../plugins/plugin-metadata-generator");
@@ -48,9 +49,10 @@ class SwcCompiler extends base_compiler_1.BaseCompiler {
48
49
  configuration.sourceRoot ?? 'src',
49
50
  JSON.stringify(configuration.compilerOptions.plugins ?? []),
50
51
  ];
51
- (0, child_process_1.fork)((0, path_1.join)(__dirname, 'forked-type-checker.js'), args, {
52
+ const childProcessRef = (0, child_process_1.fork)((0, path_1.join)(__dirname, 'forked-type-checker.js'), args, {
52
53
  cwd: process.cwd(),
53
54
  });
55
+ process.on('exit', () => childProcessRef && (0, tree_kill_1.treeKillSync)(childProcessRef.pid));
54
56
  }
55
57
  else {
56
58
  const { readonlyVisitors } = this.loadPlugins(configuration, tsConfigPath, appName);
@@ -109,7 +111,7 @@ class SwcCompiler extends base_compiler_1.BaseCompiler {
109
111
  catch (err) {
110
112
  console.error(ui_1.ERROR_PREFIX +
111
113
  ' Failed to load "@swc/cli" and "@swc/core" packages. Please, install them by running "npm i -D @swc/cli @swc/core".');
112
- throw err;
114
+ process.exit(1);
113
115
  }
114
116
  }
115
117
  getSwcRcFileContentIfExists() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nestjs/cli",
3
- "version": "10.0.0",
3
+ "version": "10.0.1",
4
4
  "description": "Nest - modern, fast, powerful node.js web framework (@cli)",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -41,7 +41,7 @@
41
41
  "@angular-devkit/core": "16.1.0",
42
42
  "@angular-devkit/schematics": "16.1.0",
43
43
  "@angular-devkit/schematics-cli": "16.1.0",
44
- "@nestjs/schematics": "^10.0.0",
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",