@nx/nest 20.4.4 → 20.5.0-beta.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nx/nest",
3
- "version": "20.4.4",
3
+ "version": "20.5.0-beta.1",
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.4.4",
36
- "@nx/js": "20.4.4",
37
- "@nx/eslint": "20.4.4",
38
- "@nx/node": "20.4.4",
35
+ "@nx/devkit": "20.5.0-beta.1",
36
+ "@nx/js": "20.5.0-beta.1",
37
+ "@nx/eslint": "20.5.0-beta.1",
38
+ "@nx/node": "20.5.0-beta.1",
39
39
  "tslib": "^2.3.0"
40
40
  },
41
41
  "publishConfig": {
@@ -7,9 +7,7 @@ function deleteFiles(tree, options) {
7
7
  if (options.unitTestRunner !== 'none') {
8
8
  tree.delete((0, devkit_1.joinPathFragments)(options.projectRoot, 'src', 'lib', `${options.fileName}.spec.ts`));
9
9
  }
10
- if (!options.buildable &&
11
- !options.publishable &&
12
- !options.isUsingTsSolutionsConfig) {
10
+ if (!options.buildable && !options.publishable) {
13
11
  tree.delete((0, devkit_1.joinPathFragments)(options.projectRoot, 'package.json'));
14
12
  }
15
13
  }
@@ -2,4 +2,4 @@ import { Tree } from '@nx/devkit';
2
2
  import type { LibraryGeneratorSchema as JsLibraryGeneratorSchema } from '@nx/js/src/generators/library/schema';
3
3
  import type { LibraryGeneratorOptions, NormalizedOptions } from '../schema';
4
4
  export declare function normalizeOptions(tree: Tree, options: LibraryGeneratorOptions): Promise<NormalizedOptions>;
5
- export declare function toJsLibraryGeneratorOptions(options: NormalizedOptions): JsLibraryGeneratorSchema;
5
+ export declare function toJsLibraryGeneratorOptions(options: LibraryGeneratorOptions): JsLibraryGeneratorSchema;
@@ -26,7 +26,6 @@ async function normalizeOptions(tree, options) {
26
26
  const parsedTags = options.tags
27
27
  ? options.tags.split(',').map((s) => s.trim())
28
28
  : [];
29
- const isUsingTsSolutionsConfig = (0, ts_solution_setup_1.isUsingTsSolutionSetup)(tree);
30
29
  const normalized = {
31
30
  ...options,
32
31
  strict: options.strict ?? true,
@@ -36,7 +35,7 @@ async function normalizeOptions(tree, options) {
36
35
  linter: options.linter ?? eslint_1.Linter.EsLint,
37
36
  parsedTags,
38
37
  prefix: (0, get_npm_scope_1.getNpmScope)(tree), // we could also allow customizing this
39
- projectName: isUsingTsSolutionsConfig
38
+ projectName: (0, ts_solution_setup_1.isUsingTsSolutionSetup)(tree)
40
39
  ? (0, get_import_path_1.getImportPath)(tree, projectName)
41
40
  : projectName,
42
41
  projectRoot,
@@ -45,7 +44,6 @@ async function normalizeOptions(tree, options) {
45
44
  target: options.target ?? 'es6',
46
45
  testEnvironment: options.testEnvironment ?? 'node',
47
46
  unitTestRunner: options.unitTestRunner ?? 'jest',
48
- isUsingTsSolutionsConfig,
49
47
  };
50
48
  return normalized;
51
49
  }
@@ -64,8 +62,8 @@ function toJsLibraryGeneratorOptions(options) {
64
62
  tags: options.tags,
65
63
  testEnvironment: options.testEnvironment,
66
64
  unitTestRunner: options.unitTestRunner,
65
+ config: options.standaloneConfig ? 'project' : 'workspace',
67
66
  setParserOptionsProject: options.setParserOptionsProject,
68
67
  addPlugin: options.addPlugin,
69
- useProjectJson: !options.isUsingTsSolutionsConfig,
70
68
  };
71
69
  }
@@ -28,11 +28,11 @@ export interface LibraryGeneratorOptions {
28
28
  | 'es2021';
29
29
  testEnvironment?: 'jsdom' | 'node';
30
30
  unitTestRunner?: UnitTestRunner;
31
+ standaloneConfig?: boolean;
31
32
  setParserOptionsProject?: boolean;
32
33
  skipPackageJson?: boolean;
33
34
  simpleName?: boolean;
34
35
  addPlugin?: boolean;
35
- isUsingTsSolutionsConfig?: boolean;
36
36
  }
37
37
 
38
38
  export interface NormalizedOptions extends LibraryGeneratorOptions {
@@ -118,6 +118,12 @@
118
118
  "type": "boolean",
119
119
  "default": true
120
120
  },
121
+ "standaloneConfig": {
122
+ "description": "Split the project configuration into <projectRoot>/project.json rather than including it inside workspace.json",
123
+ "type": "boolean",
124
+ "default": true,
125
+ "x-deprecated": "Nx only supports standaloneConfig"
126
+ },
121
127
  "setParserOptionsProject": {
122
128
  "type": "boolean",
123
129
  "description": "Whether or not to configure the ESLint \"parserOptions.project\" option. We do not do this by default for lint performance reasons.",