@nx/angular 21.1.0-beta.1 → 21.1.0-canary.20250507-30a7709
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/package.json +9 -9
- package/src/generators/application/lib/create-files.js +1 -1
- package/src/generators/convert-to-rspack/convert-to-rspack.js +0 -28
- package/src/generators/utils/add-vitest.js +0 -6
- package/src/generators/utils/version-utils.d.ts +0 -1
- package/src/generators/utils/version-utils.js +0 -5
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@nx/angular",
|
3
|
-
"version": "21.1.0-
|
3
|
+
"version": "21.1.0-canary.20250507-30a7709",
|
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": {
|
@@ -67,14 +67,14 @@
|
|
67
67
|
"semver": "^7.5.3",
|
68
68
|
"tslib": "^2.3.0",
|
69
69
|
"webpack-merge": "^5.8.0",
|
70
|
-
"@nx/devkit": "21.1.0-
|
71
|
-
"@nx/js": "21.1.0-
|
72
|
-
"@nx/eslint": "21.1.0-
|
73
|
-
"@nx/webpack": "21.1.0-
|
74
|
-
"@nx/rspack": "21.1.0-
|
75
|
-
"@nx/module-federation": "21.1.0-
|
76
|
-
"@nx/web": "21.1.0-
|
77
|
-
"@nx/workspace": "21.1.0-
|
70
|
+
"@nx/devkit": "21.1.0-canary.20250507-30a7709",
|
71
|
+
"@nx/js": "21.1.0-canary.20250507-30a7709",
|
72
|
+
"@nx/eslint": "21.1.0-canary.20250507-30a7709",
|
73
|
+
"@nx/webpack": "21.1.0-canary.20250507-30a7709",
|
74
|
+
"@nx/rspack": "21.1.0-canary.20250507-30a7709",
|
75
|
+
"@nx/module-federation": "21.1.0-canary.20250507-30a7709",
|
76
|
+
"@nx/web": "21.1.0-canary.20250507-30a7709",
|
77
|
+
"@nx/workspace": "21.1.0-canary.20250507-30a7709",
|
78
78
|
"piscina": "^4.4.0"
|
79
79
|
},
|
80
80
|
"peerDependencies": {
|
@@ -44,7 +44,7 @@ async function createFiles(tree, options, rootOffset) {
|
|
44
44
|
connectCloudUrl,
|
45
45
|
tutorialUrl: options.standalone
|
46
46
|
? 'https://nx.dev/getting-started/tutorials/angular-standalone-tutorial?utm_source=nx-project'
|
47
|
-
: 'https://nx.dev/
|
47
|
+
: 'https://nx.dev/tutorials/3-angular-monorepo/1a-introduction/1-welcome?utm_source=nx-project',
|
48
48
|
tpl: '',
|
49
49
|
};
|
50
50
|
const angularAppType = options.standalone ? 'standalone' : 'ng-module';
|
@@ -15,8 +15,6 @@ const SUPPORTED_EXECUTORS = [
|
|
15
15
|
'@angular-devkit/build-angular:browser',
|
16
16
|
'@angular-devkit/build-angular:dev-server',
|
17
17
|
'@angular-devkit/build-angular:server',
|
18
|
-
'@angular-devkit/build-angular:prerender',
|
19
|
-
'@angular-devkit/build-angular:app-shell',
|
20
18
|
'@nx/angular:webpack-browser',
|
21
19
|
'@nx/angular:webpack-server',
|
22
20
|
'@nx/angular:dev-server',
|
@@ -295,31 +293,6 @@ async function convertToRspack(tree, schema) {
|
|
295
293
|
}
|
296
294
|
serveTargetNames.push(targetName);
|
297
295
|
}
|
298
|
-
else if (target.executor === '@angular-devkit/build-angular:prerender') {
|
299
|
-
if (target.options) {
|
300
|
-
const prerenderOptions = {
|
301
|
-
routesFile: target.options.routesFile,
|
302
|
-
discoverRoutes: target.options.discoverRoutes ?? true,
|
303
|
-
routes: target.options.routes ?? [],
|
304
|
-
};
|
305
|
-
createConfigOptions.prerender = prerenderOptions;
|
306
|
-
if (target.configurations) {
|
307
|
-
for (const [configurationName, configuration] of Object.entries(target.configurations)) {
|
308
|
-
configurationOptions[configurationName] ??= {};
|
309
|
-
configurationOptions[configurationName].prerender ??= {
|
310
|
-
routesFile: configuration.routesFile,
|
311
|
-
discoverRoutes: configuration.discoverRoutes ?? true,
|
312
|
-
routes: configuration.routes ?? [],
|
313
|
-
};
|
314
|
-
}
|
315
|
-
}
|
316
|
-
}
|
317
|
-
buildTargetNames.push(targetName);
|
318
|
-
}
|
319
|
-
else if (target.executor === '@angular-devkit/build-angular:app-shell') {
|
320
|
-
createConfigOptions.appShell = true;
|
321
|
-
buildTargetNames.push(targetName);
|
322
|
-
}
|
323
296
|
}
|
324
297
|
const customWebpackConfigInfo = customWebpackConfigPath
|
325
298
|
? await (0, get_custom_webpack_config_1.getCustomWebpackConfig)(tree, project.root, customWebpackConfigPath)
|
@@ -338,7 +311,6 @@ async function convertToRspack(tree, schema) {
|
|
338
311
|
const { rspackInitGenerator } = (0, devkit_1.ensurePackage)('@nx/rspack', versions_1.nxVersion);
|
339
312
|
await rspackInitGenerator(tree, {
|
340
313
|
addPlugin: true,
|
341
|
-
framework: 'angular',
|
342
314
|
});
|
343
315
|
// This is needed to prevent a circular execution of the build target
|
344
316
|
const rootPkgJson = (0, devkit_1.readJson)(tree, 'package.json');
|
@@ -3,7 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.addVitest = addVitest;
|
4
4
|
const devkit_1 = require("@nx/devkit");
|
5
5
|
const versions_1 = require("../../utils/versions");
|
6
|
-
const version_utils_1 = require("./version-utils");
|
7
6
|
async function addVitest(tree, options) {
|
8
7
|
const { vitestGenerator } = (0, devkit_1.ensurePackage)('@nx/vite', versions_1.nxVersion);
|
9
8
|
await vitestGenerator(tree, {
|
@@ -13,9 +12,4 @@ async function addVitest(tree, options) {
|
|
13
12
|
coverageProvider: 'v8',
|
14
13
|
addPlugin: options.addPlugin ?? false,
|
15
14
|
});
|
16
|
-
if (!options.skipPackageJson) {
|
17
|
-
const angularDevkitVersion = (0, version_utils_1.getInstalledAngularDevkitVersion)(tree) ??
|
18
|
-
(0, version_utils_1.versions)(tree).angularDevkitVersion;
|
19
|
-
(0, devkit_1.addDependenciesToPackageJson)(tree, {}, { '@angular/build': angularDevkitVersion }, undefined, true);
|
20
|
-
}
|
21
15
|
}
|
@@ -1,6 +1,5 @@
|
|
1
1
|
import { type Tree } from '@nx/devkit';
|
2
2
|
import { type PackageCompatVersions, type PackageLatestVersions } from '../../utils/backward-compatible-versions';
|
3
|
-
export declare function getInstalledAngularDevkitVersion(tree: Tree): string | null;
|
4
3
|
export declare function getInstalledAngularVersion(tree: Tree): string;
|
5
4
|
export declare function getInstalledAngularMajorVersion(tree: Tree): number;
|
6
5
|
export declare function getInstalledAngularVersionInfo(tree: Tree): {
|
@@ -1,6 +1,5 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.getInstalledAngularDevkitVersion = getInstalledAngularDevkitVersion;
|
4
3
|
exports.getInstalledAngularVersion = getInstalledAngularVersion;
|
5
4
|
exports.getInstalledAngularMajorVersion = getInstalledAngularMajorVersion;
|
6
5
|
exports.getInstalledAngularVersionInfo = getInstalledAngularVersionInfo;
|
@@ -13,10 +12,6 @@ const semver_1 = require("semver");
|
|
13
12
|
const backward_compatible_versions_1 = require("../../utils/backward-compatible-versions");
|
14
13
|
const latestVersions = tslib_1.__importStar(require("../../utils/versions"));
|
15
14
|
const versions_1 = require("../../utils/versions");
|
16
|
-
function getInstalledAngularDevkitVersion(tree) {
|
17
|
-
return (getInstalledPackageVersion(tree, '@angular-devkit/build-angular') ??
|
18
|
-
getInstalledPackageVersion(tree, '@angular/build'));
|
19
|
-
}
|
20
15
|
function getInstalledAngularVersion(tree) {
|
21
16
|
const pkgJson = (0, devkit_1.readJson)(tree, 'package.json');
|
22
17
|
const installedAngularVersion = pkgJson.dependencies && pkgJson.dependencies['@angular/core'];
|