@nx/angular 0.0.0-pr-30457-0ed97e4 → 0.0.0-pr-30516-4c8bfff

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
@@ -1341,10 +1341,6 @@
1341
1341
  "version": "~19.0.0",
1342
1342
  "alwaysAddToPackageJson": false
1343
1343
  },
1344
- "@angular/google-maps": {
1345
- "version": "~19.0.0",
1346
- "alwaysAddToPackageJson": false
1347
- },
1348
1344
  "ng-packagr": {
1349
1345
  "version": "~19.0.0",
1350
1346
  "alwaysAddToPackageJson": false
@@ -1541,10 +1537,6 @@
1541
1537
  "version": "~19.1.0",
1542
1538
  "alwaysAddToPackageJson": false
1543
1539
  },
1544
- "@angular/google-maps": {
1545
- "version": "~19.1.0",
1546
- "alwaysAddToPackageJson": false
1547
- },
1548
1540
  "ng-packagr": {
1549
1541
  "version": "~19.1.0",
1550
1542
  "alwaysAddToPackageJson": false
@@ -1606,10 +1598,6 @@
1606
1598
  "version": "~19.2.1",
1607
1599
  "alwaysAddToPackageJson": false
1608
1600
  },
1609
- "@angular/google-maps": {
1610
- "version": "~19.2.1",
1611
- "alwaysAddToPackageJson": false
1612
- },
1613
1601
  "ng-packagr": {
1614
1602
  "version": "~19.2.0",
1615
1603
  "alwaysAddToPackageJson": false
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nx/angular",
3
- "version": "0.0.0-pr-30457-0ed97e4",
3
+ "version": "0.0.0-pr-30516-4c8bfff",
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": "0.0.0-pr-30457-0ed97e4",
76
- "@nx/js": "0.0.0-pr-30457-0ed97e4",
77
- "@nx/eslint": "0.0.0-pr-30457-0ed97e4",
78
- "@nx/webpack": "0.0.0-pr-30457-0ed97e4",
79
- "@nx/rspack": "0.0.0-pr-30457-0ed97e4",
80
- "@nx/module-federation": "0.0.0-pr-30457-0ed97e4",
81
- "@nx/web": "0.0.0-pr-30457-0ed97e4",
82
- "@nx/workspace": "0.0.0-pr-30457-0ed97e4",
75
+ "@nx/devkit": "0.0.0-pr-30516-4c8bfff",
76
+ "@nx/js": "0.0.0-pr-30516-4c8bfff",
77
+ "@nx/eslint": "0.0.0-pr-30516-4c8bfff",
78
+ "@nx/webpack": "0.0.0-pr-30516-4c8bfff",
79
+ "@nx/rspack": "0.0.0-pr-30516-4c8bfff",
80
+ "@nx/module-federation": "0.0.0-pr-30516-4c8bfff",
81
+ "@nx/web": "0.0.0-pr-30516-4c8bfff",
82
+ "@nx/workspace": "0.0.0-pr-30516-4c8bfff",
83
83
  "piscina": "^4.4.0"
84
84
  },
