@nx/angular 21.0.0-canary.20250206-8bd0bcd → 21.0.0-canary.20250418-8619c1d

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.
Files changed (115) hide show
  1. package/fesm2022/nx-angular.mjs +0 -352
  2. package/fesm2022/nx-angular.mjs.map +1 -1
  3. package/generators.json +7 -2
  4. package/index.d.ts +1 -1
  5. package/migrations.json +199 -69
  6. package/ng-package.json +1 -1
  7. package/package.json +11 -14
  8. package/src/builders/dev-server/dev-server.impl.js +2 -3
  9. package/src/builders/dev-server/lib/normalize-options.js +1 -0
  10. package/src/builders/dev-server/schema.d.ts +4 -0
  11. package/src/builders/dev-server/schema.json +9 -4
  12. package/src/builders/webpack-browser/schema.d.ts +1 -4
  13. package/src/builders/webpack-browser/schema.json +5 -0
  14. package/src/builders/webpack-browser/webpack-browser.impl.js +5 -5
  15. package/src/executors/delegate-build/delegate-build.impl.d.ts +1 -3
  16. package/src/executors/delegate-build/delegate-build.impl.js +0 -3
  17. package/src/executors/module-federation-dev-server/schema.d.ts +3 -0
  18. package/src/executors/module-federation-dev-server/schema.json +1 -1
  19. package/src/executors/package/package.impl.js +1 -4
  20. package/src/generators/add-linting/add-linting.js +1 -16
  21. package/src/generators/add-linting/lib/create-eslint-configuration.d.ts +2 -2
  22. package/src/generators/add-linting/lib/create-eslint-configuration.js +2 -2
  23. package/src/generators/add-linting/schema.d.ts +1 -0
  24. package/src/generators/application/application.js +20 -1
  25. package/src/generators/application/files/rspack-ssr/server.ts__tmpl__ +72 -0
  26. package/src/generators/application/lib/add-e2e.js +2 -9
  27. package/src/generators/application/lib/add-linting.js +1 -0
  28. package/src/generators/application/lib/add-serve-static-target.js +1 -0
  29. package/src/generators/application/lib/add-unit-test-runner.js +2 -0
  30. package/src/generators/application/lib/create-project.js +1 -0
  31. package/src/generators/application/lib/normalize-options.d.ts +1 -1
  32. package/src/generators/application/lib/normalize-options.js +9 -2
  33. package/src/generators/application/schema.d.ts +2 -2
  34. package/src/generators/application/schema.json +1 -7
  35. package/src/generators/component-test/component-test.js +1 -1
  36. package/src/generators/convert-to-rspack/convert-to-rspack.d.ts +4 -0
  37. package/src/generators/convert-to-rspack/convert-to-rspack.js +314 -0
  38. package/src/generators/convert-to-rspack/lib/create-config.d.ts +2 -0
  39. package/src/generators/convert-to-rspack/lib/create-config.js +48 -0
  40. package/src/generators/convert-to-rspack/lib/get-custom-webpack-config.d.ts +6 -0
  41. package/src/generators/convert-to-rspack/lib/get-custom-webpack-config.js +75 -0
  42. package/src/generators/convert-to-rspack/lib/update-tsconfig.d.ts +2 -0
  43. package/src/generators/convert-to-rspack/lib/update-tsconfig.js +26 -0
  44. package/src/generators/convert-to-rspack/lib/validate-supported-executor.d.ts +2 -0
  45. package/src/generators/convert-to-rspack/lib/validate-supported-executor.js +14 -0
  46. package/src/generators/convert-to-rspack/schema.d.ts +5 -0
  47. package/src/generators/convert-to-rspack/schema.json +30 -0
  48. package/src/generators/host/host.js +1 -1
  49. package/src/generators/host/schema.d.ts +0 -1
  50. package/src/generators/host/schema.json +0 -6
  51. package/src/generators/library/lib/add-project.d.ts +1 -1
  52. package/src/generators/library/lib/add-project.js +7 -1
  53. package/src/generators/library/lib/normalize-options.js +1 -1
  54. package/src/generators/library/lib/normalized-schema.d.ts +0 -1
  55. package/src/generators/library/library.js +5 -1
  56. package/src/generators/library/schema.d.ts +0 -1
  57. package/src/generators/library/schema.json +0 -6
  58. package/src/generators/move/move.d.ts +3 -0
  59. package/src/generators/move/move.js +3 -0
  60. package/src/generators/ng-add/migrators/projects/e2e.migrator.js +2 -2
  61. package/src/generators/ngrx/ngrx.d.ts +3 -0
  62. package/src/generators/ngrx/ngrx.js +3 -0
  63. package/src/generators/ngrx/schema.json +1 -1
  64. package/src/generators/ngrx-feature-store/schema.d.ts +1 -1
  65. package/src/generators/remote/remote.js +1 -1
  66. package/src/generators/remote/schema.d.ts +0 -1
  67. package/src/generators/remote/schema.json +0 -6
  68. package/src/generators/setup-mf/lib/setup-serve-target.js +1 -0
  69. package/src/generators/setup-ssr/files/v19+/application-builder/ngmodule-src/app/__rootModuleFileName__ +2 -2
  70. package/src/generators/setup-ssr/files/v19+/application-builder/server/__serverFileName__ +1 -1
  71. package/src/generators/setup-ssr/files/v19+/application-builder/standalone-src/app/app.config.server.ts__tpl__ +2 -2
  72. package/src/generators/setup-ssr/files/v19+/application-builder-common-engine/server/__serverFileName__ +2 -0
  73. package/src/generators/setup-ssr/lib/generate-files.js +12 -1
  74. package/src/generators/setup-ssr/lib/update-project-config.js +1 -0
  75. package/src/generators/stories/stories.js +2 -2
  76. package/src/generators/utils/add-jest.d.ts +1 -0
  77. package/src/generators/utils/add-jest.js +2 -2
  78. package/src/generators/utils/add-vitest.d.ts +1 -0
  79. package/src/generators/utils/add-vitest.js +1 -1
  80. package/src/generators/utils/ensure-angular-dependencies.js +0 -1
  81. package/src/migrations/update-16-2-0/switch-data-persistence-operators-imports-to-ngrx-router-store.js +4 -4
  82. package/src/migrations/update-19-6-0/turn-off-dts-by-default.js +2 -2
  83. package/src/migrations/{update-16-1-0 → update-20-5-0}/update-angular-cli.d.ts +1 -1
  84. package/src/migrations/{update-16-1-0 → update-20-5-0}/update-angular-cli.js +1 -1
  85. package/src/migrations/{update-16-1-0/remove-ngcc-invocation.d.ts → update-21-0-0/change-data-persistence-operators-imports-to-ngrx-router-store-data-persistence.d.ts} +1 -1
  86. package/src/migrations/update-21-0-0/change-data-persistence-operators-imports-to-ngrx-router-store-data-persistence.js +122 -0
  87. package/src/migrations/update-21-0-0/set-continuous-option.d.ts +3 -0
  88. package/src/migrations/update-21-0-0/set-continuous-option.js +29 -0
  89. package/src/plugins/plugin.js +2 -0
  90. package/src/utils/backward-compatible-versions.js +2 -0
  91. package/src/utils/nx-devkit/ast-utils.d.ts +0 -8
  92. package/src/utils/nx-devkit/ast-utils.js +7 -12
  93. package/src/utils/versions.d.ts +7 -6
  94. package/src/utils/versions.js +8 -7
  95. package/fesm2022/nx-angular-testing.mjs +0 -45
  96. package/fesm2022/nx-angular-testing.mjs.map +0 -1
  97. package/src/migrations/update-16-0-0/remove-karma-defaults.d.ts +0 -2
  98. package/src/migrations/update-16-0-0/remove-karma-defaults.js +0 -52
  99. package/src/migrations/update-16-0-0/remove-library-generator-simple-module-name-option.d.ts +0 -2
  100. package/src/migrations/update-16-0-0/remove-library-generator-simple-module-name-option.js +0 -40
  101. package/src/migrations/update-16-0-0/remove-protractor-defaults.d.ts +0 -2
  102. package/src/migrations/update-16-0-0/remove-protractor-defaults.js +0 -52
  103. package/src/migrations/update-16-0-0-add-nx-packages/update-16-0-0-add-nx-packages.d.ts +0 -2
  104. package/src/migrations/update-16-0-0-add-nx-packages/update-16-0-0-add-nx-packages.js +0 -9
  105. package/src/migrations/update-16-1-0/extract-standalone-config-from-bootstrap.d.ts +0 -2
  106. package/src/migrations/update-16-1-0/extract-standalone-config-from-bootstrap.js +0 -127
  107. package/src/migrations/update-16-1-0/remove-ngcc-invocation.js +0 -22
  108. package/src/migrations/update-16-1-0/remove-render-module-platform-server-exports.d.ts +0 -2
  109. package/src/migrations/update-16-1-0/remove-render-module-platform-server-exports.js +0 -62
  110. package/src/migrations/update-16-1-0/update-server-executor-config.d.ts +0 -2
  111. package/src/migrations/update-16-1-0/update-server-executor-config.js +0 -26
  112. package/src/runtime/nx/data-persistence.d.ts +0 -276
  113. package/testing/index.d.ts +0 -1
  114. package/testing/ng-package.json +0 -6
  115. package/testing/src/testing-utils.d.ts +0 -33
