@nestjs/cli 6.14.1 → 6.14.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.
@@ -0,0 +1,28 @@
1
+ {
2
+ "extends": ["@commitlint/config-angular"],
3
+ "rules": {
4
+ "subject-case": [
5
+ 2,
6
+ "always",
7
+ ["sentence-case", "start-case", "pascal-case", "upper-case", "lower-case"]
8
+ ],
9
+ "type-enum": [
10
+ 2,
11
+ "always",
12
+ [
13
+ "build",
14
+ "chore",
15
+ "ci",
16
+ "docs",
17
+ "feat",
18
+ "fix",
19
+ "perf",
20
+ "refactor",
21
+ "revert",
22
+ "style",
23
+ "test",
24
+ "sample"
25
+ ]
26
+ ]
27
+ }
28
+ }
package/.eslintignore ADDED
@@ -0,0 +1,3 @@
1
+ src/**/*.test.ts
2
+ src/**/files/**
3
+ test/**
package/.eslintrc.js ADDED
@@ -0,0 +1,26 @@
1
+ module.exports = {
2
+ parser: '@typescript-eslint/parser',
3
+ parserOptions: {
4
+ project: 'tsconfig.json',
5
+ sourceType: 'module',
6
+ },
7
+ plugins: ['@typescript-eslint/eslint-plugin'],
8
+ extends: [
9
+ 'plugin:@typescript-eslint/eslint-recommended',
10
+ 'plugin:@typescript-eslint/recommended',
11
+ 'prettier',
12
+ 'prettier/@typescript-eslint',
13
+ ],
14
+ root: true,
15
+ env: {
16
+ node: true,
17
+ jest: true,
18
+ },
19
+ rules: {
20
+ '@typescript-eslint/interface-name-prefix': 'off',
21
+ '@typescript-eslint/explicit-function-return-type': 'off',
22
+ '@typescript-eslint/no-explicit-any': 'off',
23
+ '@typescript-eslint/no-use-before-define': 'off',
24
+ '@typescript-eslint/no-non-null-assertion': 'off',
25
+ },
26
+ };
@@ -0,0 +1,8 @@
1
+ {
2
+ "git": {
3
+ "commitMessage": "chore(): release v${version}"
4
+ },
5
+ "github": {
6
+ "release": true
7
+ }
8
+ }
@@ -53,7 +53,7 @@ class StartAction extends build_action_1.BuildAction {
53
53
  const sourceRoot = get_value_or_default_1.getValueOrDefault(configuration, 'sourceRoot', appName);
54
54
  const entryFile = get_value_or_default_1.getValueOrDefault(configuration, 'entryFile', appName);
55
55
  let childProcessRef;
56
- process.on('exit', code => childProcessRef && killProcess(childProcessRef.pid));
56
+ process.on('exit', () => childProcessRef && killProcess(childProcessRef.pid));
57
57
  return () => {
58
58
  if (childProcessRef) {
59
59
  childProcessRef.removeAllListeners('exit');
@@ -19,7 +19,7 @@ class GenerateCommand extends abstract_command_1.AbstractCommand {
19
19
  .command('generate <schematic> [name] [path]')
20
20
  .alias('g')
21
21
  .description(this.buildDescription())
22
- .option('--dry-run', 'Report actions that would be taken without writing out results.')
22
+ .option('-d, --dry-run', 'Report actions that would be taken without writing out results.')
23
23
  .option('-p, --project [project]', 'Project in which to generate files.')
24
24
  .option('--flat', 'Enforce flat structure of generated element.')
25
25
  .option('--spec', 'Enforce spec files generation.', () => {
@@ -36,7 +36,7 @@ class AssetsManager {
36
36
  flat: item.flat,
37
37
  };
38
38
  });
39
- const copyFiles = (item) => new Promise((resolve, reject) => copyfiles([item.glob, outDir], {
39
+ const copyFiles = (item) => new Promise((resolve, reject) => copyfiles([item.glob, item.outDir], {
40
40
  exclude: item.exclude,
41
41
  flat: item.flat,
42
42
  up: sourceRoot.split(path_1.sep).length,
@@ -8,6 +8,7 @@ function localBinExists() {
8
8
  }
9
9
  exports.localBinExists = localBinExists;
10
10
  function loadLocalBinCommandLoader() {
11
+ // eslint-disable-next-line @typescript-eslint/no-var-requires
11
12
  const commandsFile = require(path_1.posix.join(...localBinPathSegments, 'commands'));
12
13
  return commandsFile.CommandLoader;
13
14
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nestjs/cli",
3
- "version": "6.14.1",
3
+ "version": "6.14.2",
4
4
  "description": "Nest - modern, fast, powerful node.js web framework (@cli)",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -16,14 +16,16 @@
16
16
  "build": "tsc",
17
17
  "clean": "gulp clean:bundle",
18
18
  "format": "prettier --write \"**/*.ts\"",
