@nx/nuxt 23.3.0-rc.1 → 24.0.0-beta.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/README.md CHANGED
@@ -1,7 +1,7 @@
1
- <p style="text-align: center;">
1
+ <p align="center">
2
2
  <picture>
3
- <source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/nrwl/nx/master/images/nx-dark.svg">
4
- <img alt="Nx - Smart Monorepos · Fast Builds" src="https://raw.githubusercontent.com/nrwl/nx/master/images/nx-light.svg" width="100%">
3
+ <source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/nrwl/nx/master/images/nx-logo-light.svg">
4
+ <img alt="Nx Logo" src="https://raw.githubusercontent.com/nrwl/nx/master/images/nx-logo.svg" width="140">
5
5
  </picture>
6
6
  </p>
7
7
 
@@ -62,6 +62,3 @@ npx nx@latest init
62
62
  - [Official Nx YouTube Channel](https://www.youtube.com/@NxDevtools)
63
63
  - [Blog Posts About Nx](https://nx.dev/blog)
64
64
 
65
- <p style="text-align: center;"><a href="https://nx.dev/#learning-materials" target="_blank" rel="noreferrer"><img src="https://raw.githubusercontent.com/nrwl/nx/master/images/nx-courses-and-videos.svg"
66
- width="100%" alt="Nx - Smart Monorepos · Fast Builds"></a></p>
67
-
@@ -17,8 +17,7 @@ const add_vitest_1 = require("./lib/add-vitest");
17
17
  const vue_1 = require("@nx/vue");
18
18
  const ensure_dependencies_1 = require("./lib/ensure-dependencies");
19
19
  const assert_supported_nuxt_version_1 = require("../../utils/assert-supported-nuxt-version");
20
- const node_child_process_1 = require("node:child_process");
21
- const node_fs_1 = require("node:fs");
20
+ const prepare_project_1 = require("./lib/prepare-project");
22
21
  const node_path_1 = require("node:path");
23
22
  const internal_3 = require("@nx/js/internal");
24
23
  async function applicationGenerator(tree, schema) {
@@ -156,21 +155,9 @@ async function applicationGeneratorInternal(tree, schema) {
156
155
  await (0, devkit_1.formatFiles)(tree);
157
156
  tasks.push(() => {
158
157
  const packageManager = (0, devkit_1.detectPackageManager)(devkit_1.workspaceRoot);
159
- const pmc = (0, devkit_1.getPackageManagerCommand)(packageManager, devkit_1.workspaceRoot);
160
158
  const appRoot = (0, node_path_1.join)(devkit_1.workspaceRoot, options.appProjectRoot);
161
- // npm, yarn, and bun resolve binaries from `node_modules/.bin` searching
162
- // upward from the cwd, so running in the app dir picks an app-level `nuxi`
163
- // first and falls back to the workspace-root install. pnpm's `pnpm exec`
164
- // doesn't search upward: in an integrated workspace the app dir only sees
165
- // its own `node_modules/.bin` and can't reach the root-installed `nuxi`. So
166
- // for pnpm only run in the app dir when it has its own `nuxi` (package-based
167
- // setups, where the app copy should win); otherwise run at the workspace
168
- // root, where the generator installs it.
169
- const runInAppDir = packageManager !== 'pnpm' ||
170
- (0, node_fs_1.existsSync)((0, node_path_1.join)(appRoot, 'node_modules', '.bin', 'nuxi')) ||
171
- (0, node_fs_1.existsSync)((0, node_path_1.join)(appRoot, 'node_modules', '.bin', 'nuxi.cmd'));
172
159
  try {
173
- (0, node_child_process_1.execSync)(`${pmc.exec} nuxi prepare${runInAppDir ? '' : ` "${options.appProjectRoot}"`}`, { cwd: runInAppDir ? appRoot : devkit_1.workspaceRoot, windowsHide: true });
160
+ (0, prepare_project_1.prepareProject)(appRoot, devkit_1.workspaceRoot, packageManager);
174
161
  }
175
162
  catch (e) {
176
163
  console.error(`Failed to run \`nuxi prepare\` in "${options.appProjectRoot}". Please run the command manually.`);
@@ -0,0 +1,2 @@
1
+ import { type PackageManager } from '@nx/devkit';
2
+ export declare function prepareProject(appRoot: string, workspaceRoot: string, packageManager: PackageManager): void;
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.prepareProject = prepareProject;
4
+ const devkit_1 = require("@nx/devkit");
5
+ const node_child_process_1 = require("node:child_process");
6
+ const node_fs_1 = require("node:fs");
7
+ const node_path_1 = require("node:path");
8
+ function prepareProject(appRoot, workspaceRoot, packageManager) {
9
+ const runInAppDir = packageManager !== 'pnpm' ||
10
+ (0, node_fs_1.existsSync)((0, node_path_1.join)(appRoot, 'node_modules', '.bin', 'nuxi')) ||
11
+ (0, node_fs_1.existsSync)((0, node_path_1.join)(appRoot, 'node_modules', '.bin', 'nuxi.cmd'));
12
+ const pmc = (0, devkit_1.getPackageManagerCommand)(packageManager, workspaceRoot);
13
+ const [command, ...args] = pmc.exec.split(' ');
14
+ // Yarn Classic can change cwd to the parent package before launching nuxi.
15
+ // Always provide the absolute app directory, regardless of binary resolution.
16
+ const rootArgument = process.platform === 'win32' ? `"${appRoot}"` : appRoot;
17
+ (0, node_child_process_1.execFileSync)(command, [...args, 'nuxi', 'prepare', rootArgument], {
18
+ cwd: runInAppDir ? appRoot : workspaceRoot,
19
+ windowsHide: true,
20
+ shell: process.platform === 'win32',
21
+ });
22
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nx/nuxt",
3
- "version": "23.3.0-rc.1",
3
+ "version": "24.0.0-beta.0",
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": {
@@ -59,24 +59,24 @@
59
59
  },
60
60
  "dependencies": {
61
61
  "tslib": "^2.3.0",
62
- "@nx/devkit": "23.3.0-rc.1",
63
- "@nx/js": "23.3.0-rc.1",
64
- "@nx/eslint": "23.3.0-rc.1",
65
- "@nx/vue": "23.3.0-rc.1",
66
- "@nx/vite": "23.3.0-rc.1",
67
- "@nx/vitest": "23.3.0-rc.1",
62
+ "@nx/devkit": "24.0.0-beta.0",
63
+ "@nx/js": "24.0.0-beta.0",
64
+ "@nx/eslint": "24.0.0-beta.0",
65
+ "@nx/vue": "24.0.0-beta.0",
66
+ "@nx/vite": "24.0.0-beta.0",
67
+ "@nx/vitest": "24.0.0-beta.0",
68
68
  "semver": "^7.6.3"
69
69
  },
70
70
  "devDependencies": {
71
71
  "nuxt": "^3.21.10",
72
- "nx": "23.3.0-rc.1"
72
+ "nx": "24.0.0-beta.0"
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/cypress": "23.3.0-rc.1",
79
- "@nx/playwright": "23.3.0-rc.1"
78
+ "@nx/cypress": "24.0.0-beta.0",
79
+ "@nx/playwright": "24.0.0-beta.0"
80
80
  },
81
81
  "peerDependenciesMeta": {
82
82
  "nuxt": {
@@ -1,7 +1,7 @@
1
- <p style="text-align: center;">
1
+ <p align="center">
2
2
  <picture>
3
- <source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/nrwl/nx/master/images/nx-dark.svg">
4
- <img alt="Nx - Smart Monorepos · Fast Builds" src="https://raw.githubusercontent.com/nrwl/nx/master/images/nx-light.svg" width="100%">
3
+ <source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/nrwl/nx/master/images/nx-logo-light.svg">
4
+ <img alt="Nx Logo" src="https://raw.githubusercontent.com/nrwl/nx/master/images/nx-logo.svg" width="140">
5
5
  </picture>
6
6
  </p>
7
7