package/migrations.json CHANGED
@@ -1,74 +1,5 @@
1
1
  {
2
2
  "generators": {
3
- "remove-library-generator-simple-module-name-option": {
4
- "cli": "nx",
5
- "version": "16.0.0-beta.1",
6
- "description": "Replace the deprecated library generator 'simpleModuleName' option from generator defaults with 'simpleName'",
7
- "factory": "./src/migrations/update-16-0-0/remove-library-generator-simple-module-name-option"
8
- },
9
- "update-16-0-0-add-nx-packages": {
10
- "cli": "nx",
11
- "version": "16.0.0-beta.1",
12
- "description": "Replace @nrwl/angular with @nx/angular",
13
- "implementation": "./src/migrations/update-16-0-0-add-nx-packages/update-16-0-0-add-nx-packages"
14
- },
15
- "remove-protractor-defaults-from-generators": {
16
- "cli": "nx",
17
- "version": "16.0.0-beta.6",
18
- "description": "Remove protractor as default e2eTestRunner from nxJson and project configurations",
19
- "implementation": "./src/migrations/update-16-0-0/remove-protractor-defaults"
20
- },
21
- "remove-karma-defaults-from-generators": {
22
- "cli": "nx",
23
- "version": "16.0.0-beta.6",
24
- "description": "Remove karma as default unitTestRunner from nxJson and project configurations",
25
- "implementation": "./src/migrations/update-16-0-0/remove-karma-defaults"
26
- },
27
- "remove-render-module-platform-server-exports": {
28
- "cli": "nx",
29
- "version": "16.1.0-beta.1",
30
- "requires": {
31
- "@angular/core": ">=15.0.0"
32
- },
33
- "description": "Remove exported `@angular/platform-server` `renderModule` method. The `renderModule` method is now exported by the Angular CLI.",
34
- "factory": "./src/migrations/update-16-1-0/remove-render-module-platform-server-exports"
35
- },
36
- "remove-ngcc-invocation": {
37
- "cli": "nx",
38
- "version": "16.1.0-beta.1",
39
- "requires": {
40
- "@angular/core": ">=16.0.0-rc.4"
41
- },
42
- "description": "Remove 'ngcc' invocation if exists from the 'postinstall' script in package.json.",
43
- "factory": "./src/migrations/update-16-1-0/remove-ngcc-invocation"
44
- },
45
- "extract-app-config-for-standalone": {
46
- "cli": "nx",
47
- "version": "16.1.0-beta.1",
48
- "requires": {
49
- "@angular/core": ">=16.0.0-rc.4"
50
- },
51
- "description": "Extract the app config for standalone apps",
52
- "factory": "./src/migrations/update-16-1-0/extract-standalone-config-from-bootstrap"
53
- },
54
- "update-server-executor-config": {
55
- "cli": "nx",
56
- "version": "16.1.0-beta.1",
57
- "requires": {
58
- "@angular/core": ">=16.0.0-rc.4"
59
- },
60
- "description": "Update server executors' configuration to disable 'buildOptimizer' for non optimized builds.",
61
- "factory": "./src/migrations/update-16-1-0/update-server-executor-config"
62
- },
63
- "update-angular-cli-version-16-0-0": {
64
- "cli": "nx",
65
- "version": "16.1.0-beta.1",
66
- "requires": {
67
- "@angular/core": ">=16.0.0"
68
- },
69
- "description": "Update the @angular/cli package version to ~16.0.0.",
70
- "factory": "./src/migrations/update-16-1-0/update-angular-cli"
71
- },
72
3
  "switch-data-persistence-operators-imports-to-ngrx-router-store": {
73
4
  "cli": "nx",
74
5
  "version": "16.2.0-beta.0",
@@ -347,6 +278,30 @@
347
278
  },
348
279
  "description": "Update the @angular/cli package version to ~19.1.0.",
349
280
  "factory": "./src/migrations/update-20-4-0/update-angular-cli"
281
+ },
282
+ "update-angular-cli-version-19-2-0": {
283
+ "cli": "nx",
284
+ "version": "20.5.0-beta.5",
285
+ "requires": {
286
+ "@angular/core": ">=19.2.0"
287
+ },
288
+ "description": "Update the @angular/cli package version to ~19.2.0.",
289
+ "factory": "./src/migrations/update-20-5-0/update-angular-cli"
290
+ },
291
+ "set-continuous-option": {
292
+ "cli": "nx",
293
+ "version": "21.0.0-beta.3",
294
+ "description": "Set the `continuous` option to `true` for continuous tasks.",
295
+ "factory": "./src/migrations/update-21-0-0/set-continuous-option"
296
+ },
297
+ "change-data-persistence-operators-imports-to-ngrx-router-store-data-persistence": {
298
+ "cli": "nx",
299
+ "version": "21.0.0-beta.5",
300
+ "requires": {
301
+ "@ngrx/store": ">=16.0.0"
302
+ },
303
+ "description": "Change the data persistence operator imports to '@ngrx/router-store/data-persistence'.",
304
+ "factory": "./src/migrations/update-21-0-0/change-data-persistence-operators-imports-to-ngrx-router-store-data-persistence"
350
305
  }
351
306
  },
