@nx/angular 23.2.0-beta.1 → 23.2.0-beta.10

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 (61) hide show
  1. package/dist/src/builders/dev-server/dev-server.impl.js +6 -8
  2. package/dist/src/builders/webpack-browser/webpack-browser.impl.js +5 -6
  3. package/dist/src/executors/application/application.impl.js +1 -1
  4. package/dist/src/executors/browser-esbuild/browser-esbuild.impl.js +1 -1
  5. package/dist/src/executors/extract-i18n/extract-i18n.impl.js +3 -3
  6. package/dist/src/executors/module-federation-dev-server/module-federation-dev-server.impl.js +1 -1
  7. package/dist/src/executors/module-federation-ssr-dev-server/module-federation-ssr-dev-server.impl.js +2 -3
  8. package/dist/src/executors/unit-test/unit-test.impl.js +1 -1
  9. package/dist/src/generators/add-linting/add-linting.js +44 -22
  10. package/dist/src/generators/add-linting/schema.d.ts +7 -0
  11. package/dist/src/generators/add-linting/schema.json +15 -4
  12. package/dist/src/generators/application/lib/add-e2e.js +3 -2
  13. package/dist/src/generators/application/lib/add-linting.js +3 -1
  14. package/dist/src/generators/application/lib/create-files.js +3 -3
  15. package/dist/src/generators/application/lib/normalize-options.js +5 -1
  16. package/dist/src/generators/application/lib/normalized-schema.d.ts +2 -2
  17. package/dist/src/generators/application/lib/set-generator-defaults.js +3 -1
  18. package/dist/src/generators/application/schema.d.ts +7 -2
  19. package/dist/src/generators/application/schema.json +15 -5
  20. package/dist/src/generators/component-test/component-test.js +2 -0
  21. package/dist/src/generators/convert-to-rspack/convert-to-rspack.js +1 -5
  22. package/dist/src/generators/cypress-component-configuration/cypress-component-configuration.js +2 -0
  23. package/dist/src/generators/host/host.js +7 -1
  24. package/dist/src/generators/host/schema.d.ts +6 -2
  25. package/dist/src/generators/host/schema.json +10 -5
  26. package/dist/src/generators/library/lib/create-files.js +3 -0
  27. package/dist/src/generators/library/lib/normalize-options.js +4 -2
  28. package/dist/src/generators/library/lib/normalized-schema.d.ts +6 -2
  29. package/dist/src/generators/library/lib/set-generator-defaults.js +5 -1
  30. package/dist/src/generators/library/library.js +5 -3
  31. package/dist/src/generators/library/schema.d.ts +6 -2
  32. package/dist/src/generators/library/schema.json +10 -5
  33. package/dist/src/generators/ng-add/migrators/projects/lib.migrator.js +1 -2
  34. package/dist/src/generators/ng-add/schema.d.ts +2 -2
  35. package/dist/src/generators/ng-add/schema.json +1 -3
  36. package/dist/src/generators/ng-add/utilities/format-files-task.js +2 -2
  37. package/dist/src/generators/ng-add/utilities/projects.js +2 -2
  38. package/dist/src/generators/ng-add/utilities/workspace.js +3 -4
  39. package/dist/src/generators/remote/remote.js +4 -3
  40. package/dist/src/generators/remote/schema.d.ts +6 -2
  41. package/dist/src/generators/remote/schema.json +10 -5
  42. package/dist/src/generators/scam-to-standalone/lib/get-component-data-from-ast.d.ts +1 -1
  43. package/dist/src/generators/scam-to-standalone/lib/get-target-project.d.ts +1 -1
  44. package/dist/src/generators/scam-to-standalone/lib/replace-module-usages-with-component.d.ts +1 -1
  45. package/dist/src/generators/setup-mf/lib/generate-config.js +2 -1
  46. package/dist/src/generators/setup-mf/schema.d.ts +4 -0
  47. package/dist/src/generators/setup-mf/schema.json +8 -2
  48. package/dist/src/generators/storybook-configuration/schema.d.ts +2 -2
  49. package/dist/src/generators/storybook-configuration/schema.json +1 -2
  50. package/dist/src/generators/utils/add-vitest.js +1 -2
  51. package/dist/src/generators/utils/tsconfig-utils.js +2 -7
  52. package/dist/src/migrations/update-20-2-0/migrate-mf-imports-to-new-package.js +2 -3
  53. package/dist/src/migrations/update-21-0-0/change-data-persistence-operators-imports-to-ngrx-router-store-data-persistence.js +3 -4
  54. package/dist/src/plugins/plugin.js +2 -4
  55. package/dist/src/utils/assert-cypress-component-testing-support.d.ts +6 -0
  56. package/dist/src/utils/assert-cypress-component-testing-support.js +31 -0
  57. package/dist/src/utils/versions.d.ts +4 -4
  58. package/dist/src/utils/versions.js +4 -4
  59. package/generators.json +1 -1
  60. package/migrations.json +161 -0
  61. package/package.json +19 -12
