@nx/angular 20.2.0-canary.20241113-cda7f26 → 20.2.0-canary.20241115-3c6c387

Sign up to get free protection for your applications and to get access to all the features.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nx/angular",
3
- "version": "20.2.0-canary.20241113-cda7f26",
3
+ "version": "20.2.0-canary.20241115-3c6c387",
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": {
@@ -80,12 +80,12 @@
80
80
  "webpack-merge": "^5.8.0",
81
81
  "webpack": "^5.88.0",
82
82
  "@module-federation/enhanced": "0.6.9",
83
- "@nx/devkit": "20.2.0-canary.20241113-cda7f26",
84
- "@nx/js": "20.2.0-canary.20241113-cda7f26",
85
- "@nx/eslint": "20.2.0-canary.20241113-cda7f26",
86
- "@nx/webpack": "20.2.0-canary.20241113-cda7f26",
87
- "@nx/web": "20.2.0-canary.20241113-cda7f26",
88
- "@nx/workspace": "20.2.0-canary.20241113-cda7f26",
83
+ "@nx/devkit": "20.2.0-canary.20241115-3c6c387",
84
+ "@nx/js": "20.2.0-canary.20241115-3c6c387",
85
+ "@nx/eslint": "20.2.0-canary.20241115-3c6c387",
86
+ "@nx/webpack": "20.2.0-canary.20241115-3c6c387",
87
+ "@nx/web": "20.2.0-canary.20241115-3c6c387",
88
+ "@nx/workspace": "20.2.0-canary.20241115-3c6c387",
89
89
  "piscina": "^4.4.0"
90
90
  },
91
91
  "peerDependencies": {
@@ -154,7 +154,6 @@
154
154
  },