352
307
  "packageJsonUpdates": {
@@ -1049,6 +1004,22 @@
1049
1004
  "@angular-eslint/utils": {
1050
1005
  "version": "^18.0.1",
1051
1006
  "alwaysAddToPackageJson": false
1007
+ },
1008
+ "@angular-eslint/schematics": {
1009
+ "version": "^18.0.1",
1010
+ "alwaysAddToPackageJson": false
1011
+ },
1012
+ "@angular-eslint/test-utils": {
1013
+ "version": "^18.0.1",
1014
+ "alwaysAddToPackageJson": false
1015
+ },
1016
+ "@angular-eslint/builder": {
1017
+ "version": "^18.0.1",
1018
+ "alwaysAddToPackageJson": false
1019
+ },
1020
+ "@angular-eslint/bundled-angular-compiler": {
1021
+ "version": "^18.0.1",
1022
+ "alwaysAddToPackageJson": false
1052
1023
  }
1053
1024
  }
1054
1025
  },
@@ -1316,6 +1287,10 @@
1316
1287
  "version": "~19.0.0",
1317
1288
  "alwaysAddToPackageJson": false
1318
1289
  },
1290
+ "@angular/google-maps": {
1291
+ "version": "~19.0.0",
1292
+ "alwaysAddToPackageJson": false
1293
+ },
1319
1294
  "ng-packagr": {
1320
1295
  "version": "~19.0.0",
1321
1296
  "alwaysAddToPackageJson": false
@@ -1368,6 +1343,22 @@
1368
1343
  "@angular-eslint/utils": {
1369
1344
  "version": "^19.0.0",
1370
1345
  "alwaysAddToPackageJson": false
1346
+ },
1347
+ "@angular-eslint/schematics": {
1348
+ "version": "^19.0.0",
1349
+ "alwaysAddToPackageJson": false
1350
+ },
1351
+ "@angular-eslint/test-utils": {
1352
+ "version": "^19.0.0",
1353
+ "alwaysAddToPackageJson": false
1354
+ },
1355
+ "@angular-eslint/builder": {
1356
+ "version": "^19.0.0",
1357
+ "alwaysAddToPackageJson": false
1358
+ },
1359
+ "@angular-eslint/bundled-angular-compiler": {
1360
+ "version": "^19.0.0",
1361
+ "alwaysAddToPackageJson": false
1371
1362
  }
1372
1363
  }