@@ -0,0 +1,6 @@
1
+ import { type Tree } from '@nx/devkit';
2
+ /**
3
+ * Asserts the workspace's Cypress version can run Component Testing against its
4
+ * Angular version. Must be called after `@nx/cypress` has been ensured.
5
+ */
6
+ export declare function assertCypressComponentTestingSupport(tree: Tree): void;
@@ -0,0 +1,31 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.assertCypressComponentTestingSupport = assertCypressComponentTestingSupport;
4
+ const devkit_1 = require("@nx/devkit");
5
+ const internal_1 = require("@nx/devkit/internal");
6
+ const semver_1 = require("semver");
7
+ const minCypressVersion = '15.20.1';
8
+ /**
9
+ * Asserts the workspace's Cypress version can run Component Testing against its
10
+ * Angular version. Must be called after `@nx/cypress` has been ensured.
11
+ */
12
+ function assertCypressComponentTestingSupport(tree) {
13
+ const angularVersion = (0, internal_1.getDeclaredPackageVersion)(tree, '@angular/core');
14
+ if (!angularVersion || (0, semver_1.lt)(angularVersion, '22.1.0')) {
15
+ return;
16
+ }
17
+ const { cypressVersion, } = require('@nx/cypress/internal');
18
+ // When Cypress is not installed, the generators install `cypressVersion`
19
+ const declaredCypressVersion = (0, devkit_1.getDependencyVersionFromPackageJson)(tree, 'cypress') ?? cypressVersion;
20
+ // Gate only ranges capped below the floor. `^15.17.0` installs 15.20.1+, so
21
+ // comparing its lower bound would reject workspaces that work. Dist tags
22
+ // (`latest`, `next`) aren't ranges and aren't gated.
23
+ if (!(0, semver_1.validRange)(declaredCypressVersion) ||
24
+ !(0, semver_1.subset)(declaredCypressVersion, `<${minCypressVersion}`)) {
25
+ return;
26
+ }
27
+ throw new Error(`Cypress Component Testing with Angular 22.1 and higher requires Cypress ${minCypressVersion} or higher. ` +
28
+ `Found Cypress ${declaredCypressVersion}. Earlier Cypress versions can't load Angular's Babel 8 dependencies. ` +
29
+ `Please upgrade Cypress. ` +
30
+ `See https://github.com/cypress-io/cypress/issues/34461.`);
31
+ }
@@ -1,7 +1,7 @@
1
1
  export declare const nxVersion: any;
2
- export declare const angularVersion = "~22.0.4";
3
- export declare const angularDevkitVersion = "~22.0.4";
4
- export declare const ngPackagrVersion = "~22.0.0";
2
+ export declare const angularVersion = "~22.1.0";
3
+ export declare const angularDevkitVersion = "~22.1.0";
4
+ export declare const ngPackagrVersion = "~22.1.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.16.2";
@@ -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 = "^2.1.0";
16
16
  export declare const webpackMergeVersion = "^5.8.0";
17
- export declare const angularEslintVersion = "^22.0.0";
17
+ export declare const angularEslintVersion = "^22.1.0";
18
18
  export declare const typescriptEslintVersion = "^8.40.0";
