@nx/nuxt 23.3.0-pr.36841.f66e88b → 23.3.0-pr.37036.2b7abf9

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.
@@ -2,6 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ensureDependencies = ensureDependencies;
4
4
  const devkit_1 = require("@nx/devkit");
5
+ const internal_1 = require("@nx/devkit/internal");
5
6
  const vue_1 = require("@nx/vue");
6
7
  const versions_1 = require("../../../utils/versions");
7
8
  const version_utils_1 = require("../../../utils/version-utils");
@@ -20,6 +21,11 @@ async function ensureDependencies(host, options) {
20
21
  'vue-tsc': vue_1.vueTscVersion,
21
22
  };
22
23
  if (options.style === 'scss') {
24
+ // sass pulls in @parcel/watcher, whose install script only builds from
25
+ // source when npm_config_build_from_source is set.
26
+ (0, internal_1.acknowledgeBuildScripts)(host, (0, devkit_1.detectPackageManager)(host.root), {
27
+ '@parcel/watcher': false,
28
+ });
23
29
  devDependencies['sass'] = vue_1.sassVersion;
24
30
  }
25
31
  return (0, devkit_1.addDependenciesToPackageJson)(host, {}, devDependencies, undefined, true);
@@ -4,10 +4,17 @@ exports.updateDependencies = updateDependencies;
4
4
  exports.addVitestTargetDefaults = addVitestTargetDefaults;
5
5
  exports.addPlugin = addPlugin;
6
6
  const devkit_1 = require("@nx/devkit");
7
+ const internal_1 = require("@nx/devkit/internal");
7
8
  const versions_1 = require("../../../utils/versions");
8
9
  const version_utils_1 = require("../../../utils/version-utils");
9
10
  async function updateDependencies(host, schema) {
10
11
  const nuxtVersions = await (0, version_utils_1.getNuxtDependenciesVersionsToInstall)(host);
12
+ // The nuxt toolchain (nitropack, @unhead/bundler) depends on esbuild, whose
13
+ // install script only validates the prebuilt binary that ships as an optional
14
+ // dependency.
15
+ (0, internal_1.acknowledgeBuildScripts)(host, (0, devkit_1.detectPackageManager)(host.root), {
16
+ esbuild: false,
17
+ });
11
18
  return (0, devkit_1.addDependenciesToPackageJson)(host, {}, {
12
19
  '@nx/nuxt': versions_1.nxVersion,
13
20
  nuxt: nuxtVersions.nuxt,
@@ -66,8 +66,8 @@ async function buildNuxtTargets(configFilePath, projectRoot, options, context, p
66
66
  const namedInputs = (0, internal_1.getNamedInputs)(projectRoot, context);
67
67
  const targets = {};
68
68
  targets[options.buildTargetName] = buildTarget(options.buildTargetName, namedInputs, buildOutputs, projectRoot);
69
- targets[options.serveTargetName] = serveTarget(projectRoot);
70
- targets[options.serveStaticTargetName] = serveStaticTarget(options);
69
+ targets[options.serveTargetName] = serveTarget(projectRoot, namedInputs);
70
+ targets[options.serveStaticTargetName] = serveStaticTarget(options, namedInputs);
71
71
  targets[options.buildStaticTargetName] = buildStaticTarget(options.buildStaticTargetName, namedInputs, buildOutputs, projectRoot);
72
72
  (0, internal_2.addBuildAndWatchDepsTargets)(context.workspaceRoot, projectRoot, targets, options, pmc);
73
73
  return targets;
@@ -78,31 +78,36 @@ function buildTarget(buildTargetName, namedInputs, buildOutputs, projectRoot) {
78
78
  options: { cwd: projectRoot },
79
79
  cache: true,
80
80
  dependsOn: [`^${buildTargetName}`],
81
- inputs: [
82
- ...('production' in namedInputs
83
- ? ['production', '^production']
84
- : ['default', '^default']),
85
- {
86
- externalDependencies: ['nuxt'],
87
- },
88
- ],
81
+ inputs: buildInputs(namedInputs),
89
82
  outputs: buildOutputs,
90
83
  };
91
84
  }
92
- function serveTarget(projectRoot) {
85
+ function buildInputs(namedInputs) {
86
+ return [
87
+ ...('production' in namedInputs
88
+ ? ['production', '^production']
89
+ : ['default', '^default']),
90
+ {
91
+ externalDependencies: ['nuxt'],
92
+ },
93
+ ];
94
+ }
95
+ function serveTarget(projectRoot, namedInputs) {
93
96
  const targetConfig = {
94
97
  command: `nuxt dev`,
95
98
  options: {
96
99
  cwd: projectRoot,
97
100
  },
98
101
  continuous: true,
102
+ inputs: buildInputs(namedInputs),
99
103
  };
100
104
  return targetConfig;
101
105
  }
102
- function serveStaticTarget(options) {
106
+ function serveStaticTarget(options, namedInputs) {
103
107
  const targetConfig = {
104
108
  dependsOn: [`${options.buildStaticTargetName}`],
105
109
  continuous: true,
110
+ inputs: buildInputs(namedInputs),
106
111
  executor: '@nx/web:file-server',
107
112
  options: {
108
113
  buildTarget: `${options.buildStaticTargetName}`,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nx/nuxt",
3
- "version": "23.3.0-pr.36841.f66e88b",
3
+ "version": "23.3.0-pr.37036.2b7abf9",
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.3.0-pr.36841.f66e88b",
64
- "@nx/js": "23.3.0-pr.36841.f66e88b",
65
- "@nx/vue": "23.3.0-pr.36841.f66e88b",
66
- "@nx/eslint": "23.3.0-pr.36841.f66e88b",
67
- "@nx/vite": "23.3.0-pr.36841.f66e88b",
68
- "@nx/vitest": "23.3.0-pr.36841.f66e88b"
63
+ "@nx/devkit": "23.3.0-pr.37036.2b7abf9",
64
+ "@nx/vue": "23.3.0-pr.37036.2b7abf9",
65
+ "@nx/vite": "23.3.0-pr.37036.2b7abf9",
66
+ "@nx/eslint": "23.3.0-pr.37036.2b7abf9",
67
+ "@nx/js": "23.3.0-pr.37036.2b7abf9",
68
+ "@nx/vitest": "23.3.0-pr.37036.2b7abf9"
69
69
  },
70
70
  "devDependencies": {
71
71
  "nuxt": "^3.21.10",
72
- "nx": "23.3.0-pr.36841.f66e88b"
72
+ "nx": "23.3.0-pr.37036.2b7abf9"
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-pr.36841.f66e88b",
79
- "@nx/playwright": "23.3.0-pr.36841.f66e88b"
78
+ "@nx/playwright": "23.3.0-pr.37036.2b7abf9",
79
+ "@nx/cypress": "23.3.0-pr.37036.2b7abf9"
80
80
  },
81
81
  "peerDependenciesMeta": {
82
82
  "nuxt": {