@nx/express 23.2.0-beta.1 → 23.2.0-beta.10

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.
@@ -89,6 +89,9 @@ async function normalizeOptions(host, options) {
89
89
  const useProjectJson = options.useProjectJson ?? !(0, internal_2.isUsingTsSolutionSetup)(host);
90
90
  return {
91
91
  ...options,
92
+ // Resolved after the spread so the type guarantees it downstream; this
93
+ // generator forwards its options straight into `@nx/node:application`.
94
+ linter: await (0, internal_2.normalizeLinterOption)(host, options.linter),
92
95
  appProjectName,
93
96
  appProjectRoot,
94
97
  useProjectJson,
@@ -1,19 +1,25 @@
1
- import type { Linter, LinterType } from '@nx/eslint';
2
- import type { UnitTestRunner } from '../../utils/test-runners';
1
+ // `LinterType` comes from `@nx/js`, which this package declares; `@nx/eslint`
2
+ // is not a dependency here, so importing it would resolve to a published
3
+ // tarball rather than workspace source.
4
+ import type { LinterType } from '@nx/js';
3
5
 
4
6
  export interface Schema {
5
7
  directory: string;
6
8
  name?: string;
7
9
  skipFormat: boolean;
8
10
  skipPackageJson: boolean;
9
- unitTestRunner: UnitTestRunner;
11
+ unitTestRunner: 'jest' | 'vitest' | 'none';
10
12
  tags?: string;
11
- linter: Linter | LinterType;
13
+ linter?: LinterType;
12
14
  frontendProject?: string;
13
15
  swcJest?: boolean;
14
16
  /** @deprecated use `swcJest` instead */
15
17
  babelJest?: boolean;
16
18
  js: boolean;
19
+ enableTypedLinting?: boolean;
20
+ /**
21
+ * @deprecated Use `enableTypedLinting` instead. This option will be removed in Nx v24.
22
+ */
17
23
  setParserOptionsProject?: boolean;
18
24
  addPlugin?: boolean;
19
25
  useProjectJson?: boolean;
@@ -31,16 +31,14 @@
31
31
  "description": "Do not add dependencies to `package.json`."
32
32
  },
33
33
  "linter": {
34
- "description": "The tool to use for running lint checks.",
34
+ "description": "The tool to use for running lint checks. Defaults to the linter the workspace already uses.",
35
35
  "type": "string",
36
- "enum": ["eslint", "none"],
37
- "default": "none",
38
- "x-prompt": "Which linter would you like to use?",
36
+ "enum": ["eslint", "oxlint", "none"],
39
37
  "x-priority": "important"
40
38
  },
41
39
  "unitTestRunner": {
42
40
  "type": "string",
43
- "enum": ["jest", "none"],
41
+ "enum": ["jest", "vitest", "none"],
44
42
  "description": "Test runner to use for unit tests.",
45
43
  "default": "none",
46
44
  "x-prompt": "Which unit test runner would you like to use?"
@@ -69,11 +67,17 @@
69
67
  "description": "Generate JavaScript files rather than TypeScript files.",
70
68
  "default": false
71
69
  },
72
- "setParserOptionsProject": {
70
+ "enableTypedLinting": {
73
71
  "type": "boolean",
74
- "description": "Whether or not to configure the ESLint `parserOptions.project` option. We do not do this by default for lint performance reasons.",
72
+ "description": "Whether to enable typed linting. For flat configs, this configures the recommended `parserOptions.projectService` and `tsconfigRootDir`. For legacy `.eslintrc` configs, this configures `parserOptions.project`. We do not enable this by default for lint performance reasons.",
75
73
  "default": false
76
74
  },
75
+ "setParserOptionsProject": {
76
+ "type": "boolean",
77
+ "description": "Deprecated alias for `enableTypedLinting`.",
78
+ "default": false,
79
+ "x-deprecated": "Use `enableTypedLinting` instead. This option will be removed in Nx v24."
80
+ },
77
81
  "useProjectJson": {
78
82
  "type": "boolean",
79
83
  "description": "Use a `project.json` configuration file instead of inlining the Nx configuration in the `package.json` file."
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nx/express",
3
- "version": "23.2.0-beta.1",
3
+ "version": "23.2.0-beta.10",
4
4
  "private": false,
5
5
  "description": "The Nx Plugin for Express contains executors and generators for allowing your workspace to create powerful Express Node applications and APIs.",
6
6
  "repository": {
@@ -41,9 +41,9 @@
41
41
  "dependencies": {
42
42
  "semver": "^7.6.3",
43
43
  "tslib": "^2.3.0",
44
- "@nx/devkit": "23.2.0-beta.1",
45
- "@nx/js": "23.2.0-beta.1",
46
- "@nx/node": "23.2.0-beta.1"
44
+ "@nx/devkit": "23.2.0-beta.10",
45
+ "@nx/js": "23.2.0-beta.10",
46
+ "@nx/node": "23.2.0-beta.10"
47
47
  },
48
48
  "peerDependencies": {
49
49
  "express": ">=4.0.0 <6.0.0"