1373
1364
  },
@@ -1410,6 +1401,22 @@
1410
1401
  "@angular-eslint/utils": {
1411
1402
  "version": "^19.0.2",
1412
1403
  "alwaysAddToPackageJson": false
1404
+ },
1405
+ "@angular-eslint/schematics": {
1406
+ "version": "^19.0.2",
1407
+ "alwaysAddToPackageJson": false
1408
+ },
1409
+ "@angular-eslint/test-utils": {
1410
+ "version": "^19.0.2",
1411
+ "alwaysAddToPackageJson": false
1412
+ },
1413
+ "@angular-eslint/builder": {
1414
+ "version": "^19.0.2",
1415
+ "alwaysAddToPackageJson": false
1416
+ },
1417
+ "@angular-eslint/bundled-angular-compiler": {
1418
+ "version": "^19.0.2",
1419
+ "alwaysAddToPackageJson": false
1413
1420
  }
1414
1421
  }
1415
1422
  },
@@ -1480,11 +1487,134 @@
1480
1487
  "version": "~19.1.0",
1481
1488
  "alwaysAddToPackageJson": false
1482
1489
  },
1490
+ "@angular/google-maps": {
1491
+ "version": "~19.1.0",
1492
+ "alwaysAddToPackageJson": false
1493
+ },
1483
1494
  "ng-packagr": {
1484
1495
  "version": "~19.1.0",
1485
1496
  "alwaysAddToPackageJson": false
1486
1497
  }
1487
1498
  }
