@nx/nuxt 23.2.0-beta.4 → 23.2.0-beta.6
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 +2 -3
- package/dist/src/generators/application/lib/add-vitest.js +5 -3
- package/dist/src/plugins/plugin.js +1 -2
- package/dist/src/utils/add-linting.d.ts +1 -2
- package/dist/src/utils/add-linting.js +2 -3
- package/dist/src/utils/version-utils.d.ts +1 -1
- package/package.json +11 -10
|
@@ -20,7 +20,6 @@ const assert_supported_nuxt_version_1 = require("../../utils/assert-supported-nu
|
|
|
20
20
|
const node_child_process_1 = require("node:child_process");
|
|
21
21
|
const node_fs_1 = require("node:fs");
|
|
22
22
|
const node_path_1 = require("node:path");
|
|
23
|
-
const onboarding_1 = require("nx/src/nx-cloud/utilities/onboarding");
|
|
24
23
|
const internal_3 = require("@nx/js/internal");
|
|
25
24
|
async function applicationGenerator(tree, schema) {
|
|
26
25
|
return await applicationGeneratorInternal(tree, {
|
|
@@ -43,9 +42,9 @@ async function applicationGeneratorInternal(tree, schema) {
|
|
|
43
42
|
tasks.push(jsInitTask);
|
|
44
43
|
const options = await (0, normalize_options_1.normalizeOptions)(tree, schema);
|
|
45
44
|
const projectOffsetFromRoot = (0, devkit_1.offsetFromRoot)(options.appProjectRoot);
|
|
46
|
-
const onBoardingStatus = await (0,
|
|
45
|
+
const onBoardingStatus = await (0, internal_1.createNxCloudOnboardingURLForWelcomeApp)(tree, options.nxCloudToken);
|
|
47
46
|
const connectCloudUrl = onBoardingStatus === 'unclaimed' &&
|
|
48
|
-
(await (0,
|
|
47
|
+
(await (0, internal_1.getNxCloudAppOnBoardingUrl)(options.nxCloudToken));
|
|
49
48
|
tasks.push(await (0, ensure_dependencies_1.ensureDependencies)(tree, options));
|
|
50
49
|
const packageJson = {
|
|
51
50
|
name: options.importPath,
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.addVitest = addVitest;
|
|
4
4
|
const devkit_1 = require("@nx/devkit");
|
|
5
|
+
const internal_1 = require("@nx/eslint/internal");
|
|
5
6
|
const utils_1 = require("../../init/lib/utils");
|
|
6
7
|
const versions_1 = require("../../../utils/versions");
|
|
7
8
|
async function addVitest(tree, options) {
|
|
@@ -29,10 +30,11 @@ async function addVitest(tree, options) {
|
|
|
29
30
|
testEnvironment: 'jsdom',
|
|
30
31
|
imports: [`import vue from '@vitejs/plugin-vue'`],
|
|
31
32
|
plugins: ['vue()'],
|
|
32
|
-
//
|
|
33
|
-
//
|
|
33
|
+
// Only the legacy @nuxt/eslint-config (~0.5.6) leaves .mts out of its
|
|
34
|
+
// parser configuration, so fall back to .ts just for it. A .ts config in
|
|
35
|
+
// a CommonJS package trips Vite's `configLoader: 'native'` warning.
|
|
34
36
|
// See: https://github.com/nuxt/eslint/blob/v0.5.6/packages/eslint-config/src/legacy.ts#L6-L11
|
|
35
|
-
useEsmExtension:
|
|
37
|
+
useEsmExtension: options.linter !== 'eslint' || (0, internal_1.useFlatConfig)(tree),
|
|
36
38
|
}, true, undefined, true);
|
|
37
39
|
(0, devkit_1.updateJson)(tree, `${options.appProjectRoot}/tsconfig.spec.json`, (json) => {
|
|
38
40
|
json.compilerOptions ??= {};
|
|
@@ -3,13 +3,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.createNodesV2 = exports.createNodes = void 0;
|
|
4
4
|
const internal_1 = require("@nx/devkit/internal");
|
|
5
5
|
const devkit_1 = require("@nx/devkit");
|
|
6
|
-
const cache_directory_1 = require("nx/src/utils/cache-directory");
|
|
7
6
|
const js_1 = require("@nx/js");
|
|
8
7
|
const path_1 = require("path");
|
|
9
8
|
const fs_1 = require("fs");
|
|
10
9
|
const executor_utils_1 = require("../utils/executor-utils");
|
|
11
10
|
const internal_2 = require("@nx/js/internal");
|
|
12
|
-
const cachePath = (0, path_1.join)(
|
|
11
|
+
const cachePath = (0, path_1.join)(internal_1.workspaceDataDirectory, 'nuxt.hash');
|
|
13
12
|
const targetsCache = new internal_1.PluginCache(cachePath);
|
|
14
13
|
exports.createNodes = [
|
|
15
14
|
'**/nuxt.config.{js,ts,mjs,mts,cjs,cts}',
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { Tree } from 'nx/src/generators/tree';
|
|
2
1
|
import { Linter, LinterType } from '@nx/eslint';
|
|
3
|
-
import { GeneratorCallback } from '@nx/devkit';
|
|
2
|
+
import { GeneratorCallback, Tree } from '@nx/devkit';
|
|
4
3
|
export declare function addLinting(host: Tree, options: {
|
|
5
4
|
linter: Linter | LinterType;
|
|
6
5
|
projectName: string;
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.addLinting = addLinting;
|
|
4
4
|
const eslint_1 = require("@nx/eslint");
|
|
5
|
-
const path_1 = require("nx/src/utils/path");
|
|
6
5
|
const devkit_1 = require("@nx/devkit");
|
|
7
6
|
const internal_1 = require("@nx/eslint/internal");
|
|
8
7
|
const versions_1 = require("./versions");
|
|
@@ -13,7 +12,7 @@ async function addLinting(host, options) {
|
|
|
13
12
|
const lintTask = await (0, eslint_1.lintProjectGenerator)(host, {
|
|
14
13
|
linter: options.linter,
|
|
15
14
|
project: options.projectName,
|
|
16
|
-
tsConfigPaths: [(0,
|
|
15
|
+
tsConfigPaths: [(0, devkit_1.joinPathFragments)(options.projectRoot, 'tsconfig.json')],
|
|
17
16
|
unitTestRunner: options.unitTestRunner,
|
|
18
17
|
skipFormat: true,
|
|
19
18
|
rootProject: options.rootProject,
|
|
@@ -63,7 +62,7 @@ function generateNuxtFlatEslintConfig(tree, projectRoot, enableTypedLinting) {
|
|
|
63
62
|
const eslintFile = (0, internal_1.findEslintFile)(tree, projectRoot);
|
|
64
63
|
if (!eslintFile)
|
|
65
64
|
return;
|
|
66
|
-
const configPath = (0,
|
|
65
|
+
const configPath = (0, devkit_1.joinPathFragments)(projectRoot, eslintFile);
|
|
67
66
|
const isMjs = eslintFile.endsWith('.mjs');
|
|
68
67
|
const isCjs = eslintFile.endsWith('.cjs');
|
|
69
68
|
// Determine the relative path to root config
|
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.6",
|
|
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,22 +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/
|
|
65
|
-
"@nx/eslint": "23.2.0-beta.
|
|
66
|
-
"@nx/
|
|
67
|
-
"@nx/
|
|
68
|
-
"@nx/vitest": "23.2.0-beta.
|
|
63
|
+
"@nx/devkit": "23.2.0-beta.6",
|
|
64
|
+
"@nx/js": "23.2.0-beta.6",
|
|
65
|
+
"@nx/eslint": "23.2.0-beta.6",
|
|
66
|
+
"@nx/vite": "23.2.0-beta.6",
|
|
67
|
+
"@nx/vue": "23.2.0-beta.6",
|
|
68
|
+
"@nx/vitest": "23.2.0-beta.6"
|
|
69
69
|
},
|
|
70
70
|
"devDependencies": {
|
|
71
|
-
"
|
|
71
|
+
"nuxt": "^3.21.10",
|
|
72
|
+
"nx": "23.2.0-beta.6"
|
|
72
73
|
},
|
|
73
74
|
"peerDependencies": {
|
|
74
75
|
"nuxt": ">=3.0.0 <5.0.0",
|
|
75
76
|
"@nuxt/schema": "^3.0.0 || ^4.0.0",
|
|
76
77
|
"@nuxt/kit": "^3.0.0 || ^4.0.0",
|
|
77
|
-
"@nx/playwright": "23.2.0-beta.
|
|
78
|
-
"@nx/cypress": "23.2.0-beta.
|
|
78
|
+
"@nx/playwright": "23.2.0-beta.6",
|
|
79
|
+
"@nx/cypress": "23.2.0-beta.6"
|
|
79
80
|
},
|
|
80
81
|
"peerDependenciesMeta": {
|
|
81
82
|
"nuxt": {
|