@nx/nuxt 23.2.0-beta.6 → 23.2.0-beta.7
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/dist/src/generators/application/application.js +1 -1
- package/dist/src/generators/application/lib/normalize-options.js +5 -2
- package/dist/src/generators/application/schema.d.ts +4 -2
- package/dist/src/generators/application/schema.json +2 -4
- package/dist/src/generators/storybook-configuration/schema.d.ts +2 -2
- package/dist/src/generators/storybook-configuration/schema.json +1 -2
- package/dist/src/utils/add-linting.d.ts +2 -2
- package/dist/src/utils/add-linting.js +13 -12
- package/package.json +10 -10
|
@@ -120,7 +120,7 @@ async function applicationGeneratorInternal(tree, schema) {
|
|
|
120
120
|
tasks.push(await (0, add_linting_1.addLinting)(tree, {
|
|
121
121
|
projectName: options.projectName,
|
|
122
122
|
projectRoot: options.appProjectRoot,
|
|
123
|
-
linter: options.linter
|
|
123
|
+
linter: options.linter,
|
|
124
124
|
unitTestRunner: options.unitTestRunner,
|
|
125
125
|
rootProject: options.rootProject,
|
|
126
126
|
enableTypedLinting: (0, internal_2.isTypedLintingEnabled)(options),
|
|
@@ -39,8 +39,11 @@ async function normalizeOptions(host, options) {
|
|
|
39
39
|
useProjectJson: options.useProjectJson ?? !isUsingTsSolutionConfig,
|
|
40
40
|
useAppDir,
|
|
41
41
|
nuxtMajorVersion,
|
|
42
|
+
unitTestRunner: options.unitTestRunner ?? 'vitest',
|
|
43
|
+
e2eTestRunner: options.e2eTestRunner ?? 'playwright',
|
|
44
|
+
// Resolved here rather than at the `addLinting` call, so every later reader
|
|
45
|
+
// in this generator sees the same value.
|
|
46
|
+
linter: await (0, internal_2.normalizeLinterOption)(host, options.linter),
|
|
42
47
|
};
|
|
43
|
-
normalized.unitTestRunner ??= 'vitest';
|
|
44
|
-
normalized.e2eTestRunner = normalized.e2eTestRunner ?? 'playwright';
|
|
45
48
|
return normalized;
|
|
46
49
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { LinterType } from '@nx/js';
|
|
2
2
|
|
|
3
3
|
export interface Schema {
|
|
4
4
|
directory: string;
|
|
5
5
|
name?: string;
|
|
6
|
-
linter?:
|
|
6
|
+
linter?: LinterType;
|
|
7
7
|
formatter?: 'none' | 'prettier';
|
|
8
8
|
skipFormat?: boolean;
|
|
9
9
|
unitTestRunner?: 'vitest' | 'none';
|
|
@@ -25,6 +25,8 @@ export interface Schema {
|
|
|
25
25
|
}
|
|
26
26
|
|
|
27
27
|
export interface NormalizedSchema extends Omit<Schema, 'useTsSolution'> {
|
|
28
|
+
// `normalizeOptions` always resolves this, so it is no longer optional.
|
|
29
|
+
linter: LinterType;
|
|
28
30
|
projectName: string;
|
|
29
31
|
appProjectRoot: string;
|
|
30
32
|
importPath: string;
|
|
@@ -29,11 +29,9 @@
|
|
|
29
29
|
"x-priority": "internal"
|
|
30
30
|
},
|
|
31
31
|
"linter": {
|
|
32
|
-
"description": "The tool to use for running lint checks.",
|
|
32
|
+
"description": "The tool to use for running lint checks. Defaults to the linter the workspace already uses.",
|
|
33
33
|
"type": "string",
|
|
34
|
-
"enum": ["eslint", "none"],
|
|
35
|
-
"default": "none",
|
|
36
|
-
"x-prompt": "Which linter would you like to use?",
|
|
34
|
+
"enum": ["eslint", "oxlint", "none"],
|
|
37
35
|
"x-priority": "important"
|
|
38
36
|
},
|
|
39
37
|
"unitTestRunner": {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { LinterType } from '@nx/js';
|
|
2
2
|
|
|
3
3
|
export interface Schema {
|
|
4
4
|
project: string;
|
|
@@ -6,7 +6,7 @@ export interface Schema {
|
|
|
6
6
|
generateStories?: boolean;
|
|
7
7
|
js?: boolean;
|
|
8
8
|
tsConfiguration?: boolean;
|
|
9
|
-
linter?:
|
|
9
|
+
linter?: LinterType;
|
|
10
10
|
ignorePaths?: string[];
|
|
11
11
|
configureStaticServe?: boolean;
|
|
12
12
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { LinterType } from '@nx/js';
|
|
2
2
|
import { GeneratorCallback, Tree } from '@nx/devkit';
|
|
3
3
|
export declare function addLinting(host: Tree, options: {
|
|
4
|
-
linter:
|
|
4
|
+
linter: LinterType;
|
|
5
5
|
projectName: string;
|
|
6
6
|
projectRoot: string;
|
|
7
7
|
unitTestRunner?: 'vitest' | 'none';
|
|
@@ -1,25 +1,26 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.addLinting = addLinting;
|
|
4
|
-
const eslint_1 = require("@nx/eslint");
|
|
5
4
|
const devkit_1 = require("@nx/devkit");
|
|
6
5
|
const internal_1 = require("@nx/eslint/internal");
|
|
7
6
|
const versions_1 = require("./versions");
|
|
7
|
+
const internal_2 = require("@nx/js/internal");
|
|
8
8
|
async function addLinting(host, options) {
|
|
9
9
|
const tasks = [];
|
|
10
|
+
tasks.push(await (0, internal_2.addLintingToProject)(host, {
|
|
11
|
+
oxlintPlugins: ['vue'],
|
|
12
|
+
linter: options.linter,
|
|
13
|
+
project: options.projectName,
|
|
14
|
+
tsConfigPaths: [(0, devkit_1.joinPathFragments)(options.projectRoot, 'tsconfig.json')],
|
|
15
|
+
unitTestRunner: options.unitTestRunner,
|
|
16
|
+
rootProject: options.rootProject,
|
|
17
|
+
enableTypedLinting: (0, internal_1.isTypedLintingEnabled)(options),
|
|
18
|
+
addPlugin: true,
|
|
19
|
+
}));
|
|
20
|
+
// Everything below configures ESLint — predefined configs, `extends`, ignore
|
|
21
|
+
// entries — which have no equivalent in other linters.
|
|
10
22
|
if (options.linter === 'eslint') {
|
|
11
23
|
const enableTypedLinting = (0, internal_1.isTypedLintingEnabled)(options);
|
|
12
|
-
const lintTask = await (0, eslint_1.lintProjectGenerator)(host, {
|
|
13
|
-
linter: options.linter,
|
|
14
|
-
project: options.projectName,
|
|
15
|
-
tsConfigPaths: [(0, devkit_1.joinPathFragments)(options.projectRoot, 'tsconfig.json')],
|
|
16
|
-
unitTestRunner: options.unitTestRunner,
|
|
17
|
-
skipFormat: true,
|
|
18
|
-
rootProject: options.rootProject,
|
|
19
|
-
enableTypedLinting,
|
|
20
|
-
addPlugin: true,
|
|
21
|
-
});
|
|
22
|
-
tasks.push(lintTask);
|
|
23
24
|
const isFlatConfig = (0, internal_1.useFlatConfig)(host);
|
|
24
25
|
// Version-aware dependencies:
|
|
25
26
|
// - Flat config (v4+): use @nuxt/eslint-config ^1.10.0 with createConfigForNuxt
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nx/nuxt",
|
|
3
|
-
"version": "23.2.0-beta.
|
|
3
|
+
"version": "23.2.0-beta.7",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "The Nuxt plugin for Nx contains executors and generators for managing Nuxt applications and libraries within an Nx workspace. It provides:\n\n\n- Integration with libraries such as Vitest, Playwright, Cypress, and Storybook.\n\n- Generators for applications, libraries, and more.\n\n- Library build support for publishing packages to npm or other registries.\n\n- Utilities for automatic workspace refactoring.",
|
|
6
6
|
"repository": {
|
|
@@ -60,23 +60,23 @@
|
|
|
60
60
|
"dependencies": {
|
|
61
61
|
"tslib": "^2.3.0",
|
|
62
62
|
"semver": "^7.6.3",
|
|
63
|
-
"@nx/devkit": "23.2.0-beta.
|
|
64
|
-
"@nx/js": "23.2.0-beta.
|
|
65
|
-
"@nx/
|
|
66
|
-
"@nx/
|
|
67
|
-
"@nx/vue": "23.2.0-beta.
|
|
68
|
-
"@nx/vitest": "23.2.0-beta.
|
|
63
|
+
"@nx/devkit": "23.2.0-beta.7",
|
|
64
|
+
"@nx/js": "23.2.0-beta.7",
|
|
65
|
+
"@nx/vite": "23.2.0-beta.7",
|
|
66
|
+
"@nx/eslint": "23.2.0-beta.7",
|
|
67
|
+
"@nx/vue": "23.2.0-beta.7",
|
|
68
|
+
"@nx/vitest": "23.2.0-beta.7"
|
|
69
69
|
},
|
|
70
70
|
"devDependencies": {
|
|
71
71
|
"nuxt": "^3.21.10",
|
|
72
|
-
"nx": "23.2.0-beta.
|
|
72
|
+
"nx": "23.2.0-beta.7"
|
|
73
73
|
},
|
|
74
74
|
"peerDependencies": {
|
|
75
75
|
"nuxt": ">=3.0.0 <5.0.0",
|
|
76
76
|
"@nuxt/schema": "^3.0.0 || ^4.0.0",
|
|
77
77
|
"@nuxt/kit": "^3.0.0 || ^4.0.0",
|
|
78
|
-
"@nx/playwright": "23.2.0-beta.
|
|
79
|
-
"@nx/cypress": "23.2.0-beta.
|
|
78
|
+
"@nx/playwright": "23.2.0-beta.7",
|
|
79
|
+
"@nx/cypress": "23.2.0-beta.7"
|
|
80
80
|
},
|
|
81
81
|
"peerDependenciesMeta": {
|
|
82
82
|
"nuxt": {
|