@nx/angular 22.6.0-beta.5 → 22.6.0-beta.7

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
@@ -2241,6 +2241,164 @@
2241
2241
  "alwaysAddToPackageJson": false
2242
2242
  }
2243
2243
  }
2244
+ },
2245
+ "22.6.0-angular-eslint": {
2246
+ "version": "22.6.0-beta.6",
2247
+ "requires": {
2248
+ "@angular/core": ">= 21.0.0 < 22.0.0",
2249
+ "typescript-eslint": "^8.0.0",
2250
+ "eslint": "^8.57.0 || ^9.0.0"
2251
+ },
2252
+ "packages": {
2253
+ "angular-eslint": {
2254
+ "version": "^21.2.0",
2255
+ "alwaysAddToPackageJson": false
2256
+ },
2257
+ "@angular-eslint/eslint-plugin": {
2258
+ "version": "^21.2.0",
2259
+ "alwaysAddToPackageJson": false
2260
+ },
2261
+ "@angular-eslint/eslint-plugin-template": {
2262
+ "version": "^21.2.0",
2263
+ "alwaysAddToPackageJson": false
2264
+ },
2265
+ "@angular-eslint/template-parser": {
2266
+ "version": "^21.2.0",
2267
+ "alwaysAddToPackageJson": false
2268
+ },
2269
+ "@angular-eslint/utils": {
2270
+ "version": "^21.2.0",
2271
+ "alwaysAddToPackageJson": false
2272
+ },
2273
+ "@angular-eslint/schematics": {
2274
+ "version": "^21.2.0",
2275
+ "alwaysAddToPackageJson": false
2276
+ },
2277
+ "@angular-eslint/test-utils": {
2278
+ "version": "^21.2.0",
2279
+ "alwaysAddToPackageJson": false
2280
+ },
2281
+ "@angular-eslint/builder": {
2282
+ "version": "^21.2.0",
2283
+ "alwaysAddToPackageJson": false
2284
+ },
2285
+ "@angular-eslint/bundled-angular-compiler": {
2286
+ "version": "^21.2.0",
2287
+ "alwaysAddToPackageJson": false
2288
+ }
2289
+ }
2290
+ },
2291
+ "22.6.0-@angular-eslint": {
2292
+ "version": "22.6.0-beta.6",
2293
+ "requires": {
2294
+ "@angular/core": ">= 21.0.0 < 22.0.0",
2295
+ "eslint": "^8.57.0 || ^9.0.0"
2296
+ },
2297
+ "packages": {
2298
+ "@angular-eslint/eslint-plugin": {
2299
+ "version": "^21.2.0",
2300
+ "alwaysAddToPackageJson": false
2301
+ },
2302
+ "@angular-eslint/eslint-plugin-template": {
2303
+ "version": "^21.2.0",
2304
+ "alwaysAddToPackageJson": false
2305
+ },
2306
+ "@angular-eslint/template-parser": {
2307
+ "version": "^21.2.0",
2308
+ "alwaysAddToPackageJson": false
2309
+ },
2310
+ "@angular-eslint/utils": {
2311
+ "version": "^21.2.0",
2312
+ "alwaysAddToPackageJson": false
2313
+ },
2314
+ "@angular-eslint/schematics": {
2315
+ "version": "^21.2.0",
2316
+ "alwaysAddToPackageJson": false
2317
+ },
2318
+ "@angular-eslint/test-utils": {
2319
+ "version": "^21.2.0",
2320
+ "alwaysAddToPackageJson": false
2321
+ },
2322
+ "@angular-eslint/builder": {
2323
+ "version": "^21.2.0",
2324
+ "alwaysAddToPackageJson": false
2325
+ },
2326
+ "@angular-eslint/bundled-angular-compiler": {
2327
+ "version": "^21.2.0",
2328
+ "alwaysAddToPackageJson": false
2329
+ }
2330
+ }
2331
+ },
2332
+ "22.6.0": {
2333
+ "version": "22.6.0-beta.6",
2334
+ "x-prompt": "Do you want to update the Angular version to v21.2?",
2335
+ "requires": {
2336
+ "@angular/core": ">=21.1.0 <21.2.0"
2337
+ },
2338
+ "packages": {
2339
+ "@angular/cli": {
2340
+ "version": "~21.2.0",
2341
+ "alwaysAddToPackageJson": false,
2342
+ "ignorePackageGroup": true,
2343
+ "ignoreMigrations": true
2344
+ },
2345
+ "@angular-devkit/build-angular": {
2346
+ "version": "~21.2.0",
2347
+ "alwaysAddToPackageJson": false
2348
+ },
2349
+ "@angular-devkit/core": {
2350
+ "version": "~21.2.0",
2351
+ "alwaysAddToPackageJson": false
2352
+ },
2353
+ "@angular-devkit/schematics": {
2354
+ "version": "~21.2.0",
2355
+ "alwaysAddToPackageJson": false
2356
+ },
2357
+ "@angular/build": {
2358
+ "version": "~21.2.0",
2359
+ "alwaysAddToPackageJson": false
2360
+ },
2361
+ "@angular/pwa": {
2362
+ "version": "~21.2.0",
2363
+ "alwaysAddToPackageJson": false
2364
+ },
2365
+ "@angular/ssr": {
2366
+ "version": "~21.2.0",
2367
+ "alwaysAddToPackageJson": false
2368
+ },
2369
+ "@schematics/angular": {
2370
+ "version": "~21.2.0",
2371
+ "alwaysAddToPackageJson": false
2372
+ },
2373
+ "@angular-devkit/architect": {
2374
+ "version": "~0.2102.0",
2375
+ "alwaysAddToPackageJson": false
2376
+ },
2377
+ "@angular-devkit/build-webpack": {
2378
+ "version": "~0.2102.0",
2379
+ "alwaysAddToPackageJson": false
2380
+ },
2381
+ "@angular/core": {
2382
+ "version": "~21.2.0",
2383
+ "alwaysAddToPackageJson": true
2384
+ },
2385
+ "@angular/material": {
2386
+ "version": "~21.2.0",
2387
+ "alwaysAddToPackageJson": false
2388
+ },
2389
+ "@angular/cdk": {
2390
+ "version": "~21.2.0",
2391
+ "alwaysAddToPackageJson": false
2392
+ },
2393
+ "@angular/google-maps": {
2394
+ "version": "~21.2.0",
2395
+ "alwaysAddToPackageJson": false
2396
+ },
2397
+ "ng-packagr": {
2398
+ "version": "~21.2.0",
2399
+ "alwaysAddToPackageJson": false
2400
+ }
2401
+ }
2244
2402
  }