19
19
  export declare const postcssVersion = "^8.4.5";
20
20
  export declare const postcssUrlVersion = "~10.1.3";
@@ -3,9 +3,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.jsoncEslintParserVersion = exports.oxcProjectRuntimeVersion = exports.jsdomVersion = exports.vitestVersion = exports.jasmineMarblesVersion = exports.typesNodeVersion = exports.jestPresetAngularVersion = exports.lessVersion = exports.tsNodeVersion = exports.autoprefixerVersion = exports.postcssUrlVersion = exports.postcssVersion = 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
  const path_1 = require("path");
5
5
  exports.nxVersion = require((0, path_1.join)('@nx/angular', 'package.json')).version;
6
- exports.angularVersion = '~22.0.4';
7
- exports.angularDevkitVersion = '~22.0.4';
8
- exports.ngPackagrVersion = '~22.0.0';
6
+ exports.angularVersion = '~22.1.0';
7
+ exports.angularDevkitVersion = '~22.1.0';
8
+ exports.ngPackagrVersion = '~22.1.0';
9
9
  exports.ngrxVersion = '^21.0.0';
10
10
  exports.rxjsVersion = '~7.8.0';
11
11
  exports.zoneJsVersion = '~0.16.2';
@@ -18,7 +18,7 @@ exports.browserSyncVersion = '^3.0.0';
18
18
  exports.moduleFederationNodeVersion = '^2.7.21';
19
19
  exports.moduleFederationEnhancedVersion = '^2.1.0';
20
20
  exports.webpackMergeVersion = '^5.8.0';
21
- exports.angularEslintVersion = '^22.0.0';
21
+ exports.angularEslintVersion = '^22.1.0';
22
22
  exports.typescriptEslintVersion = '^8.40.0';
23
23
  exports.postcssVersion = '^8.4.5';
24
24
  exports.postcssUrlVersion = '~10.1.3';
package/generators.json CHANGED
@@ -6,7 +6,7 @@
6
6
  "add-linting": {
7
7
  "factory": "./dist/src/generators/add-linting/add-linting",
8
8
  "schema": "./dist/src/generators/add-linting/schema.json",
9
- "description": "Adds linting configuration to an Angular project.",
9
+ "description": "Adds linting configuration to an Angular project, using the linter the workspace already uses. Adds nothing when the workspace has no linter and none is selected.",
10
10
  "hidden": true
11
11
  },
12
12
  "application": {
package/migrations.json CHANGED
@@ -2150,6 +2150,167 @@
2150
2150
  "alwaysAddToPackageJson": false
2151
2151
  }
2152
2152
  }
