@nestjs/cli 8.1.4 → 8.1.8
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/.circleci/config.yml +2 -2
- package/.eslintrc.js +1 -2
- package/CONTRIBUTING.md +2 -2
- package/LICENSE +1 -1
- package/commands/generate.command.js +1 -1
- package/lib/compiler/defaults/webpack-defaults.js +2 -0
- package/lib/compiler/hooks/tsconfig-paths.hook.js +1 -0
- package/lib/compiler/webpack-compiler.js +0 -1
- package/lib/utils/project-utils.js +1 -1
- package/lib/utils/tree-kill.js +3 -3
- package/package.json +26 -26
- package/test/lib/compiler/hooks/__snapshots__/tsconfig-paths.hook.spec.ts.snap +23 -0
package/.circleci/config.yml
CHANGED
|
@@ -21,7 +21,7 @@ jobs:
|
|
|
21
21
|
build:
|
|
22
22
|
working_directory: ~/nest
|
|
23
23
|
docker:
|
|
24
|
-
- image: circleci/node:
|
|
24
|
+
- image: circleci/node:17
|
|
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: circleci/node:
|
|
46
|
+
- image: circleci/node:17
|
|
47
47
|
steps:
|
|
48
48
|
- checkout
|
|
49
49
|
- *restore-cache
|
package/.eslintrc.js
CHANGED
package/CONTRIBUTING.md
CHANGED
|
@@ -48,7 +48,7 @@ We want to fix all the issues as soon as possible, but before fixing a bug we ne
|
|
|
48
48
|
- version of NestJS-CLI used (`nest info`)
|
|
49
49
|
- and most importantly - a use-case that fails
|
|
50
50
|
|
|
51
|
-
Unfortunately, we are not able to investigate / fix bugs without a minimal reproduction, so if we don't hear back from you we are going to close an issue that
|
|
51
|
+
Unfortunately, we are not able to investigate / fix bugs without a minimal reproduction, so if we don't hear back from you we are going to close an issue that doesn't have enough info to be reproduced.
|
|
52
52
|
|
|
53
53
|
You can file new issues by filling out our [new issue form](https://github.com/nestjs/nest/issues/new).
|
|
54
54
|
|
|
@@ -149,7 +149,7 @@ format that includes a **type**, a **scope** and a **subject**:
|
|
|
149
149
|
|
|
150
150
|
The **header** is mandatory and the **scope** of the header is optional.
|
|
151
151
|
|
|
152
|
-
Any line of the commit message cannot be longer 100 characters! This allows the message to be easier
|
|
152
|
+
Any line of the commit message cannot be longer than 100 characters! This allows the message to be easier
|
|
153
153
|
to read on GitHub as well as in various git tools.
|
|
154
154
|
|
|
155
155
|
Footer should contain a [closing reference to an issue](https://help.github.com/articles/closing-issues-via-commit-messages/) if any.
|
package/LICENSE
CHANGED
|
@@ -62,7 +62,7 @@ class GenerateCommand extends abstract_command_1.AbstractCommand {
|
|
|
62
62
|
}
|
|
63
63
|
buildDescription() {
|
|
64
64
|
return ('Generate a Nest element.\n' +
|
|
65
|
-
|
|
65
|
+
` Schematics available on ${chalk.bold('@nestjs/schematics')} collection:\n` +
|
|
66
66
|
this.buildSchematicsListAsTable());
|
|
67
67
|
}
|
|
68
68
|
buildSchematicsListAsTable() {
|
|
@@ -15,7 +15,9 @@ const webpackDefaultsFactory = (sourceRoot, relativeSourceRoot, entryFilename, i
|
|
|
15
15
|
output: {
|
|
16
16
|
filename: path_1.join(relativeSourceRoot, `${entryFilename}.js`),
|
|
17
17
|
},
|
|
18
|
+
ignoreWarnings: [/^(?!CriticalDependenciesWarning$)/],
|
|
18
19
|
externals: [nodeExternals()],
|
|
20
|
+
externalsPresets: { node: true },
|
|
19
21
|
module: {
|
|
20
22
|
rules: [
|
|
21
23
|
{
|
|
@@ -59,7 +59,7 @@ function askForProjectName(promptQuestion, projects) {
|
|
|
59
59
|
}
|
|
60
60
|
exports.askForProjectName = askForProjectName;
|
|
61
61
|
function moveDefaultProjectToStart(configuration, defaultProjectName, defaultLabel) {
|
|
62
|
-
let projects = Object.keys(configuration.projects);
|
|
62
|
+
let projects = configuration.projects != null ? Object.keys(configuration.projects) : [];
|
|
63
63
|
if (configuration.sourceRoot !== 'src') {
|
|
64
64
|
projects = projects.filter((p) => p !== defaultProjectName.replace(defaultLabel, ''));
|
|
65
65
|
}
|
package/lib/utils/tree-kill.js
CHANGED
|
@@ -23,7 +23,7 @@ function getAllPid() {
|
|
|
23
23
|
.slice(1);
|
|
24
24
|
return rows
|
|
25
25
|
.map(function (row) {
|
|
26
|
-
|
|
26
|
+
const parts = row.match(/\s*(\d+)\s*(\d+)/);
|
|
27
27
|
if (parts === null) {
|
|
28
28
|
return null;
|
|
29
29
|
}
|
|
@@ -38,8 +38,8 @@ function getAllPid() {
|
|
|
38
38
|
}
|
|
39
39
|
function getAllChilds(pid) {
|
|
40
40
|
const allpid = getAllPid();
|
|
41
|
-
|
|
42
|
-
|
|
41
|
+
const ppidHash = {};
|
|
42
|
+
const result = [];
|
|
43
43
|
allpid.forEach(function (item) {
|
|
44
44
|
ppidHash[item.ppid] = ppidHash[item.ppid] || [];
|
|
45
45
|
ppidHash[item.ppid].push(item.pid);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nestjs/cli",
|
|
3
|
-
"version": "8.1.
|
|
3
|
+
"version": "8.1.8",
|
|
4
4
|
"description": "Nest - modern, fast, powerful node.js web framework (@cli)",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -43,57 +43,57 @@
|
|
|
43
43
|
},
|
|
44
44
|
"homepage": "https://github.com/nestjs/nest-cli#readme",
|
|
45
45
|
"dependencies": {
|
|
46
|
-
"@angular-devkit/core": "
|
|
47
|
-
"@angular-devkit/schematics": "
|
|
48
|
-
"@angular-devkit/schematics-cli": "
|
|
46
|
+
"@angular-devkit/core": "13.1.2",
|
|
47
|
+
"@angular-devkit/schematics": "13.1.2",
|
|
48
|
+
"@angular-devkit/schematics-cli": "13.1.2",
|
|
49
49
|
"@nestjs/schematics": "^8.0.3",
|
|
50
50
|
"chalk": "3.0.0",
|
|
51
51
|
"chokidar": "3.5.2",
|
|
52
|
-
"cli-table3": "0.6.
|
|
52
|
+
"cli-table3": "0.6.1",
|
|
53
53
|
"commander": "4.1.1",
|
|
54
|
-
"fork-ts-checker-webpack-plugin": "6.
|
|
54
|
+
"fork-ts-checker-webpack-plugin": "6.5.0",
|
|
55
55
|
"inquirer": "7.3.3",
|
|
56
56
|
"node-emoji": "1.11.0",
|
|
57
57
|
"ora": "5.4.1",
|
|
58
58
|
"os-name": "4.0.1",
|
|
59
59
|
"rimraf": "3.0.2",
|
|
60
|
-
"shelljs": "0.8.
|
|
61
|
-
"source-map-support": "0.5.
|
|
60
|
+
"shelljs": "0.8.5",
|
|
61
|
+
"source-map-support": "0.5.21",
|
|
62
62
|
"tree-kill": "1.2.2",
|
|
63
|
-
"tsconfig-paths": "3.
|
|
64
|
-
"tsconfig-paths-webpack-plugin": "3.5.
|
|
63
|
+
"tsconfig-paths": "3.12.0",
|
|
64
|
+
"tsconfig-paths-webpack-plugin": "3.5.2",
|
|
65
65
|
"typescript": "4.3.5",
|
|
66
|
-
"webpack": "5.
|
|
66
|
+
"webpack": "5.65.0",
|
|
67
67
|
"webpack-node-externals": "3.0.0"
|
|
68
68
|
},
|
|
69
69
|
"devDependencies": {
|
|
70
|
-
"@commitlint/cli": "
|
|
71
|
-
"@commitlint/config-angular": "
|
|
70
|
+
"@commitlint/cli": "16.0.2",
|
|
71
|
+
"@commitlint/config-angular": "16.0.0",
|
|
72
72
|
"@types/copyfiles": "2.4.1",
|
|
73
73
|
"@types/inquirer": "7.3.3",
|
|
74
|
-
"@types/jest": "27.0
|
|
75
|
-
"@types/node": "
|
|
74
|
+
"@types/jest": "27.4.0",
|
|
75
|
+
"@types/node": "16.11.19",
|
|
76
76
|
"@types/node-emoji": "1.8.1",
|
|
77
77
|
"@types/ora": "3.2.0",
|
|
78
78
|
"@types/os-name": "3.1.0",
|
|
79
79
|
"@types/rimraf": "3.0.2",
|
|
80
|
-
"@types/shelljs": "0.8.
|
|
80
|
+
"@types/shelljs": "0.8.10",
|
|
81
81
|
"@types/webpack-node-externals": "2.5.3",
|
|
82
|
-
"@typescript-eslint/eslint-plugin": "5.
|
|
83
|
-
"@typescript-eslint/parser": "5.
|
|
82
|
+
"@typescript-eslint/eslint-plugin": "5.9.0",
|
|
83
|
+
"@typescript-eslint/parser": "5.9.0",
|
|
84
84
|
"delete-empty": "3.0.0",
|
|
85
|
-
"eslint": "8.0
|
|
85
|
+
"eslint": "8.6.0",
|
|
86
86
|
"eslint-config-prettier": "8.3.0",
|
|
87
|
-
"eslint-plugin-import": "2.25.
|
|
87
|
+
"eslint-plugin-import": "2.25.4",
|
|
88
88
|
"gulp": "4.0.2",
|
|
89
89
|
"gulp-clean": "0.4.0",
|
|
90
|
-
"husky": "7.0.
|
|
91
|
-
"jest": "27.
|
|
92
|
-
"prettier": "2.
|
|
93
|
-
"release-it": "14.
|
|
94
|
-
"ts-jest": "27.
|
|
90
|
+
"husky": "7.0.4",
|
|
91
|
+
"jest": "27.4.7",
|
|
92
|
+
"prettier": "2.5.1",
|
|
93
|
+
"release-it": "14.12.1",
|
|
94
|
+
"ts-jest": "27.1.2",
|
|
95
95
|
"ts-loader": "9.2.6",
|
|
96
|
-
"ts-node": "10.
|
|
96
|
+
"ts-node": "10.4.0"
|
|
97
97
|
},
|
|
98
98
|
"husky": {
|
|
99
99
|
"hooks": {
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
|
+
|
|
3
|
+
exports[`tsconfig paths hooks should remove unused imports 1`] = `
|
|
4
|
+
Map {
|
|
5
|
+
"dist/foo.js" => "\\"use strict\\";
|
|
6
|
+
Object.defineProperty(exports, \\"__esModule\\", { value: true });
|
|
7
|
+
exports.Foo = void 0;
|
|
8
|
+
class Foo {
|
|
9
|
+
}
|
|
10
|
+
exports.Foo = Foo;
|
|
11
|
+
",
|
|
12
|
+
"dist/bar.js" => "\\"use strict\\";
|
|
13
|
+
Object.defineProperty(exports, \\"__esModule\\", { value: true });
|
|
14
|
+
exports.Bar = void 0;
|
|
15
|
+
class Bar {
|
|
16
|
+
}
|
|
17
|
+
exports.Bar = Bar;
|
|
18
|
+
",
|
|
19
|
+
"dist/main.js" => "\\"use strict\\";
|
|
20
|
+
Object.defineProperty(exports, \\"__esModule\\", { value: true });
|
|
21
|
+
",
|
|
22
|
+
}
|
|
23
|
+
`;
|