@nx/angular 17.2.0-beta.11 → 17.2.0-beta.12

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": "17.2.0-beta.11",
3
+ "version": "17.2.0-beta.12",
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, 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- Upgrading AngularJS applications \n\n- Single Component Application Modules (SCAMs) \n\n- NgRx helpers. \n\n- Utilities for automatic workspace refactoring.",
6
6
  "repository": {
@@ -78,15 +78,15 @@
78
78
  "tslib": "^2.3.0",
79
79
  "webpack": "^5.80.0",
80
80
  "webpack-merge": "^5.8.0",
81
- "@nx/devkit": "17.2.0-beta.11",
82
- "@nx/cypress": "17.2.0-beta.11",
83
- "@nx/jest": "17.2.0-beta.11",
84
- "@nx/js": "17.2.0-beta.11",
85
- "@nx/eslint": "17.2.0-beta.11",
86
- "@nx/webpack": "17.2.0-beta.11",
87
- "@nx/web": "17.2.0-beta.11",
88
- "@nx/workspace": "17.2.0-beta.11",
89
- "@nrwl/angular": "17.2.0-beta.11"
81
+ "@nx/devkit": "17.2.0-beta.12",
82
+ "@nx/cypress": "17.2.0-beta.12",
83
+ "@nx/jest": "17.2.0-beta.12",
84
+ "@nx/js": "17.2.0-beta.12",
85
+ "@nx/eslint": "17.2.0-beta.12",
86
+ "@nx/webpack": "17.2.0-beta.12",
87
+ "@nx/web": "17.2.0-beta.12",
88
+ "@nx/workspace": "17.2.0-beta.12",
89
+ "@nrwl/angular": "17.2.0-beta.12"
90
90
  },
91
91
  "peerDependencies": {
92
92
  "@angular-devkit/build-angular": ">= 15.0.0 < 18.0.0",
@@ -7,6 +7,7 @@ const webpack_nx_build_coordination_plugin_1 = require("@nx/webpack/src/plugins/
7
7
  const fs_1 = require("fs");
8
8
  const operators_1 = require("nx/src/project-graph/operators");
9
9
  const project_graph_1 = require("nx/src/project-graph/project-graph");
10
+ const path_1 = require("path");
10
11
  const rxjs_1 = require("rxjs");
11
12
  const operators_2 = require("rxjs/operators");
12
13
  const angular_version_utils_1 = require("../../executors/utilities/angular-version-utils");
@@ -56,6 +57,7 @@ function executeDevServerBuilder(rawOptions, context) {
56
57
  target: parsedBuildTarget.target,
57
58
  });
58
59
  dependencies = foundDependencies;
60
+ const relativeTsConfigPath = (0, devkit_1.normalizePath)((0, path_1.relative)(context.workspaceRoot, tsConfigPath));
59
61
  // We can't just pass the tsconfig path in memory to the angular builder
60
62
  // function because we can't pass the build target options to it, the build
61
63
  // targets options will be retrieved by the builder from the project
@@ -65,14 +67,14 @@ function executeDevServerBuilder(rawOptions, context) {
65
67
  const originalGetTargetOptions = context.getTargetOptions;
66
68
  context.getTargetOptions = async (target) => {
67
69
  const options = await originalGetTargetOptions(target);
68
- options.tsConfig = tsConfigPath;
70
+ options.tsConfig = relativeTsConfigPath;
69
71
  return options;
70
72
  };
71
73
  // The buildTargetConfiguration also needs to use the generated tsconfig path
72
74
  // otherwise the build will fail if customWebpack function/file is referencing
73
75
  // local libs. This synchronize the behavior with webpack-browser and
74
76
  // webpack-server implementation.
75
- buildTargetOptions.tsConfig = tsConfigPath;
77
+ buildTargetOptions.tsConfig = relativeTsConfigPath;
76
78
  }
77
79
  const delegateBuilderOptions = getDelegateBuilderOptions(options);
78
80
  const isUsingWebpackBuilder = ![
@@ -7,6 +7,7 @@ const fs_1 = require("fs");
7
7
  const configuration_1 = require("nx/src/config/configuration");
8
8
  const operators_1 = require("nx/src/project-graph/operators");
9
9
  const utils_1 = require("nx/src/tasks-runner/utils");
10
+ const path_1 = require("path");
10
11
  const rxjs_1 = require("rxjs");
11
12
  const operators_2 = require("rxjs/operators");
12
13
  const buildable_libs_1 = require("../utilities/buildable-libs");
@@ -40,7 +41,7 @@ function executeWebpackBrowserBuilder(options, context) {
40
41
  projectGraph = (0, devkit_1.readCachedProjectGraph)();
41
42
  const { tsConfigPath, dependencies: foundDependencies } = (0, buildable_libs_1.createTmpTsConfigForBuildableLibs)(delegateBuilderOptions.tsConfig, context, { projectGraph });
42
43
  dependencies = foundDependencies;
43
- delegateBuilderOptions.tsConfig = tsConfigPath;
44
+ delegateBuilderOptions.tsConfig = (0, devkit_1.normalizePath)((0, path_1.relative)(context.workspaceRoot, tsConfigPath));
44
45
  }
45
46
  return (0, rxjs_1.from)(Promise.resolve().then(() => require('@angular-devkit/build-angular'))).pipe((0, operators_2.switchMap)(({ executeBrowserBuilder }) => executeBrowserBuilder(delegateBuilderOptions, context, {
46
47
  webpackConfiguration: (baseWebpackConfig) => {
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.executeWebpackServerBuilder = void 0;
4
4
  const devkit_1 = require("@nx/devkit");
5
5
  const fs_1 = require("fs");
6
+ const path_1 = require("path");
6
7
  const rxjs_1 = require("rxjs");
7
8
  const operators_1 = require("rxjs/operators");
8
9
  const buildable_libs_1 = require("../utilities/buildable-libs");
@@ -50,7 +51,7 @@ function executeWebpackServerBuilder(options, context) {
50
51
  options.buildLibsFromSource ??= true;
51
52
  if (!options.buildLibsFromSource) {
52
53
  const { tsConfigPath } = (0, buildable_libs_1.createTmpTsConfigForBuildableLibs)(options.tsConfig, context);
53
- options.tsConfig = tsConfigPath;
54
+ options.tsConfig = (0, devkit_1.normalizePath)((0, path_1.relative)(context.workspaceRoot, tsConfigPath));
54
55
  }
55
56
  return buildServerApp(options, context);
56
57
  }
@@ -62,6 +62,9 @@ async function* moduleFederationDevServerExecutor(schema, context) {
62
62
  if (remotePort >= portToUse) {
63
63
  return remotePort + 1;
64
64
  }
65
+ else {
66
+ return portToUse;
67
+ }
65
68
  }, options.staticRemotesPort);
66
69
  }
67
70
  await (0, lib_1.buildStaticRemotes)(remotes, nxBin, context, options);