@nestjs/cli 10.1.1 → 10.1.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.
@@ -29,7 +29,7 @@ const swcDefaultsFactory = (tsOptions, configuration) => {
29
29
  swcrc: true,
30
30
  },
31
31
  cliOptions: {
32
- outDir: tsOptions.outDir ?? 'dist',
32
+ outDir: tsOptions.outDir ? convertPath(tsOptions.outDir) : 'dist',
33
33
  filenames: [configuration?.sourceRoot ?? 'src'],
34
34
  sync: false,
35
35
  extensions: ['.js', '.ts'],
@@ -42,3 +42,13 @@ const swcDefaultsFactory = (tsOptions, configuration) => {
42
42
  };
43
43
  };
44
44
  exports.swcDefaultsFactory = swcDefaultsFactory;
45
+ /**
46
+ * Converts Windows specific file paths to posix
47
+ * @param windowsPath
48
+ */
49
+ function convertPath(windowsPath) {
50
+ return windowsPath
51
+ .replace(/^\\\\\?\\/, '')
52
+ .replace(/\\/g, '/')
53
+ .replace(/\/\/+/g, '/');
54
+ }
@@ -6,6 +6,7 @@ const child_process_1 = require("child_process");
6
6
  const chokidar = require("chokidar");
7
7
  const fs_1 = require("fs");
8
8
  const path_1 = require("path");
9
+ const posix_1 = require("path/posix");
9
10
  const ui_1 = require("../../ui");
10
11
  const tree_kill_1 = require("../../utils/tree-kill");
11
12
  const base_compiler_1 = require("../base-compiler");
@@ -162,8 +163,11 @@ class SwcCompiler extends base_compiler_1.BaseCompiler {
162
163
  };
163
164
  }
164
165
  watchFilesInOutDir(options, onChange) {
165
- const outDir = (0, path_1.join)(process.cwd(), options.cliOptions.outDir, '**/*.js');
166
- const watcher = chokidar.watch(outDir, {
166
+ const dir = (0, posix_1.isAbsolute)(options.cliOptions.outDir)
167
+ ? options.cliOptions.outDir
168
+ : (0, path_1.join)(process.cwd(), options.cliOptions.outDir);
169
+ const paths = (0, path_1.join)(dir, '**/*.js');
170
+ const watcher = chokidar.watch(paths, {
167
171
  ignoreInitial: true,
168
172
  awaitWriteFinish: {
169
173
  stabilityThreshold: 50,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nestjs/cli",
3
- "version": "10.1.1",
3
+ "version": "10.1.2",
4
4
  "description": "Nest - modern, fast, powerful node.js web framework (@cli)",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -72,8 +72,8 @@
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.60.1",
76
- "@typescript-eslint/parser": "5.60.1",
75
+ "@typescript-eslint/eslint-plugin": "5.61.0",
76
+ "@typescript-eslint/parser": "5.61.0",
77
77
  "delete-empty": "3.0.0",
78
78
  "eslint": "8.44.0",
79
79
  "eslint-config-prettier": "8.8.0",