@nx/angular 21.5.0-canary.20250821-4ba2085 → 21.5.0-canary.20250823-a93e74e

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nx/angular",
3
- "version": "21.5.0-canary.20250821-4ba2085",
3
+ "version": "21.5.0-canary.20250823-a93e74e",
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": {
@@ -58,14 +58,14 @@
58
58
  "migrations": "./migrations.json"
59
59
  },
60
60
  "dependencies": {
61
- "@nx/devkit": "21.5.0-canary.20250821-4ba2085",
62
- "@nx/eslint": "21.5.0-canary.20250821-4ba2085",
63
- "@nx/js": "21.5.0-canary.20250821-4ba2085",
64
- "@nx/module-federation": "21.5.0-canary.20250821-4ba2085",
65
- "@nx/rspack": "21.5.0-canary.20250821-4ba2085",
66
- "@nx/web": "21.5.0-canary.20250821-4ba2085",
67
- "@nx/webpack": "21.5.0-canary.20250821-4ba2085",
68
- "@nx/workspace": "21.5.0-canary.20250821-4ba2085",
61
+ "@nx/devkit": "21.5.0-canary.20250823-a93e74e",
62
+ "@nx/eslint": "21.5.0-canary.20250823-a93e74e",
63
+ "@nx/js": "21.5.0-canary.20250823-a93e74e",
64
+ "@nx/module-federation": "21.5.0-canary.20250823-a93e74e",
65
+ "@nx/rspack": "21.5.0-canary.20250823-a93e74e",
66
+ "@nx/web": "21.5.0-canary.20250823-a93e74e",
67
+ "@nx/webpack": "21.5.0-canary.20250823-a93e74e",
68
+ "@nx/workspace": "21.5.0-canary.20250823-a93e74e",
69
69
  "@phenomnomnominal/tsquery": "~5.0.1",
70
70
  "@typescript-eslint/type-utils": "^8.0.0",
71
71
  "enquirer": "~2.3.6",
@@ -1 +1 @@
1
- {"version":3,"file":"dev-server.impl.d.ts","sourceRoot":"","sources":["../../../../../../packages/angular/src/builders/dev-server/dev-server.impl.ts"],"names":[],"mappings":"AAkCA,OAAO,KAAK,EAAoB,MAAM,EAAE,MAAM,UAAU,CAAC;AAWzD,wBAAgB,uBAAuB,CACrC,UAAU,EAAE,MAAM,EAClB,OAAO,EAAE,OAAO,2BAA2B,EAAE,cAAc,6FAsM5D;wBAII,GAAG;AAFR,wBAES"}
1
+ {"version":3,"file":"dev-server.impl.d.ts","sourceRoot":"","sources":["../../../../../../packages/angular/src/builders/dev-server/dev-server.impl.ts"],"names":[],"mappings":"AAkCA,OAAO,KAAK,EAAoB,MAAM,EAAE,MAAM,UAAU,CAAC;AAYzD,wBAAgB,uBAAuB,CACrC,UAAU,EAAE,MAAM,EAClB,OAAO,EAAE,OAAO,2BAA2B,EAAE,cAAc,6FAsM5D;wBAII,GAAG;AAFR,wBAES"}
@@ -153,7 +153,8 @@ function executeDevServerBuilder(rawOptions, context) {
153
153
  // run the target for all projects.
154
154
  // This will occur when workspaceDependencies = []
155
155
  if (workspaceDependencies.length > 0) {
156
- baseWebpackConfig.plugins.push(new webpack_nx_build_coordination_plugin_1.WebpackNxBuildCoordinationPlugin(`nx run-many --target=${parsedBuildTarget.target} --projects=${workspaceDependencies.join(',')}`, { skipWatchingDeps: !options.watchDependencies }));
156
+ baseWebpackConfig.plugins.push(new webpack_nx_build_coordination_plugin_1.WebpackNxBuildCoordinationPlugin(`nx run-many --target=${parsedBuildTarget.target} --projects=${workspaceDependencies.join(',')}`, { skipWatchingDeps: !options.watchDependencies }) // TODO(Colum): this can be removed when angular 20.2 is merged
157
+ );
157
158
  }
158
159
  }
159
160
  if (!pathToWebpackConfig) {
@@ -1 +1 @@
1
- {"version":3,"file":"webpack-browser.impl.d.ts","sourceRoot":"","sources":["../../../../../../packages/angular/src/builders/webpack-browser/webpack-browser.impl.ts"],"names":[],"mappings":"AAaA,OAAO,EAAQ,UAAU,EAAE,MAAM,MAAM,CAAC;AAQxC,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAC;AA4BrD,wBAAgB,4BAA4B,CAC1C,OAAO,EAAE,oBAAoB,EAC7B,OAAO,EAAE,OAAO,2BAA2B,EAAE,cAAc,GAC1D,UAAU,CAAC,OAAO,2BAA2B,EAAE,aAAa,CAAC,CAwG/D;wBAII,GAAG;AAFR,wBAES"}
1
+ {"version":3,"file":"webpack-browser.impl.d.ts","sourceRoot":"","sources":["../../../../../../packages/angular/src/builders/webpack-browser/webpack-browser.impl.ts"],"names":[],"mappings":"AAaA,OAAO,EAAQ,UAAU,EAAE,MAAM,MAAM,CAAC;AAQxC,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAC;AA+CrD,wBAAgB,4BAA4B,CAC1C,OAAO,EAAE,oBAAoB,EAC7B,OAAO,EAAE,OAAO,2BAA2B,EAAE,cAAc,GAC1D,UAAU,CAAC,OAAO,2BAA2B,EAAE,aAAa,CAAC,CAwG/D;wBAII,GAAG;AAFR,wBAES"}
@@ -45,6 +45,22 @@ const operators_2 = require("rxjs/operators");
45
45
  const builder_package_1 = require("../../executors/utilities/builder-package");
46
46
  const buildable_libs_1 = require("../utilities/buildable-libs");
47
47
  const webpack_1 = require("../utilities/webpack");
48
+ // This is required to ensure that the webpack version used by the Module Federation is the same as the one used by the builders.
49
+ const Module = require('module');
50
+ const originalResolveFilename = Module._resolveFilename;
51
+ const patchedWebpackPath = require.resolve('webpack', {
52
+ paths: [require.resolve('@angular-devkit/build-angular')],
53
+ });
54
+ // Override the resolve function
55
+ Module._resolveFilename = function (request, parent, isMain, options) {
56
+ // Intercept webpack specifically
57
+ if (request === 'webpack') {
58
+ // Force webpack to resolve from your specific path
59
+ return patchedWebpackPath;
60
+ }
61
+ // For all other modules, use the original resolver
62
+ return originalResolveFilename.call(this, request, parent, isMain, options);
63
+ };
48
64
  function shouldSkipInitialTargetRun(projectGraph, project, target) {
49
65
  const allTargetNames = new Set();
50
66
  for (const projectName in projectGraph.nodes) {
@@ -1 +1 @@
1
- {"version":3,"file":"webpack-server.impl.d.ts","sourceRoot":"","sources":["../../../../../../packages/angular/src/builders/webpack-server/webpack-server.impl.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAChE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,+BAA+B,CAAC;AAQzE,OAAO,EAAE,UAAU,EAAQ,MAAM,MAAM,CAAC;AAKxC,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAgFlC,wBAAgB,2BAA2B,CACzC,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,cAAc,GACtB,UAAU,CAAC,mBAAmB,CAAC,CAiBjC;wBAII,GAAG;AAFR,wBAES"}
1
+ {"version":3,"file":"webpack-server.impl.d.ts","sourceRoot":"","sources":["../../../../../../packages/angular/src/builders/webpack-server/webpack-server.impl.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAChE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,+BAA+B,CAAC;AAQzE,OAAO,EAAE,UAAU,EAAQ,MAAM,MAAM,CAAC;AAKxC,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAmGlC,wBAAgB,2BAA2B,CACzC,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,cAAc,GACtB,UAAU,CAAC,mBAAmB,CAAC,CAiBjC;wBAII,GAAG;AAFR,wBAES"}
@@ -42,6 +42,22 @@ const operators_1 = require("rxjs/operators");
42
42
  const builder_package_1 = require("../../executors/utilities/builder-package");
43
43
  const buildable_libs_1 = require("../utilities/buildable-libs");
44
44
  const webpack_1 = require("../utilities/webpack");
45
+ // This is required to ensure that the webpack version used by the Module Federation is the same as the one used by the builders.
46
+ const Module = require('module');
47
+ const originalResolveFilename = Module._resolveFilename;
48
+ const patchedWebpackPath = require.resolve('webpack', {
49
+ paths: [require.resolve('@angular-devkit/build-angular')],
50
+ });
51
+ // Override the resolve function
52
+ Module._resolveFilename = function (request, parent, isMain, options) {
53
+ // Intercept webpack specifically
54
+ if (request === 'webpack') {
55
+ // Force webpack to resolve from your specific path
56
+ return patchedWebpackPath;
57
+ }
58
+ // For all other modules, use the original resolver
59
+ return originalResolveFilename.call(this, request, parent, isMain, options);
60
+ };
45
61
  function buildServerApp(options, context) {
46
62
  (0, builder_package_1.assertBuilderPackageIsInstalled)('@angular-devkit/build-angular');
47
63
  const { buildLibsFromSource, customWebpackConfig, ...delegateOptions } = options;
@@ -1 +1 @@
1
- {"version":3,"file":"module-federation-dev-server.impl.d.ts","sourceRoot":"","sources":["../../../../../../packages/angular/src/executors/module-federation-dev-server/module-federation-dev-server.impl.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,eAAe,EAGrB,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,KAAK,MAAM,EAAE,MAAM,UAAU,CAAC;AAoBvC,wBAAuB,iCAAiC,CACtD,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,eAAe,iCAgIzB;AAED,eAAe,iCAAiC,CAAC"}
1
+ {"version":3,"file":"module-federation-dev-server.impl.d.ts","sourceRoot":"","sources":["../../../../../../packages/angular/src/executors/module-federation-dev-server/module-federation-dev-server.impl.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,eAAe,EAGrB,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,KAAK,MAAM,EAAE,MAAM,UAAU,CAAC;AAwCvC,wBAAuB,iCAAiC,CACtD,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,eAAe,iCAgIzB;AAED,eAAe,iCAAiC,CAAC"}
@@ -14,6 +14,22 @@ const dev_server_impl_1 = require("../../builders/dev-server/dev-server.impl");
14
14
  const module_federation_1 = require("../../builders/utilities/module-federation");
15
15
  const path_1 = require("path");
16
16
  const fs_1 = require("fs");
17
+ // This is required to ensure that the webpack version used by the Module Federation is the same as the one used by the builders.
18
+ const Module = require('module');
19
+ const originalResolveFilename = Module._resolveFilename;
20
+ const patchedWebpackPath = require.resolve('webpack', {
21
+ paths: [require.resolve('@angular-devkit/build-angular')],
22
+ });
23
+ // Override the resolve function
24
+ Module._resolveFilename = function (request, parent, isMain, options) {
25
+ // Intercept webpack specifically
26
+ if (request === 'webpack') {
27
+ // Force webpack to resolve from your specific path
28
+ return patchedWebpackPath;
29
+ }
30
+ // For all other modules, use the original resolver
31
+ return originalResolveFilename.call(this, request, parent, isMain, options);
32
+ };
17
33
  async function* moduleFederationDevServerExecutor(schema, context) {
18
34
  const options = (0, lib_1.normalizeOptions)(schema);
19
35
  const { projects: workspaceProjects } = (0, devkit_1.readProjectsConfigurationFromProjectGraph)(context.projectGraph);
@@ -1 +1 @@
1
- {"version":3,"file":"module-federation-ssr-dev-server.impl.d.ts","sourceRoot":"","sources":["../../../../../../packages/angular/src/executors/module-federation-ssr-dev-server/module-federation-ssr-dev-server.impl.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,eAAe,EAAU,MAAM,YAAY,CAAC;AAoB1D,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAEvC,wBAAuB,oCAAoC,CACzD,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,eAAe,+FA4HzB;AAED,eAAe,oCAAoC,CAAC"}
1
+ {"version":3,"file":"module-federation-ssr-dev-server.impl.d.ts","sourceRoot":"","sources":["../../../../../../packages/angular/src/executors/module-federation-ssr-dev-server/module-federation-ssr-dev-server.impl.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,eAAe,EAAU,MAAM,YAAY,CAAC;AAoB1D,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAsBvC,wBAAuB,oCAAoC,CACzD,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,eAAe,+FA4HzB;AAED,eAAe,oCAAoC,CAAC"}
@@ -47,6 +47,22 @@ const module_federation_1 = require("../../builders/utilities/module-federation"
47
47
  const builder_package_1 = require("../utilities/builder-package");
48
48
  const normalize_options_1 = require("./lib/normalize-options");
49
49
  const start_dev_remotes_1 = require("./lib/start-dev-remotes");
50
+ // This is required to ensure that the webpack version used by the Module Federation is the same as the one used by the builders.
51
+ const Module = require('module');
52
+ const originalResolveFilename = Module._resolveFilename;
53
+ const patchedWebpackPath = require.resolve('webpack', {
54
+ paths: [require.resolve('@angular-devkit/build-angular')],
55
+ });
56
+ // Override the resolve function
57
+ Module._resolveFilename = function (request, parent, isMain, options) {
58
+ // Intercept webpack specifically
59
+ if (request === 'webpack') {
60
+ // Force webpack to resolve from your specific path
61
+ return patchedWebpackPath;
62
+ }
63
+ // For all other modules, use the original resolver
64
+ return originalResolveFilename.call(this, request, parent, isMain, options);
65
+ };
50
66
  async function* moduleFederationSsrDevServerExecutor(schema, context) {
51
67
  const options = (0, normalize_options_1.normalizeOptions)(schema);
52
68
  (0, builder_package_1.assertBuilderPackageIsInstalled)('@angular-devkit/build-angular');
@@ -1 +1 @@
1
- {"version":3,"file":"set-tsconfig-option.d.ts","sourceRoot":"","sources":["../../../../../../packages/angular/src/migrations/update-21-5-0/set-tsconfig-option.ts"],"names":[],"mappings":"AAAA,OAAO,EAOL,KAAK,IAAI,EACV,MAAM,YAAY,CAAC;AAUpB,yBAA+B,IAAI,EAAE,IAAI,iBAoBxC"}
1
+ {"version":3,"file":"set-tsconfig-option.d.ts","sourceRoot":"","sources":["../../../../../../packages/angular/src/migrations/update-21-5-0/set-tsconfig-option.ts"],"names":[],"mappings":"AAAA,OAAO,EAOL,KAAK,IAAI,EACV,MAAM,YAAY,CAAC;AAUpB,yBAA+B,IAAI,EAAE,IAAI,iBAwBxC"}
@@ -17,10 +17,14 @@ async function default_1(tree) {
17
17
  try {
18
18
  // we're only updating static project configurations, not inferred ones
19
19
  const projectConfig = (0, devkit_1.readProjectConfiguration)(tree, project.name);
20
+ let wasUpdated = false;
20
21
  for (const target of relevantTargets(projectConfig)) {
21
22
  updateTarget(tree, projectConfig, target);
23
+ wasUpdated = true;
24
+ }
25
+ if (wasUpdated) {
26
+ (0, devkit_1.updateProjectConfiguration)(tree, project.name, projectConfig);
22
27
  }
23
- (0, devkit_1.updateProjectConfiguration)(tree, project.name, projectConfig);
24
28
  }
25
29
  catch {
26
30
  // ignore, it can happen if the project is fully inferred and there's no