@nx/angular 21.0.0-beta.2 → 21.0.0-beta.4
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 +6 -0
- package/package.json +9 -9
- package/src/generators/application/lib/add-serve-static-target.js +1 -0
- package/src/generators/application/lib/create-project.js +1 -0
- package/src/generators/application/schema.d.ts +0 -1
- package/src/generators/application/schema.json +0 -6
- package/src/generators/host/schema.d.ts +0 -1
- package/src/generators/host/schema.json +0 -6
- package/src/generators/library/lib/normalized-schema.d.ts +0 -1
- package/src/generators/library/schema.d.ts +0 -1
- package/src/generators/library/schema.json +0 -6
- package/src/generators/remote/schema.d.ts +0 -1
- package/src/generators/remote/schema.json +0 -6
- package/src/generators/setup-mf/lib/setup-serve-target.js +1 -0
- package/src/generators/setup-ssr/lib/update-project-config.js +1 -0
- package/src/migrations/update-21-0-0/set-continuous-option.d.ts +3 -0
- package/src/migrations/update-21-0-0/set-continuous-option.js +29 -0
- package/src/plugins/plugin.js +2 -0
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.
|
3
|
+
"version": "21.0.0-beta.4",
|
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.
|
76
|
-
"@nx/js": "21.0.0-beta.
|
77
|
-
"@nx/eslint": "21.0.0-beta.
|
78
|
-
"@nx/webpack": "21.0.0-beta.
|
79
|
-
"@nx/rspack": "21.0.0-beta.
|
80
|
-
"@nx/module-federation": "21.0.0-beta.
|
81
|
-
"@nx/web": "21.0.0-beta.
|
82
|
-
"@nx/workspace": "21.0.0-beta.
|
75
|
+
"@nx/devkit": "21.0.0-beta.4",
|
76
|
+
"@nx/js": "21.0.0-beta.4",
|
77
|
+
"@nx/eslint": "21.0.0-beta.4",
|
78
|
+
"@nx/webpack": "21.0.0-beta.4",
|
79
|
+
"@nx/rspack": "21.0.0-beta.4",
|
80
|
+
"@nx/module-federation": "21.0.0-beta.4",
|
81
|
+
"@nx/web": "21.0.0-beta.4",
|
82
|
+
"@nx/workspace": "21.0.0-beta.4",
|
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`,
|
@@ -130,12 +130,6 @@
|
|
130
130
|
"description": "Create an application with stricter type checking and build optimization options.",
|
131
131
|
"default": true
|
132
132
|
},
|
133
|
-
"standaloneConfig": {
|
134
|
-
"description": "Split the project configuration into `<projectRoot>/project.json` rather than including it inside `workspace.json`.",
|
135
|
-
"type": "boolean",
|
136
|
-
"default": true,
|
137
|
-
"x-deprecated": "Nx only supports standaloneConfig"
|
138
|
-
},
|
139
133
|
"port": {
|
140
134
|
"type": "number",
|
141
135
|
"description": "The port at which the remote application should be served."
|
@@ -144,12 +144,6 @@
|
|
144
144
|
"description": "Create an application with stricter type checking and build optimization options.",
|
145
145
|
"default": true
|
146
146
|
},
|
147
|
-
"standaloneConfig": {
|
148
|
-
"description": "Split the project configuration into `<projectRoot>/project.json` rather than including it inside `workspace.json`.",
|
149
|
-
"type": "boolean",
|
150
|
-
"default": true,
|
151
|
-
"x-deprecated": "Nx only supports standaloneConfig"
|
152
|
-
},
|
153
147
|
"setParserOptionsProject": {
|
154
148
|
"type": "boolean",
|
155
149
|
"description": "Whether or not to configure the ESLint `parserOptions.project` option. We do not do this by default for lint performance reasons.",
|
@@ -108,12 +108,6 @@
|
|
108
108
|
"enum": ["eslint", "none"],
|
109
109
|
"default": "eslint"
|
110
110
|
},
|
111
|
-
"standaloneConfig": {
|
112
|
-
"description": "Split the project configuration into `<projectRoot>/project.json` rather than including it inside `workspace.json`.",
|
113
|
-
"type": "boolean",
|
114
|
-
"default": true,
|
115
|
-
"x-deprecated": "Nx only supports standaloneConfig"
|
116
|
-
},
|
117
111
|
"compilationMode": {
|
118
112
|
"description": "Specifies the compilation mode to use. If not specified, it will default to `partial` for publishable libraries and to `full` for buildable libraries. The `full` value can not be used for publishable libraries.",
|
119
113
|
"type": "string",
|
@@ -138,12 +138,6 @@
|
|
138
138
|
"description": "Create an application with stricter type checking and build optimization options.",
|
139
139
|
"default": true
|
140
140
|
},
|
141
|
-
"standaloneConfig": {
|
142
|
-
"description": "Split the project configuration into `<projectRoot>/project.json` rather than including it inside `workspace.json`.",
|
143
|
-
"type": "boolean",
|
144
|
-
"default": true,
|
145
|
-
"x-deprecated": "Nx only supports standaloneConfig"
|
146
|
-
},
|
147
141
|
"setParserOptionsProject": {
|
148
142
|
"type": "boolean",
|
149
143
|
"description": "Whether or not to configure the ESLint `parserOptions.project` option. We do not do this by default for lint performance reasons.",
|
@@ -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,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
|
+
}
|
package/src/plugins/plugin.js
CHANGED
@@ -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)) {
|