@nx/nest 20.5.0 → 20.6.0-beta.0

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nx/nest",
3
- "version": "20.5.0",
3
+ "version": "20.6.0-beta.0",
4
4
  "private": false,
5
5
  "description": "The Nx Plugin for Nest contains executors and generators for allowing your workspace to create powerful Nest best in class APIs.",
6
6
  "repository": {
@@ -32,10 +32,10 @@
32
32
  },
33
33
  "dependencies": {
34
34
  "@nestjs/schematics": "^9.1.0",
35
- "@nx/devkit": "20.5.0",
36
- "@nx/js": "20.5.0",
37
- "@nx/eslint": "20.5.0",
38
- "@nx/node": "20.5.0",
35
+ "@nx/devkit": "20.6.0-beta.0",
36
+ "@nx/js": "20.6.0-beta.0",
37
+ "@nx/eslint": "20.6.0-beta.0",
38
+ "@nx/node": "20.6.0-beta.0",
39
39
  "tslib": "^2.3.0"
40
40
  },
41
41
  "publishConfig": {
@@ -10,6 +10,7 @@ const ensure_dependencies_1 = require("../../utils/ensure-dependencies");
10
10
  async function applicationGenerator(tree, rawOptions) {
11
11
  return await applicationGeneratorInternal(tree, {
12
12
  addPlugin: false,
13
+ useProjectJson: true,
13
14
  ...rawOptions,
14
15
  });
15
16
  }
@@ -5,6 +5,7 @@ exports.toNodeApplicationGeneratorOptions = toNodeApplicationGeneratorOptions;
5
5
  const devkit_1 = require("@nx/devkit");
6
6
  const project_name_and_root_utils_1 = require("@nx/devkit/src/generators/project-name-and-root-utils");
7
7
  const eslint_1 = require("@nx/eslint");
8
+ const ts_solution_setup_1 = require("@nx/js/src/utils/typescript/ts-solution-setup");
8
9
  async function normalizeOptions(tree, options) {
9
10
  await (0, project_name_and_root_utils_1.ensureRootProjectName)(options, 'application');
10
11
  const { projectName: appProjectName, projectRoot: appProjectRoot } = await (0, project_name_and_root_utils_1.determineProjectNameAndRootOptions)(tree, {
@@ -26,6 +27,7 @@ async function normalizeOptions(tree, options) {
26
27
  linter: options.linter ?? eslint_1.Linter.EsLint,
27
28
  unitTestRunner: options.unitTestRunner ?? 'jest',
28
29
  e2eTestRunner: options.e2eTestRunner ?? 'jest',
30
+ useProjectJson: options.useProjectJson ?? !(0, ts_solution_setup_1.isUsingTsSolutionSetup)(tree),
29
31
  };
30
32
  }
31
33
  function toNodeApplicationGeneratorOptions(options) {
@@ -45,5 +47,6 @@ function toNodeApplicationGeneratorOptions(options) {
45
47
  bundler: 'webpack', // Some features require webpack plugins such as TS transformers
46
48
  isNest: true,
47
49
  addPlugin: options.addPlugin,
50
+ useProjectJson: options.useProjectJson,
48
51
  };
49
52
  }
@@ -16,6 +16,7 @@ export interface ApplicationGeneratorOptions {
16
16
  strict?: boolean;
17
17
  addPlugin?: boolean;
18
18
  useTsSolution?: boolean;
19
+ useProjectJson?: boolean;
19
20
  }
20
21
 
21
22
  interface NormalizedOptions extends ApplicationGeneratorOptions {
@@ -78,6 +78,10 @@
78
78
  "type": "boolean",
79
79
  "description": "Adds strictNullChecks, noImplicitAny, strictBindCallApply, forceConsistentCasingInFileNames and noFallthroughCasesInSwitch to tsconfig.",
80
80
  "default": false
81
+ },
82
+ "useProjectJson": {
83
+ "type": "boolean",
84
+ "description": "Use a `project.json` configuration file instead of inlining the Nx configuration in the `package.json` file."
81
85
  }
82
86
  },
83
87
  "additionalProperties": false,
@@ -43,6 +43,7 @@ async function normalizeOptions(tree, options) {
43
43
  testEnvironment: options.testEnvironment ?? 'node',
44
44
  unitTestRunner: options.unitTestRunner ?? 'jest',
45
45
  isUsingTsSolutionsConfig,
46
+ useProjectJson: options.useProjectJson ?? !isUsingTsSolutionsConfig,
46
47
  };
47
48
  return normalized;
48
49
  }
@@ -63,6 +64,6 @@ function toJsLibraryGeneratorOptions(options) {
63
64
  unitTestRunner: options.unitTestRunner,
64
65
  setParserOptionsProject: options.setParserOptionsProject,
65
66
  addPlugin: options.addPlugin,
66
- useProjectJson: !options.isUsingTsSolutionsConfig,
67
+ useProjectJson: options.useProjectJson,
67
68
  };
68
69
  }
@@ -11,6 +11,7 @@ const lib_1 = require("./lib");
11
11
  async function libraryGenerator(tree, rawOptions) {
12
12
  return await libraryGeneratorInternal(tree, {
13
13
  addPlugin: false,
14
+ useProjectJson: true,
14
15
  ...rawOptions,
15
16
  });
16
17
  }
@@ -33,6 +33,7 @@ export interface LibraryGeneratorOptions {
33
33
  simpleName?: boolean;
34
34
  addPlugin?: boolean;
35
35
  isUsingTsSolutionsConfig?: boolean;
36
+ useProjectJson?: boolean;
36
37
  }
37
38
 
38
39
  export interface NormalizedOptions extends LibraryGeneratorOptions {
@@ -133,6 +133,10 @@
133
133
  "description": "Don't include the directory in the name of the module of the library.",
134
134
  "type": "boolean",
135
135
  "default": false
136
+ },
137
+ "useProjectJson": {
138
+ "type": "boolean",
139
+ "description": "Use a `project.json` configuration file instead of inlining the Nx configuration in the `package.json` file."
136
140
  }
137
141
  },
138
142
  "additionalProperties": false,