@nx/angular 21.0.0-beta.2 → 21.0.0-beta.3

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/migrations.json CHANGED
@@ -356,6 +356,12 @@
356
356
  },
357
357
  "description": "Update the @angular/cli package version to ~19.2.0.",
358
358
  "factory": "./src/migrations/update-20-5-0/update-angular-cli"
359
+ },
360
+ "set-continuous-option": {
361
+ "cli": "nx",
362
+ "version": "21.0.0-beta.3",
363
+ "description": "Set the `continuous` option to `true` for continuous tasks.",
364
+ "factory": "./src/migrations/update-21-0-0/set-continuous-option"
359
365
  }
360
366
  },
361
367
  "packageJsonUpdates": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nx/angular",
3
- "version": "21.0.0-beta.2",
3
+ "version": "21.0.0-beta.3",
4
4
  "private": false,
5
5
  "description": "The Nx Plugin for Angular contains executors, generators, and utilities for managing Angular applications and libraries within an Nx workspace. It provides: \n\n- Integration with libraries such as Storybook, Jest, ESLint, Tailwind CSS, Playwright and Cypress. \n\n- Generators to help scaffold code quickly (like: Micro Frontends, Libraries, both internal to your codebase and publishable to npm) \n\n- Single Component Application Modules (SCAMs) \n\n- NgRx helpers. \n\n- Utilities for automatic workspace refactoring.",
6
6
  "repository": {
@@ -72,14 +72,14 @@
72
72
  "semver": "^7.5.3",
73
73
  "tslib": "^2.3.0",
74
74
  "webpack-merge": "^5.8.0",
75
- "@nx/devkit": "21.0.0-beta.2",
76
- "@nx/js": "21.0.0-beta.2",
77
- "@nx/eslint": "21.0.0-beta.2",
78
- "@nx/webpack": "21.0.0-beta.2",
79
- "@nx/rspack": "21.0.0-beta.2",
80
- "@nx/module-federation": "21.0.0-beta.2",
81
- "@nx/web": "21.0.0-beta.2",
82
- "@nx/workspace": "21.0.0-beta.2",
75
+ "@nx/devkit": "21.0.0-beta.3",
76
+ "@nx/js": "21.0.0-beta.3",
77
+ "@nx/eslint": "21.0.0-beta.3",
78
+ "@nx/webpack": "21.0.0-beta.3",
79
+ "@nx/rspack": "21.0.0-beta.3",
80
+ "@nx/module-federation": "21.0.0-beta.3",
81
+ "@nx/web": "21.0.0-beta.3",
82
+ "@nx/workspace": "21.0.0-beta.3",
83
83
  "piscina": "^4.4.0"
84
84
  },
85
85
  "peerDependencies": {
@@ -13,6 +13,7 @@ function addFileServerTarget(tree, options, targetName, e2ePort) {
13
13
  const isUsingApplicationBuilder = options.bundler === 'esbuild';
14
14
  const projectConfig = (0, devkit_1.readProjectConfiguration)(tree, options.name);
15
15
  projectConfig.targets[targetName] = {
16
+ continuous: true,
16
17
  executor: '@nx/web:file-server',
17
18
  options: {
18
19
  buildTarget: `${options.name}:build`,
@@ -82,6 +82,7 @@ function createProject(tree, options) {
82
82
  defaultConfiguration: 'production',
83
83
  },
84
84
  serve: {
85
+ continuous: true,
85
86
  executor: '@angular-devkit/build-angular:dev-server',
86
87
  options: options.port
87
88
  ? {
@@ -17,6 +17,7 @@ function setupServeTarget(host, options) {
17
17
  };
18
18
  if (options.mfType === 'remote') {
19
19
  appConfig.targets['serve-static'] = {
20
+ continuous: true,
20
21
  executor: '@nx/web:file-server',
21
22
  defaultConfiguration: 'production',
22
23
  options: {
@@ -76,6 +76,7 @@ function updateProjectConfigForBrowserBuilder(tree, options) {
76
76
  defaultConfiguration: 'production',
77
77
  };
78
78
  projectConfig.targets['serve-ssr'] = {
79
+ continuous: true,
79
80
  executor: '@angular-devkit/build-angular:ssr-dev-server',
80
81
  configurations: {
81
82
  development: {
@@ -0,0 +1,3 @@
1
+ import { type Tree } from '@nx/devkit';
2
+ export declare const continuousExecutors: Set<string>;
3
+ export default function (tree: Tree): Promise<void>;
@@ -0,0 +1,29 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.continuousExecutors = void 0;
4
+ exports.default = default_1;
5
+ const devkit_1 = require("@nx/devkit");
6
+ exports.continuousExecutors = new Set([
7
+ '@angular-devkit/build-angular:dev-server',
8
+ '@angular-devkit/build-angular:ssr-dev-server',
9
+ '@nx/angular:dev-server',
10
+ '@nx/angular:module-federation-dev-server',
11
+ '@nx/angular:module-federation-dev-ssr',
12
+ ]);
13
+ async function default_1(tree) {
14
+ const projects = (0, devkit_1.getProjects)(tree);
15
+ for (const [projectName, projectConfig] of projects) {
16
+ let updated = false;
17
+ for (const targetConfig of Object.values(projectConfig.targets ?? {})) {
18
+ if (exports.continuousExecutors.has(targetConfig.executor) &&
19
+ targetConfig.continuous === undefined) {
20
+ targetConfig.continuous = true;
21
+ updated = true;
22
+ }
23
+ }
24
+ if (updated) {
25
+ (0, devkit_1.updateProjectConfiguration)(tree, projectName, projectConfig);
26
+ }
27
+ }
28
+ await (0, devkit_1.formatFiles)(tree);
29
+ }
@@ -114,6 +114,7 @@ async function buildAngularProjects(configFilePath, options, angularWorkspaceRoo
114
114
  await updateBuildTarget(nxTargetName, targets[nxTargetName], angularTarget, context, angularWorkspaceRoot, project.root, namedInputs);
115
115
  }
116
116
  else if (knownExecutors.devServer.has(angularTarget.builder)) {
117
+ targets[nxTargetName].continuous = true;
117
118
  targets[nxTargetName].metadata.help.example.options = { port: 4201 };
118
119
  }
119
120
  else if (knownExecutors.extractI18n.has(angularTarget.builder)) {
@@ -128,6 +129,7 @@ async function buildAngularProjects(configFilePath, options, angularWorkspaceRoo
128
129
  updateServerTarget(targets[nxTargetName], angularTarget, context, angularWorkspaceRoot, project.root, namedInputs);
129
130
  }
130
131
  else if (knownExecutors.serveSsr.has(angularTarget.builder)) {
132
+ targets[nxTargetName].continuous = true;
131
133
  targets[nxTargetName].metadata.help.example.options = { port: 4201 };
132
134
  }
133
135
  else if (knownExecutors.prerender.has(angularTarget.builder)) {