85
85
  "peerDependencies": {
@@ -118,7 +118,9 @@ function executeDevServerBuilder(rawOptions, context) {
118
118
  // run the target for all projects.
119
119
  // This will occur when workspaceDependencies = []
120
120
  if (workspaceDependencies.length > 0) {
121
- baseWebpackConfig.plugins.push(new webpack_nx_build_coordination_plugin_1.WebpackNxBuildCoordinationPlugin(`nx run-many --target=${parsedBuildTarget.target} --projects=${workspaceDependencies.join(',')}`, { skipWatchingDeps: !options.watchDependencies }));
121
+ baseWebpackConfig.plugins.push(
122
+ // @ts-expect-error - difference between angular and webpack plugin definitions bc of webpack versions
123
+ new webpack_nx_build_coordination_plugin_1.WebpackNxBuildCoordinationPlugin(`nx run-many --target=${parsedBuildTarget.target} --projects=${workspaceDependencies.join(',')}`, { skipWatchingDeps: !options.watchDependencies }));
122
124
  }
123
125
  }
124
126
  if (!pathToWebpackConfig) {
@@ -2,5 +2,7 @@ import type { ExecutorContext } from '@nx/devkit';
2
2
  import type { DelegateBuildExecutorSchema } from './schema';
3
3
  export declare function delegateBuildExecutor(options: DelegateBuildExecutorSchema, context: ExecutorContext): AsyncGenerator<{
4
4
  success: boolean;
5
- }, void, any>;
5
+ }, {
6
+ success: boolean;
7
+ }, any>;
6
8
  export default delegateBuildExecutor;
@@ -6,6 +6,9 @@ const buildable_libs_utils_1 = require("@nx/js/src/utils/buildable-libs-utils");
6
6
  async function* delegateBuildExecutor(options, context) {
7
7
  const { target, dependencies } = (0, buildable_libs_utils_1.calculateProjectBuildableDependencies)(context.taskGraph, context.projectGraph, context.root, context.projectName, context.targetName, context.configurationName);
8
8
  options.tsConfig = (0, buildable_libs_utils_1.createTmpTsConfig)((0, devkit_1.joinPathFragments)(context.root, options.tsConfig), context.root, target.data.root, dependencies);
9
+ if (!(0, buildable_libs_utils_1.checkDependentProjectsHaveBeenBuilt)(context.root, context.projectName, context.targetName, dependencies)) {
10
+ return { success: false };
11
+ }
9
12
  const { buildTarget, ...targetOptions } = options;
10
13
  const delegateTarget = (0, devkit_1.parseTargetString)(buildTarget, context);
11
14
  yield* await (0, devkit_1.runExecutor)(delegateTarget, targetOptions, context);
@@ -31,7 +31,10 @@ function createLibraryExecutor(initializeNgPackagr) {
31
31
  if (angularMajorVersion < 18 && options.poll !== undefined) {
32
32
  throw new Error(`The "poll" option requires Angular version 18.0.0 or greater. You are currently using version ${angularVersion}.`);
33
33
  }
34
- const { dependencies } = (0, buildable_libs_utils_1.calculateProjectBuildableDependencies)(context.taskGraph, context.projectGraph, context.root, context.projectName, context.targetName, context.configurationName);
34
+ const { target, dependencies, topLevelDependencies } = (0, buildable_libs_utils_1.calculateProjectBuildableDependencies)(context.taskGraph, context.projectGraph, context.root, context.projectName, context.targetName, context.configurationName);
35
+ if (!(0, buildable_libs_utils_1.checkDependentProjectsHaveBeenBuilt)(context.root, context.projectName, context.targetName, dependencies)) {
36
+ return Promise.resolve({ success: false });
37
+ }
35
38
  if (options.watch) {
36
39
  return yield* (0, rxjs_for_await_1.eachValueFrom)((0, rxjs_1.from)(initializeNgPackagr(options, context, dependencies)).pipe((0, operators_1.switchMap)((packagr) => packagr.watch()), (0, operators_1.mapTo)({ success: true })));
37
40
  }
@@ -6,17 +6,12 @@ const log_show_project_command_1 = require("@nx/devkit/src/utils/log-show-projec
6
6
  const js_1 = require("@nx/js");
7
7
  const ts_solution_setup_1 = require("@nx/js/src/utils/typescript/ts-solution-setup");
8
8
  const init_1 = require("../init/init");
9
- const convert_to_rspack_1 = require("../convert-to-rspack/convert-to-rspack");
10
9
  const setup_ssr_1 = require("../setup-ssr/setup-ssr");
11
10
  const setup_tailwind_1 = require("../setup-tailwind/setup-tailwind");
12
11
  const ensure_angular_dependencies_1 = require("../utils/ensure-angular-dependencies");
13
12
  const lib_1 = require("./lib");
14
13
  async function applicationGenerator(tree, schema) {
15
14
  (0, ts_solution_setup_1.assertNotUsingTsSolutionSetup)(tree, 'angular', 'application');
16
- const isRspack = schema.bundler === 'rspack';
17
- if (isRspack) {
18
- schema.bundler = 'webpack';
19
- }
20
15
  const options = await (0, lib_1.normalizeOptions)(tree, schema);
21
16
  const rootOffset = (0, devkit_1.offsetFromRoot)(options.appProjectRoot);
22
17
  await (0, js_1.initGenerator)(tree, {
@@ -69,13 +64,6 @@ async function applicationGenerator(tree, schema) {
69
64
  serverRouting: options.serverRouting,
70
65
  });
71
66
  }
72
- if (isRspack) {
73
- await (0, convert_to_rspack_1.convertToRspack)(tree, {
74
- project: options.name,
75
- skipInstall: options.skipPackageJson,
76
- skipFormat: true,
77
- });
78
- }
79
67
  if (!options.skipFormat) {
80
68
  await (0, devkit_1.formatFiles)(tree);
81
69
  }
@@ -27,7 +27,7 @@ export interface Schema {
27
27
  standalone?: boolean;
28
28
  rootProject?: boolean;
29
29
  minimal?: boolean;
30
- bundler?: 'webpack' | 'esbuild' | 'rspack';
30
+ bundler?: 'webpack' | 'esbuild';
31
31
  ssr?: boolean;
32
32
  serverRouting?: boolean;
33
33
  nxCloudToken?: string;
@@ -171,7 +171,7 @@
171
171
  "bundler": {
172
172
  "description": "Bundler to use to build the application.",
173
173
  "type": "string",
174
- "enum": ["esbuild", "rspack", "webpack"],
174
+ "enum": ["esbuild", "webpack"],
175
175
  "default": "esbuild",
176
176
  "x-prompt": "Which bundler do you want to use to build the application?",
177
177
  "x-priority": "important"
@@ -307,7 +307,6 @@ async function convertToRspack(tree, schema) {
307
307
  if (!schema.skipInstall) {
308
308
  const installTask = (0, devkit_1.addDependenciesToPackageJson)(tree, {}, {
309
309
  '@nx/angular-rspack': versions_1.angularRspackVersion,
310
- 'ts-node': versions_1.tsNodeVersion,
311
310
  });
312
311
  tasks.push(installTask);
313
312
  }
@@ -4,7 +4,6 @@ exports.addProject = addProject;
4
4
  const devkit_1 = require("@nx/devkit");
5
5
  const target_defaults_utils_1 = require("@nx/devkit/src/generators/target-defaults-utils");
6
6
  const add_release_config_1 = require("@nx/js/src/generators/library/utils/add-release-config");
7
- const use_legacy_versioning_1 = require("nx/src/command-line/release/config/use-legacy-versioning");
8
7
  async function addProject(tree, libraryOptions) {
9
8
  const project = {
10
9
  name: libraryOptions.name,
@@ -37,8 +36,7 @@ async function addProject(tree, libraryOptions) {
37
36
  defaultConfiguration: 'production',
38
37
  };
39
38
  if (libraryOptions.publishable) {
40
- const nxJson = (0, devkit_1.readJson)(tree, 'nx.json');
41
- await (0, add_release_config_1.addReleaseConfigForNonTsSolution)((0, use_legacy_versioning_1.shouldUseLegacyVersioning)(nxJson.release), tree, libraryOptions.name, project);
39
+ await (0, add_release_config_1.addReleaseConfigForNonTsSolution)(tree, libraryOptions.name, project);
42
40
  }
43
41
  }
44
42
  (0, devkit_1.addProjectConfiguration)(tree, libraryOptions.name, project);