@nx/plugin 20.3.0-rc.0 → 20.3.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/plugin",
3
- "version": "20.3.0-rc.0",
3
+ "version": "20.3.0",
4
4
  "private": false,
5
5
  "description": "This plugin is used to create Nx plugins! It contains generators for generating common plugin features like generators, executors, migrations and more.",
6
6
  "repository": {
@@ -28,10 +28,10 @@
28
28
  },
29
29
  "dependencies": {
30
30
  "tslib": "^2.3.0",
31
- "@nx/devkit": "20.3.0-rc.0",
32
- "@nx/jest": "20.3.0-rc.0",
33
- "@nx/js": "20.3.0-rc.0",
34
- "@nx/eslint": "20.3.0-rc.0"
31
+ "@nx/devkit": "20.3.0",
32
+ "@nx/jest": "20.3.0",
33
+ "@nx/js": "20.3.0",
34
+ "@nx/eslint": "20.3.0"
35
35
  },
36
36
  "publishConfig": {
37
37
  "access": "public"
@@ -8,7 +8,7 @@ export interface CreatePackageSchema {
8
8
  // options to create cli package, passed to js library generator
9
9
  skipFormat?: boolean;
10
10
  tags?: string;
11
- unitTestRunner?: 'jest' | 'none';
11
+ unitTestRunner?: 'jest' | 'vitest' | 'none';
12
12
  linter?: Linter | LinterType;
13
13
  compiler?: 'swc' | 'tsc';
14
14
 
@@ -33,7 +33,7 @@
33
33
  },
34
34
  "unitTestRunner": {
35
35
  "type": "string",
36
- "enum": ["none", "jest"],
36
+ "enum": ["none", "jest", "vitest"],
37
37
  "description": "Test runner to use for unit tests."
38
38
  },
39
39
  "linter": {
@@ -5,7 +5,7 @@ export interface NormalizedSchema extends CreatePackageSchema {
5
5
  bundler: 'swc' | 'tsc';
6
6
  projectName: string;
7
7
  projectRoot: string;
8
- unitTestRunner: 'jest' | 'none';
8
+ unitTestRunner: 'jest' | 'vitest' | 'none';
9
9
  linter: LinterType;
10
10
  useProjectJson: boolean;
11
11
  addPlugin: boolean;
@@ -2,7 +2,7 @@ export interface Schema {
2
2
  path: string;
3
3
  name?: string;
4
4
  description?: string;
5
- unitTestRunner: 'jest' | 'none';
5
+ unitTestRunner: 'jest' | 'vitest' | 'none';
6
6
  includeHasher: boolean;
7
7
  skipLintChecks?: boolean;
8
8
  skipFormat?: boolean;
@@ -28,7 +28,7 @@
28
28
  },
29
29
  "unitTestRunner": {
30
30
  "type": "string",
31
- "enum": ["jest", "none"],
31
+ "enum": ["jest", "vitest", "none"],
32
32
  "description": "Test runner to use for unit tests.",
33
33
  "default": "jest"
34
34
  },
@@ -2,7 +2,7 @@ export interface Schema {
2
2
  path: string;
3
3
  name?: string;
4
4
  description?: string;
5
- unitTestRunner: 'jest' | 'none';
5
+ unitTestRunner: 'jest' | 'vitest' | 'none';
6
6
  skipLintChecks?: boolean;
7
7
  skipFormat?: boolean;
8
8
  }
@@ -41,7 +41,7 @@
41
41
  },
42
42
  "unitTestRunner": {
43
43
  "type": "string",
44
- "enum": ["jest", "none"],
44
+ "enum": ["jest", "vitest", "none"],
45
45
  "description": "Test runner to use for unit tests.",
46
46
  "default": "jest"
47
47
  },
@@ -72,7 +72,7 @@ async function pluginGeneratorInternal(host, schema) {
72
72
  tasks.push((0, devkit_1.addDependenciesToPackageJson)(host, {
73
73
  '@nx/devkit': nxVersion,
74
74
  }, {
75
- '@nx/jest': nxVersion,
75
+ [options.unitTestRunner === 'vitest' ? '@nx/vite' : '@nx/jest']: nxVersion,
76
76
  '@nx/js': nxVersion,
77
77
  '@nx/plugin': nxVersion,
78
78
  }));
@@ -9,7 +9,7 @@ export interface Schema {
9
9
  skipLintChecks?: boolean; // default is false
10
10
  e2eTestRunner?: 'jest' | 'none';
11
11
  tags?: string;
12
- unitTestRunner?: 'jest' | 'none';
12
+ unitTestRunner?: 'jest' | 'vitest' | 'none';
13
13
  linter?: Linter | LinterType;
14
14
  setParserOptionsProject?: boolean;
15
15
  compiler?: 'swc' | 'tsc';
@@ -40,7 +40,7 @@
40
40
  "unitTestRunner": {
41
41
  "description": "Test runner to use for unit tests.",
42
42
  "type": "string",
43
- "enum": ["none", "jest"],
43
+ "enum": ["none", "jest", "vitest"],
44
44
  "x-priority": "important"
45
45
  },
46
46
  "tags": {
@@ -10,7 +10,7 @@ export interface NormalizedSchema extends Schema {
10
10
  npmPackageName: string;
11
11
  bundler: 'swc' | 'tsc';
12
12
  publishable: boolean;
13
- unitTestRunner: 'jest' | 'none';
13
+ unitTestRunner: 'jest' | 'vitest' | 'none';
14
14
  linter: LinterType;
15
15
  useProjectJson: boolean;
16
16
  addPlugin: boolean;
@@ -7,7 +7,7 @@ const generator_prompts_1 = require("@nx/js/src/utils/generator-prompts");
7
7
  const ts_solution_setup_1 = require("@nx/js/src/utils/typescript/ts-solution-setup");
8
8
  async function normalizeOptions(host, options) {
9
9
  const linter = await (0, generator_prompts_1.normalizeLinterOption)(host, options.linter);
10
- const unitTestRunner = await (0, generator_prompts_1.normalizeUnitTestRunnerOption)(host, options.unitTestRunner, ['jest']);
10
+ const unitTestRunner = await (0, generator_prompts_1.normalizeUnitTestRunnerOption)(host, options.unitTestRunner, ['jest', 'vitest']);
11
11
  const isTsSolutionSetup = (0, ts_solution_setup_1.isUsingTsSolutionSetup)(host);
12
12
  const nxJson = (0, devkit_1.readNxJson)(host);
13
13
  const addPlugin = options.addPlugin ??