1499
+ },
1500
+ "20.5.0": {
1501
+ "version": "20.5.0-beta.5",
1502
+ "x-prompt": "Do you want to update the Angular version to v19.2?",
1503
+ "requires": {
1504
+ "@angular/core": ">=19.1.0 <19.2.0"
1505
+ },
1506
+ "packages": {
1507
+ "@angular-devkit/build-angular": {
1508
+ "version": "~19.2.0",
1509
+ "alwaysAddToPackageJson": false
1510
+ },
1511
+ "@angular-devkit/core": {
1512
+ "version": "~19.2.0",
1513
+ "alwaysAddToPackageJson": false
1514
+ },
1515
+ "@angular-devkit/schematics": {
1516
+ "version": "~19.2.0",
1517
+ "alwaysAddToPackageJson": false
1518
+ },
1519
+ "@angular/build": {
1520
+ "version": "~19.2.0",
1521
+ "alwaysAddToPackageJson": false
1522
+ },
1523
+ "@angular/pwa": {
1524
+ "version": "~19.2.0",
1525
+ "alwaysAddToPackageJson": false
1526
+ },
1527
+ "@angular/ssr": {
1528
+ "version": "~19.2.0",
1529
+ "alwaysAddToPackageJson": false
1530
+ },
1531
+ "@schematics/angular": {
1532
+ "version": "~19.2.0",
1533
+ "alwaysAddToPackageJson": false
1534
+ },
1535
+ "@angular-devkit/architect": {
1536
+ "version": "~0.1902.0",
1537
+ "alwaysAddToPackageJson": false
1538
+ },
1539
+ "@angular-devkit/build-webpack": {
1540
+ "version": "~0.1902.0",
1541
+ "alwaysAddToPackageJson": false
1542
+ },
1543
+ "@angular/core": {
1544
+ "version": "~19.2.0",
1545
+ "alwaysAddToPackageJson": true
1546
+ },
1547
+ "@angular/material": {
1548
+ "version": "~19.2.1",
1549
+ "alwaysAddToPackageJson": false
1550
+ },
1551
+ "@angular/cdk": {
1552
+ "version": "~19.2.1",
1553
+ "alwaysAddToPackageJson": false
1554
+ },
1555
+ "@angular/google-maps": {
1556
+ "version": "~19.2.1",
1557
+ "alwaysAddToPackageJson": false
1558
+ },
1559
+ "ng-packagr": {
1560
+ "version": "~19.2.0",
1561
+ "alwaysAddToPackageJson": false
1562
+ }
1563
+ }
1564
+ },
1565
+ "20.5.0-angular-eslint": {
1566
+ "version": "20.5.0-rc.1",
1567
+ "requires": {
1568
+ "eslint": "^8.57.0 || ^9.0.0",
1569
+ "@angular/core": ">= 19.0.0 < 20.0.0"
1570
+ },
1571
+ "packages": {
1572
+ "angular-eslint": {
1573
+ "version": "^19.2.0",
1574
+ "alwaysAddToPackageJson": false
1575
+ },
1576
+ "@angular-eslint/eslint-plugin": {
1577
+ "version": "^19.2.0",
1578
+ "alwaysAddToPackageJson": false
1579
+ },
1580
+ "@angular-eslint/eslint-plugin-template": {
1581
+ "version": "^19.2.0",
1582
+ "alwaysAddToPackageJson": false
1583
+ },
1584
+ "@angular-eslint/template-parser": {
1585
+ "version": "^19.2.0",
1586
+ "alwaysAddToPackageJson": false
1587
+ },
1588
+ "@angular-eslint/utils": {
1589
+ "version": "^19.2.0",
1590
+ "alwaysAddToPackageJson": false
1591
+ },
1592
+ "@angular-eslint/schematics": {
1593
+ "version": "^19.2.0",
1594
+ "alwaysAddToPackageJson": false
1595
+ },
1596
+ "@angular-eslint/test-utils": {
1597
+ "version": "^19.2.0",
1598
+ "alwaysAddToPackageJson": false
1599
+ },
1600
+ "@angular-eslint/builder": {
1601
+ "version": "^19.2.0",
1602
+ "alwaysAddToPackageJson": false
1603
+ },
1604
+ "@angular-eslint/bundled-angular-compiler": {
1605
+ "version": "^19.2.0",
1606
+ "alwaysAddToPackageJson": false
1607
+ }
1608
+ }
1609
+ },
1610
+ "20.8.1": {
1611
+ "version": "20.8.1-beta.0",
1612
+ "packages": {
1613
+ "@nx/angular-rspack": {
1614
+ "version": "^20.7.0",
1615
+ "alwaysAddToPackageJson": false
1616
+ }
1617
+ }
1488
1618
  }
1489
1619
  }
1490
1620
  }
package/ng-package.json CHANGED
@@ -15,7 +15,7 @@
15
15
  "@typescript-eslint/",
16
16
  "picocolors",
17
17
  "ignore",
18
- "minimatch",
18
+ "picomatch",
19
19
  "rxjs-for-await",
20
20
  "webpack-merge",
21
21
  "ts-node",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nx/angular",
3
- "version": "21.0.0-canary.20250206-8bd0bcd",
3
+ "version": "21.0.0-canary.20250418-8619c1d",
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": {
@@ -33,7 +33,6 @@
33
33
  "./src/builders/*.impl": "./src/builders/*.impl.js",
34
34
  "./src/executors/*/schema.json": "./src/executors/*/schema.json",
35
35
  "./src/executors/*.impl": "./src/executors/*.impl.js",
36
- "./src/executors/*/compat": "./src/executors/*/compat.js",
37
36
  "./package.json": {
38
37
  "default": "./package.json"
39
38
  },
@@ -44,10 +43,6 @@
44
43
  "./mf": {
45
44
  "types": "./mf/index.d.ts",
46
45
  "default": "./fesm2022/nx-angular-mf.mjs"
47
- },
48
- "./testing": {
49
- "types": "./testing/index.d.ts",
50
- "default": "./fesm2022/nx-angular-testing.mjs"
51
46
  }
52
47
  },
53
48
  "author": "Victor Savkin",