2245
2403
  }
2246
2404
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nx/angular",
3
- "version": "22.6.0-beta.5",
3
+ "version": "22.6.0-beta.7",
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": {
@@ -62,14 +62,14 @@
62
62
  "migrations": "./migrations.json"
63
63
  },
64
64
  "dependencies": {
65
- "@nx/devkit": "22.6.0-beta.5",
66
- "@nx/eslint": "22.6.0-beta.5",
67
- "@nx/js": "22.6.0-beta.5",
68
- "@nx/module-federation": "22.6.0-beta.5",
69
- "@nx/rspack": "22.6.0-beta.5",
70
- "@nx/web": "22.6.0-beta.5",
71
- "@nx/webpack": "22.6.0-beta.5",
72
- "@nx/workspace": "22.6.0-beta.5",
65
+ "@nx/devkit": "22.6.0-beta.7",
66
+ "@nx/eslint": "22.6.0-beta.7",
67
+ "@nx/js": "22.6.0-beta.7",
68
+ "@nx/module-federation": "22.6.0-beta.7",
69
+ "@nx/rspack": "22.6.0-beta.7",
70
+ "@nx/web": "22.6.0-beta.7",
71
+ "@nx/webpack": "22.6.0-beta.7",
72
+ "@nx/workspace": "22.6.0-beta.7",
73
73
  "@phenomnomnominal/tsquery": "~6.1.4",
74
74
  "@typescript-eslint/type-utils": "^8.0.0",
75
75
  "enquirer": "~2.3.6",
@@ -54,6 +54,14 @@
54
54
  "type": "object",
55
55
  "additionalProperties": false,
56
56
  "properties": {
57
+ "allowedHosts": {
58
+ "description": "A list of hostnames that are allowed to access the server-side application. For more information, see https://angular.dev/best-practices/security#preventing-server-side-request-forgery-ssrf. _Note: this is only supported in Angular versions >= 21.2.0_.",
59
+ "type": "array",
60
+ "uniqueItems": true,
61
+ "items": {
62
+ "type": "string"
63
+ }
64
+ },
57
65
  "autoCsp": {
58
66
  "description": "Enables automatic generation of a hash-based Strict Content Security Policy (https://web.dev/articles/strict-csp#choose-hash) based on scripts in index.html. Will default to true once we are out of experimental/preview phases.",
59
67
  "default": false,
@@ -1 +1 @@
1
- {"version":3,"file":"validate-options.d.ts","sourceRoot":"","sources":["../../../../../../../packages/angular/src/executors/application/utils/validate-options.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,WAAW,CAAC;AAE5D,wBAAgB,eAAe,CAAC,OAAO,EAAE,0BAA0B,GAAG,IAAI,CA0CzE"}
1
+ {"version":3,"file":"validate-options.d.ts","sourceRoot":"","sources":["../../../../../../../packages/angular/src/executors/application/utils/validate-options.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,WAAW,CAAC;AAE5D,wBAAgB,eAAe,CAAC,OAAO,EAAE,0BAA0B,GAAG,IAAI,CAkDzE"}
@@ -15,6 +15,11 @@ function validateOptions(options) {
15
15
  throw new Error(`The "conditions" option requires Angular version 20.0.0 or greater. You are currently using version ${angularVersion}.`);
16
16
  }
17
17
  }
18
+ if ((0, semver_1.lt)(angularVersion, '21.2.0')) {
19
+ if (options.security?.allowedHosts) {
20
+ throw new Error(`The "security.allowedHosts" option requires Angular version 21.2.0 or greater. You are currently using version ${angularVersion}.`);
21
+ }
22
+ }
18
23
  if ((0, semver_1.lt)(angularVersion, '20.1.0')) {
19
24
  if (options.loader) {
20
25
  const invalidLoaders = Array.from(new Set(Object.values(options.loader).filter((l) => l === 'dataurl' || l === 'base64')));
@@ -38,6 +38,10 @@
38
38
  "type": "string",
39
39
  "pattern": "^\\d+x\\d+$"
40
40
  },
41
+ "headless": {
42
+ "type": "boolean",
43
+ "description": "Forces all configured browsers to run in headless mode. When using the Vitest runner, this option is ignored if no browsers are configured. The Karma runner does not support this option. _Note: this is only supported in Angular versions >= 21.2.0_."
44
+ },
41
45
  "include": {
42
46
  "type": "array",
43
47
  "items": {
@@ -1 +1 @@
1
- {"version":3,"file":"unit-test.impl.d.ts","sourceRoot":"","sources":["../../../../../../packages/angular/src/executors/unit-test/unit-test.impl.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAkB,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAK/E,OAAO,KAAK,EAAE,eAAe,EAAU,MAAM,YAAY,CAAC;AAW1D,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,UAAU,CAAC;AAExD,wBAA+B,gBAAgB,CAC7C,OAAO,EAAE,uBAAuB,EAChC,OAAO,EAAE,eAAe,GACvB,aAAa,CAAC,aAAa,CAAC,CAyC9B"}
1
+ {"version":3,"file":"unit-test.impl.d.ts","sourceRoot":"","sources":["../../../../../../packages/angular/src/executors/unit-test/unit-test.impl.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAkB,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAK/E,OAAO,KAAK,EAAE,eAAe,EAAU,MAAM,YAAY,CAAC;AAY1D,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,UAAU,CAAC;AAExD,wBAA+B,gBAAgB,CAC7C,OAAO,EAAE,uBAAuB,EAChC,OAAO,EAAE,eAAe,GACvB,aAAa,CAAC,aAAa,CAAC,CAyC9B"}
@@ -36,11 +36,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
36
36
  exports.default = unitTestExecutor;
37
37
  const ngcli_adapter_1 = require("nx/src/adapter/ngcli-adapter");
38
38
  const targets_1 = require("../../utils/targets");
39
+ const semver_1 = require("semver");
39
40
  const angular_version_utils_1 = require("../utilities/angular-version-utils");
40
41
  const builder_package_1 = require("../utilities/builder-package");
41
42
  const esbuild_extensions_1 = require("../utilities/esbuild-extensions");
42
43
  async function* unitTestExecutor(options, context) {
43
- validateOptions();
44
+ validateOptions(options);
44
45
  const { plugins: pluginPaths, indexHtmlTransformer: indexHtmlTransformerPath, ...delegateExecutorOptions } = options;
45
46
  const plugins = await (0, esbuild_extensions_1.loadPlugins)(pluginPaths, options.tsConfig);
46
47
  const indexHtmlTransformer = indexHtmlTransformerPath
@@ -61,11 +62,16 @@ async function* unitTestExecutor(options, context) {
61
62
  indexHtmlTransformer,
62
63
  });
63
64
  }
64
- function validateOptions() {
65
+ function validateOptions(options) {
65
66
  const { version: angularVersion, major: angularMajorVersion } = (0, angular_version_utils_1.getInstalledAngularVersionInfo)();
66
67
  if (angularMajorVersion < 21) {
67
68
  throw new Error(`The "unit-test" executor is only available for Angular versions >= 21.0.0. You are currently using version ${angularVersion}.`);
68
69
  }
70
+ if ((0, semver_1.lt)(angularVersion, '21.2.0')) {
71
+ if (options.headless !== undefined) {
72
+ throw new Error(`The "headless" option requires Angular version 21.2.0 or greater. You are currently using version ${angularVersion}.`);
73
+ }
74
+ }
69
75
  }
70
76
  /**
71
77
  * The Angular CLI unit-test builder only accepts the `@angular/build:application`
@@ -1,7 +1,7 @@
1
1
  export declare const nxVersion: any;
2
- export declare const angularVersion = "~21.1.0";
3
- export declare const angularDevkitVersion = "~21.1.0";
4
- export declare const ngPackagrVersion = "~21.1.0";
2
+ export declare const angularVersion = "~21.2.0";
3
+ export declare const angularDevkitVersion = "~21.2.0";
4
+ export declare const ngPackagrVersion = "~21.2.0";
5
5
  export declare const ngrxVersion = "^21.0.0";
6
6
  export declare const rxjsVersion = "~7.8.0";
7
7
  export declare const zoneJsVersion = "~0.15.0";
@@ -14,7 +14,7 @@ export declare const browserSyncVersion = "^3.0.0";
14
14
  export declare const moduleFederationNodeVersion = "^2.7.21";
15
15
  export declare const moduleFederationEnhancedVersion = "^0.21.2";
16
16
  export declare const webpackMergeVersion = "^5.8.0";
17
- export declare const angularEslintVersion = "^21.0.1";
17
+ export declare const angularEslintVersion = "^21.2.0";
18
18
  export declare const typescriptEslintVersion = "^7.16.0";
19
19
  export declare const tailwindVersion = "^3.0.2";
20
20
  export declare const postcssVersion = "^8.4.5";
@@ -2,9 +2,9 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.jsoncEslintParserVersion = exports.jsdomVersion = exports.vitestVersion = exports.jasmineMarblesVersion = exports.typesNodeVersion = exports.jestPresetAngularVersion = exports.lessVersion = exports.tsNodeVersion = exports.autoprefixerVersion = exports.postcssUrlVersion = exports.postcssVersion = exports.tailwindVersion = exports.typescriptEslintVersion = exports.angularEslintVersion = exports.webpackMergeVersion = exports.moduleFederationEnhancedVersion = exports.moduleFederationNodeVersion = exports.browserSyncVersion = exports.typesExpressVersion = exports.expressVersion = exports.typesCorsVersion = exports.corsVersion = exports.tsLibVersion = exports.zoneJsVersion = exports.rxjsVersion = exports.ngrxVersion = exports.ngPackagrVersion = exports.angularDevkitVersion = exports.angularVersion = exports.nxVersion = void 0;
4
4
  exports.nxVersion = require('../../package.json').version;
5
- exports.angularVersion = '~21.1.0';
6
- exports.angularDevkitVersion = '~21.1.0';
7
- exports.ngPackagrVersion = '~21.1.0';
5
+ exports.angularVersion = '~21.2.0';
6
+ exports.angularDevkitVersion = '~21.2.0';
7
+ exports.ngPackagrVersion = '~21.2.0';
8
8
  exports.ngrxVersion = '^21.0.0';
9
9
  exports.rxjsVersion = '~7.8.0';
10
10
  exports.zoneJsVersion = '~0.15.0';
@@ -17,7 +17,7 @@ exports.browserSyncVersion = '^3.0.0';
17
17
  exports.moduleFederationNodeVersion = '^2.7.21';
18
18
  exports.moduleFederationEnhancedVersion = '^0.21.2';
19
19
  exports.webpackMergeVersion = '^5.8.0';
20
- exports.angularEslintVersion = '^21.0.1';
20
+ exports.angularEslintVersion = '^21.2.0';
21
21
  exports.typescriptEslintVersion = '^7.16.0';
22
22
  exports.tailwindVersion = '^3.0.2';
23
23
  exports.postcssVersion = '^8.4.5';