2153
+ },
2154
+ "23.2.0": {
2155
+ "version": "23.2.0-beta.5",
2156
+ "requires": {
2157
+ "@angular/core": ">=22.0.0 <22.1.0"
2158
+ },
2159
+ "packages": {
2160
+ "@angular/cli": {
2161
+ "version": "~22.1.0",
2162
+ "alwaysAddToPackageJson": false,
2163
+ "ignorePackageGroup": true,
2164
+ "ignoreMigrations": true
2165
+ },
2166
+ "@angular-devkit/build-angular": {
2167
+ "version": "~22.1.0",
2168
+ "alwaysAddToPackageJson": false
2169
+ },
2170
+ "@angular-devkit/core": {
2171
+ "version": "~22.1.0",
2172
+ "alwaysAddToPackageJson": false
2173
+ },
2174
+ "@angular-devkit/schematics": {
2175
+ "version": "~22.1.0",
2176
+ "alwaysAddToPackageJson": false
2177
+ },
2178
+ "@angular/build": {
2179
+ "version": "~22.1.0",
2180
+ "alwaysAddToPackageJson": false
2181
+ },
2182
+ "@angular/pwa": {
2183
+ "version": "~22.1.0",
2184
+ "alwaysAddToPackageJson": false
2185
+ },
2186
+ "@angular/ssr": {
2187
+ "version": "~22.1.0",
2188
+ "alwaysAddToPackageJson": false
2189
+ },
2190
+ "@schematics/angular": {
2191
+ "version": "~22.1.0",
2192
+ "alwaysAddToPackageJson": false
2193
+ },
2194
+ "@angular-devkit/architect": {
2195
+ "version": "~0.2201.0",
2196
+ "alwaysAddToPackageJson": false
2197
+ },
2198
+ "@angular-devkit/build-webpack": {
2199
+ "version": "~0.2201.0",
2200
+ "alwaysAddToPackageJson": false
2201
+ },
2202
+ "@angular/core": {
2203
+ "version": "~22.1.0",
2204
+ "alwaysAddToPackageJson": true
2205
+ },
2206
+ "@angular/material": {
2207
+ "version": "~22.1.0",
2208
+ "alwaysAddToPackageJson": false
2209
+ },
2210
+ "@angular/cdk": {
2211
+ "version": "~22.1.0",
2212
+ "alwaysAddToPackageJson": false
2213
+ },
2214
+ "@angular/google-maps": {
2215
+ "version": "~22.1.0",
2216
+ "alwaysAddToPackageJson": false
2217
+ },
2218
+ "ng-packagr": {
2219
+ "version": "~22.1.0",
2220
+ "alwaysAddToPackageJson": false
2221
+ },
2222
+ "zone.js": {
2223
+ "version": "~0.16.2",
2224
+ "alwaysAddToPackageJson": false
2225
+ }
2226
+ }
2227
+ },
2228
+ "23.2.0-angular-eslint": {
2229
+ "version": "23.2.0-beta.5",
2230
+ "requires": {
2231
+ "@angular/core": ">= 22.0.0 < 23.0.0",
2232
+ "typescript-eslint": "^8.0.0",
2233
+ "eslint": "^9.0.0 || ^10.0.0"
2234
+ },
2235
+ "packages": {
2236
+ "angular-eslint": {
2237
+ "version": "^22.1.0",
2238
+ "alwaysAddToPackageJson": false
2239
+ },
2240
+ "@angular-eslint/eslint-plugin": {
2241
+ "version": "^22.1.0",
2242
+ "alwaysAddToPackageJson": false
2243
+ },
2244
+ "@angular-eslint/eslint-plugin-template": {
2245
+ "version": "^22.1.0",
2246
+ "alwaysAddToPackageJson": false
2247
+ },
2248
+ "@angular-eslint/template-parser": {
2249
+ "version": "^22.1.0",
2250
+ "alwaysAddToPackageJson": false
2251
+ },
2252
+ "@angular-eslint/utils": {
2253
+ "version": "^22.1.0",
2254
+ "alwaysAddToPackageJson": false
2255
+ },
2256
+ "@angular-eslint/schematics": {
2257
+ "version": "^22.1.0",
2258
+ "alwaysAddToPackageJson": false
2259
+ },
2260
+ "@angular-eslint/test-utils": {
2261
+ "version": "^22.1.0",
2262
+ "alwaysAddToPackageJson": false
2263
+ },
2264
+ "@angular-eslint/builder": {
2265
+ "version": "^22.1.0",
2266
+ "alwaysAddToPackageJson": false
2267
+ },
2268
+ "@angular-eslint/bundled-angular-compiler": {
2269
+ "version": "^22.1.0",
2270
+ "alwaysAddToPackageJson": false
2271
+ }
2272
+ }
2273
+ },
2274
+ "23.2.0-@angular-eslint": {
2275
+ "version": "23.2.0-beta.5",
2276
+ "requires": {
2277
+ "@angular/core": ">= 22.0.0 < 23.0.0",
2278
+ "eslint": "^9.0.0 || ^10.0.0"
2279
+ },
2280
+ "packages": {
2281
+ "@angular-eslint/eslint-plugin": {
2282
+ "version": "^22.1.0",
2283
+ "alwaysAddToPackageJson": false
2284
+ },
2285
+ "@angular-eslint/eslint-plugin-template": {
2286
+ "version": "^22.1.0",
2287
+ "alwaysAddToPackageJson": false
2288
+ },
2289
+ "@angular-eslint/template-parser": {
2290
+ "version": "^22.1.0",
2291
+ "alwaysAddToPackageJson": false
2292
+ },
2293
+ "@angular-eslint/utils": {
2294
+ "version": "^22.1.0",
2295
+ "alwaysAddToPackageJson": false
2296
+ },
2297
+ "@angular-eslint/schematics": {
2298
+ "version": "^22.1.0",
2299
+ "alwaysAddToPackageJson": false
2300
+ },
2301
+ "@angular-eslint/test-utils": {
2302
+ "version": "^22.1.0",
2303
+ "alwaysAddToPackageJson": false
2304
+ },
2305
+ "@angular-eslint/builder": {
2306
+ "version": "^22.1.0",
2307
+ "alwaysAddToPackageJson": false
2308
+ },
2309
+ "@angular-eslint/bundled-angular-compiler": {
2310
+ "version": "^22.1.0",
2311
+ "alwaysAddToPackageJson": false
2312
+ }
2313
+ }
2153
2314
  }