@@ -65,19 +60,21 @@
65
60
  "dependencies": {
66
61
  "@phenomnomnominal/tsquery": "~5.0.1",
67
62
  "@typescript-eslint/type-utils": "^8.0.0",
63
+ "enquirer": "~2.3.6",
68
64
  "picocolors": "^1.1.0",
65
+ "picomatch": "4.0.2",
69
66
  "magic-string": "~0.30.2",
70
- "minimatch": "9.0.3",
71
67
  "semver": "^7.5.3",
72
68
  "tslib": "^2.3.0",
73
69
  "webpack-merge": "^5.8.0",
74
- "@nx/devkit": "21.0.0-canary.20250206-8bd0bcd",
75
- "@nx/js": "21.0.0-canary.20250206-8bd0bcd",
76
- "@nx/eslint": "21.0.0-canary.20250206-8bd0bcd",
77
- "@nx/webpack": "21.0.0-canary.20250206-8bd0bcd",
78
- "@nx/module-federation": "21.0.0-canary.20250206-8bd0bcd",
79
- "@nx/web": "21.0.0-canary.20250206-8bd0bcd",
80
- "@nx/workspace": "21.0.0-canary.20250206-8bd0bcd",
70
+ "@nx/devkit": "21.0.0-canary.20250418-8619c1d",
71
+ "@nx/js": "21.0.0-canary.20250418-8619c1d",
72
+ "@nx/eslint": "21.0.0-canary.20250418-8619c1d",
73
+ "@nx/webpack": "21.0.0-canary.20250418-8619c1d",
74
+ "@nx/rspack": "21.0.0-canary.20250418-8619c1d",
75
+ "@nx/module-federation": "21.0.0-canary.20250418-8619c1d",
76
+ "@nx/web": "21.0.0-canary.20250418-8619c1d",
77
+ "@nx/workspace": "21.0.0-canary.20250418-8619c1d",
81
78
  "piscina": "^4.4.0"
82
79
  },