19
- "lint": "tslint -p .",
19
+ "lint": "eslint '{lib,commands,actions}/**/*.ts' --fix",
20
20
  "start": "node bin/nest.js",
21
21
  "prepublish:next": "npm run build",
22
22
  "publish:next": "npm publish --access public --tag next",
23
23
  "prepublish:npm": "npm run build",
24
24
  "publish:npm": "npm publish --access public",
25
25
  "test": "jest --config test/jest-config.json",
26
- "test:dev": "npm run clean && jest --config test/jest-config.json --watchAll"
26
+ "test:dev": "npm run clean && jest --config test/jest-config.json --watchAll",
27
+ "prerelease": "npm run build",
28
+ "release": "release-it"
27
29
  },
28
30
  "repository": {
29
31
  "type": "git",
@@ -44,17 +46,17 @@
44
46
  "@angular-devkit/schematics": "7.3.8",
45
47
  "@angular-devkit/schematics-cli": "0.13.8",
46
48
  "@nestjs/schematics": "^6.8.2",
47
- "@types/webpack": "4.41.3",
49
+ "@types/webpack": "4.41.5",
48
50
  "chalk": "2.4.2",
49
51
  "cli-table3": "0.5.1",
50
- "commander": "4.1.0",
52
+ "commander": "4.1.1",
51
53
  "copyfiles": "2.2.0",
52
- "fork-ts-checker-webpack-plugin": "4.0.2",
53
- "inquirer": "7.0.3",
54
+ "fork-ts-checker-webpack-plugin": "4.0.3",
55
+ "inquirer": "7.0.4",
54
56
  "node-emoji": "1.10.0",
55
57
  "ora": "4.0.3",
56
58
  "os-name": "3.1.0",
57
- "rimraf": "3.0.0",
59
+ "rimraf": "3.0.1",
58
60
  "tree-kill": "1.2.2",
59
61
  "tsconfig-paths": "3.9.0",
60
62
  "tsconfig-paths-webpack-plugin": "3.2.0",
@@ -63,23 +65,36 @@
63
65
  "webpack-node-externals": "1.7.2"
64
66
  },
65
67
  "devDependencies": {
68
+ "@commitlint/cli": "8.3.5",
69
+ "@commitlint/config-angular": "8.3.4",
66
70
  "@types/copyfiles": "2.1.1",
67
71
  "@types/inquirer": "6.5.0",
68
- "@types/jest": "24.9.1",
72
+ "@types/jest": "25.1.1",
69
73
  "@types/node": "12.12.21",
70
74
  "@types/node-emoji": "1.8.1",
71
75
  "@types/ora": "3.1.0",
72
76
  "@types/os-name": "2.0.0",
73
77
  "@types/rimraf": "2.0.3",
74
- "@types/webpack-node-externals": "1.7.0",
78
+ "@types/webpack-node-externals": "1.7.1",
79
+ "@typescript-eslint/eslint-plugin": "^2.19.0",
80
+ "@typescript-eslint/parser": "^2.19.0",
75
81
  "delete-empty": "3.0.0",
82
+ "eslint": "6.8.0",
83
+ "eslint-config-prettier": "6.10.0",
84
+ "eslint-plugin-import": "2.20.1",
76
85
  "gulp": "4.0.2",
77
86
  "gulp-clean": "0.4.0",
87
+ "husky": "4.2.1",
78
88
  "jest": "25.1.0",
79
89
  "prettier": "1.19.1",
80
- "ts-jest": "25.0.0",
90
+ "release-it": "12.4.3",
91
+ "ts-jest": "25.2.0",
81
92
  "ts-loader": "6.2.1",
82
- "ts-node": "8.6.2",
83
- "tslint": "5.20.1"
93
+ "ts-node": "8.6.2"
94
+ },
95
+ "husky": {
96
+ "hooks": {
97
+ "commit-msg": "commitlint -c .commitlintrc.json -E HUSKY_GIT_PARAMS"
98
+ }
84
99
  }
85
100
  }