2154
2315
  }
2155
2316
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nx/angular",
3
- "version": "23.2.0-beta.1",
3
+ "version": "23.2.0-beta.10",
4
4
  "private": false,
5
5
  "type": "commonjs",
6
6
  "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, 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.",
@@ -73,22 +73,21 @@
73
73
  "dependencies": {
74
74
  "@phenomnomnominal/tsquery": "~6.2.0",
75
75
  "@typescript-eslint/type-utils": "^8.0.0",
76
- "enquirer": "~2.3.6",
77
76
  "jsonc-parser": "^3.2.0",
78
77
  "magic-string": "~0.30.2",
79
78
  "picocolors": "^1.1.0",
80
79
  "picomatch": "4.0.4",
81
80
  "semver": "^7.6.3",
82
81
  "tslib": "^2.3.0",
83
- "@nx/devkit": "23.2.0-beta.1",
84
- "@nx/eslint": "23.2.0-beta.1",
85
- "@nx/js": "23.2.0-beta.1",
86
- "@nx/web": "23.2.0-beta.1"
82
+ "@nx/devkit": "23.2.0-beta.10",
83
+ "@nx/web": "23.2.0-beta.10",
84
+ "@nx/js": "23.2.0-beta.10",
85
+ "@nx/eslint": "23.2.0-beta.10"
87
86
  },
88
87
  "devDependencies": {
89
- "@nx/cypress": "23.2.0-beta.1",
90
- "nx": "23.2.0-beta.1",
91
- "@nx/vitest": "23.2.0-beta.1"
88
+ "@nx/vitest": "23.2.0-beta.10",
89
+ "@nx/storybook": "23.2.0-beta.10",
90
+ "nx": "23.2.0-beta.10"
92
91
  },
93
92
  "peerDependencies": {
94
93
  "@angular/build": ">= 20.0.0 < 23.0.0",
@@ -99,9 +98,11 @@
99
98
  "ng-packagr": ">= 20.0.0 < 23.0.0",
100
99
  "rxjs": "^6.5.3 || ^7.5.0",
101
100
  "webpack-merge": "^5.8.0",
102
- "@nx/module-federation": "23.2.0-beta.1",
103
- "@nx/rspack": "23.2.0-beta.1",
104
- "@nx/webpack": "23.2.0-beta.1"
101
+ "@nx/module-federation": "23.2.0-beta.10",
102
+ "@nx/playwright": "23.2.0-beta.10",
103
+ "@nx/webpack": "23.2.0-beta.10",
104
+ "@nx/cypress": "23.2.0-beta.10",
105
+ "@nx/rspack": "23.2.0-beta.10"
105
106
  },
106
107
  "peerDependenciesMeta": {
107
108
  "@angular/build": {
@@ -110,6 +111,12 @@
110
111
  "@angular-devkit/build-angular": {
111
112
  "optional": true
112
113
  },
114
+ "@nx/cypress": {
115
+ "optional": true
116
+ },
117
+ "@nx/playwright": {
118
+ "optional": true
119
+ },
113
120
  "@nx/module-federation": {
114
121
  "optional": true
115
122
  },