83
80
  "peerDependencies": {
@@ -118,9 +118,7 @@ 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(
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(',')}`));
121
+ baseWebpackConfig.plugins.push(new webpack_nx_build_coordination_plugin_1.WebpackNxBuildCoordinationPlugin(`nx run-many --target=${parsedBuildTarget.target} --projects=${workspaceDependencies.join(',')}`, { skipWatchingDeps: !options.watchDependencies }));
124
122
  }
125
123
  }
126
124
  if (!pathToWebpackConfig) {
@@ -151,6 +149,7 @@ function getDelegateBuilderOptions(options) {
151
149
  }
152
150
  // delete extra option not supported by the delegate builder
153
151
  delete delegateBuilderOptions.buildLibsFromSource;
152
+ delete delegateBuilderOptions.watchDependencies;
154
153
  return delegateBuilderOptions;
155
154
  }
156
155
  async function loadIndexHtmlFileTransformer(pathToIndexFileTransformer, tsConfig, context, isUsingWebpackBuilder) {
@@ -18,5 +18,6 @@ function normalizeOptions(schema) {
18
18
  hmr: schema.hmr ?? (angularMajorVersion < 19 ? false : undefined),
19
19
  open: schema.open ?? false,
20
20
  ssl: schema.ssl ?? false,
21
+ watchDependencies: schema.watchDependencies ?? true,
21
22
  };
22
23
  }
@@ -21,9 +21,13 @@ interface BaseSchema {
21
21
  prebundle?: boolean | { exclude: string[] };
22
22
  buildLibsFromSource?: boolean;
23
23
  esbuildMiddleware?: string[];
24
+ watchDependencies?: boolean;
24
25
  }
25
26
 
26
27
  export type SchemaWithBrowserTarget = BaseSchema & {
28
+ /**
29
+ * @deprecated Use `buildTarget` instead. It will be removed when Angular v20 is released.
30
+ */
27
31
  browserTarget: string;
28
32
  };
29
33
 
@@ -17,7 +17,7 @@
17
17
  "type": "string",
18
18
  "description": "A browser builder target to serve in the format of `project:target[:configuration]`. Ignored if `buildTarget` is set.",
19
19
  "pattern": "^[^:\\s]+:[^:\\s]+(:[^\\s]+)?$",
20
- "x-deprecated": "Use 'buildTarget' instead. It will be removed in Nx v20."
20
+ "x-deprecated": "Use 'buildTarget' instead. It will be removed when Angular v20 is released."
21
21
  },
22
22
  "buildTarget": {
23
23
  "type": "string",
@@ -78,11 +78,11 @@
78
78
  },
79
79
  "publicHost": {
80
80
  "type": "string",
81
- "description": "The URL that the browser client (or live-reload client, if enabled) should use to connect to the development server. Use for a complex dev server setup, such as one with reverse proxies."
81
+ "description": "The URL that the browser client (or live-reload client, if enabled) should use to connect to the development server. Use for a complex dev server setup, such as one with reverse proxies. This option has no effect when using the 'application' or other esbuild-based builders."
82
82
  },
83
83
  "allowedHosts": {
84
84
  "type": "array",
85
- "description": "List of hosts that are allowed to access the dev server.",
85
+ "description": "List of hosts that are allowed to access the dev server. This option has no effect when using the 'application' or other esbuild-based builders in Angular versions lower than 19.2.0.",
86
86
  "default": [],
87
87
  "items": {
88
88
  "type": "string"
@@ -94,7 +94,7 @@
94
94
  },
95
95
  "disableHostCheck": {
96
96
  "type": "boolean",
97
- "description": "Don't verify connected clients are part of allowed hosts.",
97
+ "description": "Don't verify connected clients are part of allowed hosts. This option has no effect when using the 'application' or other esbuild-based builders in Angular versions lower than 19.2.0.",
98
98
  "default": false
99
99
  },
100
100
  "hmr": {
@@ -156,6 +156,11 @@
156
156
  "type": "string",
157
157
  "description": "The path to the middleware function. Relative to the workspace root."
158
158
  }
159
+ },
160
+ "watchDependencies": {
161
+ "type": "boolean",
162
+ "description": "Watch buildable dependencies and rebuild when they change.",
163
+ "default": true
159
164
  }
160
165
  },
161
166
  "additionalProperties": false,
@@ -6,8 +6,5 @@ export type BrowserBuilderSchema = Schema & {
6
6
  };
7
7
  indexHtmlTransformer?: string;
8
8
  buildLibsFromSource?: boolean;
9
- /**
10
- * @deprecated Use `indexHtmlTransformer` instead. It will be removed in Nx 20.
11
- */
12
- indexFileTransformer?: string;
9
+ watchDependencies?: boolean;
13
10
  };
@@ -464,6 +464,11 @@
464
464
  "type": "boolean",
465
465
  "description": "Read buildable libraries from source instead of building them separately.",
466
466
  "default": true
467
+ },
468
+ "watchDependencies": {
469
+ "type": "boolean",
470
+ "description": "Watch buildable dependencies and rebuild when they change.",
471
+ "default": true
467
472
  }
468
473
  },
469
474
  "additionalProperties": false,
@@ -25,7 +25,8 @@ function shouldSkipInitialTargetRun(projectGraph, project, target) {
25
25
  }
26
26
  function executeWebpackBrowserBuilder(options, context) {
27
27
  options.buildLibsFromSource ??= true;
28
- const { buildLibsFromSource, customWebpackConfig, indexHtmlTransformer, indexFileTransformer, ...delegateBuilderOptions } = options;
28
+ options.watchDependencies ??= true;
29
+ const { buildLibsFromSource, customWebpackConfig, indexHtmlTransformer, watchDependencies, ...delegateBuilderOptions } = options;
29
30
  process.env.NX_BUILD_LIBS_FROM_SOURCE = `${buildLibsFromSource}`;
30
31
  process.env.NX_BUILD_TARGET = (0, devkit_1.targetToTargetString)({ ...context.target });
31
32
  const pathToWebpackConfig = customWebpackConfig?.path &&
@@ -33,9 +34,8 @@ function executeWebpackBrowserBuilder(options, context) {
33
34
  if (pathToWebpackConfig && !(0, fs_1.existsSync)(pathToWebpackConfig)) {
34
35
  throw new Error(`Custom Webpack Config File Not Found!\nTo use a custom webpack config, please ensure the path to the custom webpack file is correct: \n${pathToWebpackConfig}`);
35
36
  }
36
- const normalizedIndexHtmlTransformer = indexHtmlTransformer ?? indexFileTransformer;
37
- const pathToIndexFileTransformer = normalizedIndexHtmlTransformer &&
38
- (0, devkit_1.joinPathFragments)(context.workspaceRoot, normalizedIndexHtmlTransformer);
37
+ const pathToIndexFileTransformer = indexHtmlTransformer &&
38
+ (0, devkit_1.joinPathFragments)(context.workspaceRoot, indexHtmlTransformer);
39
39
  if (pathToIndexFileTransformer && !(0, fs_1.existsSync)(pathToIndexFileTransformer)) {
40
40
  throw new Error(`File containing Index File Transformer function Not Found!\n Please ensure the path to the file containing the function is correct: \n${pathToIndexFileTransformer}`);
41
41
  }
@@ -61,7 +61,7 @@ function executeWebpackBrowserBuilder(options, context) {
61
61
  const skipInitialRun = shouldSkipInitialTargetRun(projectGraph, context.target.project, context.target.target);
62
62
  baseWebpackConfig.plugins.push(
63
63
  // @ts-expect-error - difference between angular and webpack plugin definitions bc of webpack versions
64
- new webpack_nx_build_coordination_plugin_1.WebpackNxBuildCoordinationPlugin(`nx run-many --target=${context.target.target} --projects=${workspaceDependencies.join(',')}`, skipInitialRun));
64
+ new webpack_nx_build_coordination_plugin_1.WebpackNxBuildCoordinationPlugin(`nx run-many --target=${context.target.target} --projects=${workspaceDependencies.join(',')}`, { skipInitialRun, skipWatchingDeps: !watchDependencies }));
65
65
  }
66
66
  }
67
67
  if (!pathToWebpackConfig) {
@@ -2,7 +2,5 @@ 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
- }, {
6
- success: boolean;
7
- }, any>;
5
+ }, void, any>;
8
6
  export default delegateBuildExecutor;
@@ -6,9 +6,6 @@ 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
- }
12
9
  const { buildTarget, ...targetOptions } = options;
13
10
  const delegateTarget = (0, devkit_1.parseTargetString)(buildTarget, context);
14
11
  yield* await (0, devkit_1.runExecutor)(delegateTarget, targetOptions, context);
@@ -29,6 +29,9 @@ interface BaseSchema {
29
29
  }
30
30
 
31
31
  export type SchemaWithBrowserTarget = BaseSchema & {
32
+ /**
33
+ * @deprecated Use `buildTarget` instead. It will be removed when Angular v20 is released.
34
+ */
32
35
  browserTarget: string;
33
36
  };
34
37
 
@@ -15,7 +15,7 @@
15
15
  "type": "string",
16
16
  "description": "A browser builder target to serve in the format of `project:target[:configuration]`.",
17
17
  "pattern": "^[^:\\s]+:[^:\\s]+(:[^\\s]+)?$",
18
- "x-deprecated": "Use 'buildTarget' instead. It will be removed in Nx v20."
18
+ "x-deprecated": "Use 'buildTarget' instead. It will be removed when Angular v20 is released."
19
19
  },
20
20
  "buildTarget": {
21
21
  "type": "string",
@@ -31,10 +31,7 @@ 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 { 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
- }
34
+ const { dependencies } = (0, buildable_libs_utils_1.calculateProjectBuildableDependencies)(context.taskGraph, context.projectGraph, context.root, context.projectName, context.targetName, context.configurationName);
38
35
  if (options.watch) {
39
36
  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 })));
40
37
  }
@@ -22,7 +22,7 @@ async function addLintingGenerator(tree, options) {
22
22
  setParserOptionsProject: options.setParserOptionsProject,
23
23
  skipFormat: true,
24
24
  rootProject: rootProject,
25
- addPlugin: false,
25
+ addPlugin: options.addPlugin ?? false,
26
26
  addExplicitTargets: true,
27
27
  skipPackageJson: options.skipPackageJson,
28
28
  });
@@ -61,21 +61,6 @@ async function addLintingGenerator(tree, options) {
61
61
  files: ['*.html'],
62
62
  rules: {},
63
63
  });
64
- if ((0, buildable_project_1.isBuildableLibraryProject)(tree, options.projectName)) {
65
- (0, eslint_file_1.addOverrideToLintConfig)(tree, '', {
66
- files: ['*.json'],
67
- parser: 'jsonc-eslint-parser',
68
- rules: {
69
- '@nx/dependency-checks': [
70
- 'error',
71
- {
72
- // With flat configs, we don't want to include imports in the eslint js/cjs/mjs files to be checked
73
- ignoredFiles: ['{projectRoot}/eslint.config.{js,cjs,mjs}'],
74
- },
75
- ],
76
- },
77
- });
78
- }
79
64
  }
80
65
  else {
81
66
  (0, eslint_file_1.replaceOverridesInLintConfig)(tree, options.projectRoot, [
@@ -5,7 +5,7 @@ type EslintExtensionSchema = {
5
5
  prefix: string;
6
6
  };
7
7
  /**
8
- * @deprecated Use tools from `@nx/eslint/src/generators/utils/eslint-file` instead
8
+ * @deprecated Use tools from `@nx/eslint/src/generators/utils/eslint-file` instead. It will be removed in Nx v22.
9
9
  */
10
10
  export declare const extendAngularEslintJson: (json: Linter.Config, options: EslintExtensionSchema) => {
11
11
  overrides: ({
@@ -75,7 +75,7 @@ export declare const extendAngularEslintJson: (json: Linter.Config, options: Esl
75
75
  rules?: Partial<Linter.RulesRecord>;
76
76
  };
77
77
  /**
78
- * @deprecated Use {@link extendAngularEslintJson} instead
78
+ * @deprecated Use {@link extendAngularEslintJson} instead. It will be removed in Nx v22.
79
79
  */
80
80
  export declare function createEsLintConfiguration(tree: Tree, options: AddLintingGeneratorSchema): void;
81
81
  export {};
@@ -5,7 +5,7 @@ exports.createEsLintConfiguration = createEsLintConfiguration;
5
5
  const devkit_1 = require("@nx/devkit");
6
6
  const string_utils_1 = require("@nx/devkit/src/utils/string-utils");
7
7
  /**
8
- * @deprecated Use tools from `@nx/eslint/src/generators/utils/eslint-file` instead
8
+ * @deprecated Use tools from `@nx/eslint/src/generators/utils/eslint-file` instead. It will be removed in Nx v22.
9
9
  */
10
10
  const extendAngularEslintJson = (json, options) => {
11
11
  const overrides = [
@@ -53,7 +53,7 @@ const extendAngularEslintJson = (json, options) => {
53
53
  };
54
54
  exports.extendAngularEslintJson = extendAngularEslintJson;
55
55
  /**
56
- * @deprecated Use {@link extendAngularEslintJson} instead
56
+ * @deprecated Use {@link extendAngularEslintJson} instead. It will be removed in Nx v22.
57
57
  */
58
58
  function createEsLintConfiguration(tree, options) {
59
59
  const rootConfig = `${(0, devkit_1.offsetFromRoot)(options.projectRoot)}.eslintrc.json`;
@@ -6,4 +6,5 @@ export interface AddLintingGeneratorSchema {
6
6
  skipFormat?: boolean;
7
7
  skipPackageJson?: boolean;
8
8
  unitTestRunner?: string;
9
+ addPlugin?: boolean;
9
10
  }