155
155
  "optimization": {
156
156
  "description": "Enables optimization of the build output. Including minification of scripts and styles, tree-shaking, dead-code elimination, inlining of critical CSS and fonts inlining. For more information, see https://angular.dev/reference/configs/workspace-config#optimization-configuration.",
157
- "x-user-analytics": 16,
158
157
  "default": true,
159
158
  "oneOf": [
160
159
  {
@@ -238,7 +237,6 @@
238
237
  "aot": {
239
238
  "type": "boolean",
240
239
  "description": "Build using Ahead of Time compilation.",
241
- "x-user-analytics": 13,
242
240
  "default": true
243
241
  },
244
242
  "sourceMap": {
@@ -47,7 +47,6 @@
47
47
  "optimization": {
48
48
  "description": "Enables optimization of the build output. Including minification of scripts and styles, tree-shaking and dead-code elimination. For more information, see https://angular.dev/reference/configs/workspace-config#optimization-configuration.",
49
49
  "default": true,
50
- "x-user-analytics": "ep.ng_optimization",
51
50
  "oneOf": [
52
51
  {
53
52
  "type": "object",
@@ -147,7 +147,6 @@
147
147
  "optimization": {
148
148
  "description": "Enables optimization of the build output. Including minification of scripts and styles, tree-shaking, dead-code elimination, inlining of critical CSS and fonts inlining. For more information, see https://angular.dev/reference/configs/workspace-config#optimization-configuration.",
149
149
  "default": true,
150
- "x-user-analytics": "ep.ng_optimization",
151
150
  "oneOf": [
152
151
  {
153
152
  "type": "object",
@@ -277,7 +276,6 @@
277
276
  "aot": {
278
277
  "type": "boolean",
279
278
  "description": "Build using Ahead of Time compilation.",
280
- "x-user-analytics": "ep.ng_aot",
281
279
  "default": true
282
280
  },
283
281
  "sourceMap": {
@@ -143,7 +143,6 @@
143
143
  "optimization": {
144
144
  "description": "Enables optimization of the build output. Including minification of scripts and styles, tree-shaking, dead-code elimination, inlining of critical CSS and fonts inlining. For more information, see https://angular.dev/reference/configs/workspace-config#optimization-configuration.",
145
145
  "default": true,
146
- "x-user-analytics": "ep.ng_optimization",
147
146
  "oneOf": [
148
147
  {
149
148
  "type": "object",
@@ -225,7 +224,6 @@
225
224
  "aot": {
226
225
  "type": "boolean",
227
226
  "description": "Build using Ahead of Time compilation.",
228
- "x-user-analytics": "ep.ng_aot",
229
227
  "default": true
230
228
  },
231
229
  "sourceMap": {
@@ -33,6 +33,10 @@
33
33
  "description": "Whether to run a build when any file changes.",
34
34
  "default": false
35
35
  },
36
+ "poll": {
37
+ "type": "number",
38
+ "description": "Enable and define the file watching poll time period in milliseconds. _Note: this is only supported in Angular versions >= 18.0.0_."
39
+ },
36
40
  "tailwindConfig": {
37
41
  "type": "string",
38
42
  "description": "The full path for the Tailwind configuration file, relative to the workspace root. If not provided and a `tailwind.config.js` file exists in the project or workspace root, it will be used. Otherwise, Tailwind will not be configured."
@@ -7,6 +7,7 @@ const buildable_libs_utils_1 = require("@nx/js/src/utils/buildable-libs-utils");
7
7
  const path_1 = require("path");
8
8
  const rxjs_1 = require("rxjs");
9
9
  const operators_1 = require("rxjs/operators");
10
+ const angular_version_utils_1 = require("../utilities/angular-version-utils");
10
11
  const typescript_1 = require("../utilities/typescript");
11
12
  const ng_packagr_1 = require("./ng-packagr-adjustments/ng-packagr");
12
13
  async function initializeNgPackagr(options, context, projectDependencies) {
@@ -26,6 +27,10 @@ async function initializeNgPackagr(options, context, projectDependencies) {
26
27
  */
27
28
  function createLibraryExecutor(initializeNgPackagr) {
28
29
  return async function* (options, context) {
30
+ const { major: angularMajorVersion, version: angularVersion } = (0, angular_version_utils_1.getInstalledAngularVersionInfo)();
31
+ if (angularMajorVersion < 18 && options.poll !== undefined) {
32
+ throw new Error(`The "poll" option requires Angular version 18.0.0 or greater. You are currently using version ${angularVersion}.`);
33
+ }
29
34
  const { target, dependencies, topLevelDependencies } = (0, buildable_libs_utils_1.calculateProjectBuildableDependencies)(context.taskGraph, context.projectGraph, context.root, context.projectName, context.targetName, context.configurationName);
30
35
  if (!(0, buildable_libs_utils_1.checkDependentProjectsHaveBeenBuilt)(context.root, context.projectName, context.targetName, dependencies)) {
31
36
  return Promise.resolve({ success: false });
@@ -1,6 +1,6 @@
1
- export interface BuildAngularLibraryExecutorOptions {
2
- project: string;
1
+ import type { NgPackagrBuilderOptions } from '@angular-devkit/build-angular';
2
+
3
+ export interface BuildAngularLibraryExecutorOptions
4
+ extends NgPackagrBuilderOptions {
3
5
  tailwindConfig?: string;
4
- tsConfig?: string;
5
- watch?: boolean;
6
6
  }
@@ -33,6 +33,10 @@
33
33
  "description": "Whether to run a build when any file changes.",
34
34
  "default": false
35
35
  },
36
+ "poll": {
37
+ "type": "number",
38
+ "description": "Enable and define the file watching poll time period in milliseconds. _Note: this is only supported in Angular versions >= 18.0.0_."
39
+ },
36
40
  "tailwindConfig": {
37
41
  "type": "string",
38
42
  "description": "The full path for the Tailwind configuration file, relative to the workspace root. If not provided and a `tailwind.config.js` file exists in the project or workspace root, it will be used. Otherwise, Tailwind will not be configured. _Note: starting with Angular v17, this option is no longer used and the configuration will be picked up if exists at the project or workspace root_.",