@openrewrite/recipes-angular 1.33.0 → 1.34.0

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 (50) hide show
  1. package/dist/index.d.ts +4 -0
  2. package/dist/index.d.ts.map +1 -1
  3. package/dist/index.js +35 -5
  4. package/dist/index.js.map +1 -1
  5. package/dist/libraries/components/lst.d.ts +7 -0
  6. package/dist/libraries/components/lst.d.ts.map +1 -1
  7. package/dist/libraries/components/lst.js +11 -0
  8. package/dist/libraries/components/lst.js.map +1 -1
  9. package/dist/libraries/components/package-version.d.ts +7 -2
  10. package/dist/libraries/components/package-version.d.ts.map +1 -1
  11. package/dist/libraries/components/package-version.js +5 -3
  12. package/dist/libraries/components/package-version.js.map +1 -1
  13. package/dist/libraries/components/symbols.d.ts +3 -0
  14. package/dist/libraries/components/symbols.d.ts.map +1 -1
  15. package/dist/libraries/components/symbols.js +8 -0
  16. package/dist/libraries/components/symbols.js.map +1 -1
  17. package/dist/libraries/ng-inline-svg/migrate-ng-inline-svg.d.ts +127 -0
  18. package/dist/libraries/ng-inline-svg/migrate-ng-inline-svg.d.ts.map +1 -0
  19. package/dist/libraries/ng-inline-svg/migrate-ng-inline-svg.js +708 -0
  20. package/dist/libraries/ng-inline-svg/migrate-ng-inline-svg.js.map +1 -0
  21. package/dist/libraries/ng2-cookies/migrate-ng2-cookies.d.ts +60 -0
  22. package/dist/libraries/ng2-cookies/migrate-ng2-cookies.d.ts.map +1 -0
  23. package/dist/libraries/ng2-cookies/migrate-ng2-cookies.js +472 -0
  24. package/dist/libraries/ng2-cookies/migrate-ng2-cookies.js.map +1 -0
  25. package/dist/migration/package-major.d.ts +43 -0
  26. package/dist/migration/package-major.d.ts.map +1 -0
  27. package/dist/migration/package-major.js +100 -0
  28. package/dist/migration/package-major.js.map +1 -0
  29. package/dist/migration/replace-platform-browser-dynamic.d.ts +32 -0
  30. package/dist/migration/replace-platform-browser-dynamic.d.ts.map +1 -0
  31. package/dist/migration/replace-platform-browser-dynamic.js +212 -0
  32. package/dist/migration/replace-platform-browser-dynamic.js.map +1 -0
  33. package/dist/migration/upgrade-to-angular-20.d.ts.map +1 -1
  34. package/dist/migration/upgrade-to-angular-20.js +4 -1
  35. package/dist/migration/upgrade-to-angular-20.js.map +1 -1
  36. package/dist/migration/use-angular-build-builders.d.ts +51 -0
  37. package/dist/migration/use-angular-build-builders.d.ts.map +1 -0
  38. package/dist/migration/use-angular-build-builders.js +280 -0
  39. package/dist/migration/use-angular-build-builders.js.map +1 -0
  40. package/package.json +2 -2
  41. package/src/index.ts +19 -0
  42. package/src/libraries/components/lst.ts +11 -0
  43. package/src/libraries/components/package-version.ts +7 -7
  44. package/src/libraries/components/symbols.ts +7 -0
  45. package/src/libraries/ng-inline-svg/migrate-ng-inline-svg.ts +613 -0
  46. package/src/libraries/ng2-cookies/migrate-ng2-cookies.ts +425 -0
  47. package/src/migration/package-major.ts +93 -0
  48. package/src/migration/replace-platform-browser-dynamic.ts +197 -0
  49. package/src/migration/upgrade-to-angular-20.ts +4 -1
  50. package/src/migration/use-angular-build-builders.ts +285 -0
@@ -0,0 +1,43 @@
1
+ import { ExecutionContext, Recipe, TreeVisitor } from "@openrewrite/rewrite";
2
+ import { Json } from "@openrewrite/rewrite/json";
3
+ /** The version of a package to add for one major of the package it follows, or from that major on with `andLater`. */
4
+ export interface MajorVersion {
5
+ major: number;
6
+ version: string;
7
+ andLater?: boolean;
8
+ }
9
+ /** `^M.0.0` for each major from `first` to `last`. */
10
+ export declare function caretMajors(first: number, last: number): MajorVersion[];
11
+ /**
12
+ * One `addDependency` for each of `versions`, adding `packageName` to each `package.json` that declares a package
13
+ * matching one of `declaring`, before the cycle's edits, and resolves `following` within that major: by the version its
14
+ * lock resolves, else when every version its constraint admits is within it. A `package.json` that already declares
15
+ * `packageName` is left as it is.
16
+ */
17
+ export declare function addDependencyByMajor(packageName: string, scope: 'dependencies' | 'devDependencies', declaring: string[], following: string, versions: MajorVersion[]): Promise<Recipe[]>;
18
+ /**
19
+ * Removes `packageName` from each `package.json` that no source it serves still imports it from, by the nearest
20
+ * `package.json` above each source that declares it. Imports are read before the cycle's edits, so a composite that
21
+ * rewrites them in the same run must set `causesAnotherCycle` for the removal to land in the next cycle.
22
+ */
23
+ export declare function removeDependencyUnlessImported(packageName: string): Promise<Recipe>;
24
+ /** The npm range of one major, or of it and every later one, prereleases included. */
25
+ export declare function majorRange(major: number, andLater?: boolean): string;
26
+ /**
27
+ * The major that `addDependencyByMajor` takes a `package.json` to resolve `packageName` at, if it can tell: the major of
28
+ * the version its lock resolves, else of a constraint that admits versions of one major only, such as `^20.1.0`,
29
+ * `~20.1.0`, `20.x` or `20.1.0`.
30
+ */
31
+ export declare function singleMajor(packageJson: Json.Document, packageName: string): number | undefined;
32
+ /**
33
+ * Records the `singleMajor` of `packageName` of every `package.json` that it can tell, keyed by its directory, so that a
34
+ * code change runs where `addDependencyByMajor` adds the package it moves the code to, and nowhere else.
35
+ */
36
+ /**
37
+ * Whether a `package.json` declares `requires`, if one is given. A migration whose code changes run after the step that
38
+ * adds the package they import moves code only where that step could add it: npm refuses the edit, and the step leaves
39
+ * the `package.json` alone, in a project whose lock already has a peer conflict of its own.
40
+ */
41
+ export declare function declares(doc: Json.Document, requires: string | undefined): boolean;
42
+ export declare function singleMajorScanner(packageName: string, majors: Map<string, number>, requires?: string): TreeVisitor<any, ExecutionContext>;
43
+ //# sourceMappingURL=package-major.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"package-major.d.ts","sourceRoot":"","sources":["../../src/migration/package-major.ts"],"names":[],"mappings":"AAMA,OAAO,EAAC,gBAAgB,EAAE,MAAM,EAAE,WAAW,EAAC,MAAM,sBAAsB,CAAC;AAE3E,OAAO,EAAC,IAAI,EAAc,MAAM,2BAA2B,CAAC;AAG5D,sHAAsH;AACtH,MAAM,WAAW,YAAY;IACzB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACtB;AAED,sDAAsD;AACtD,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,YAAY,EAAE,CAEvE;AAED;;;;;GAKG;AACH,wBAAsB,oBAAoB,CAAC,WAAW,EAAE,MAAM,EAAE,KAAK,EAAE,cAAc,GAAG,iBAAiB,EAC9D,SAAS,EAAE,MAAM,EAAE,EAAE,SAAS,EAAE,MAAM,EACtC,QAAQ,EAAE,YAAY,EAAE,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,CAQtF;AAED;;;;GAIG;AACH,wBAAgB,8BAA8B,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAEnF;AAED,sFAAsF;AACtF,wBAAgB,UAAU,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,UAAQ,GAAG,MAAM,CAElE;AAED;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,WAAW,EAAE,IAAI,CAAC,QAAQ,EAAE,WAAW,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAO/F;AAED;;;GAGG;AACH;;;;GAIG;AACH,wBAAgB,QAAQ,CAAC,GAAG,EAAE,IAAI,CAAC,QAAQ,EAAE,QAAQ,EAAE,MAAM,GAAG,SAAS,GAAG,OAAO,CAElF;AAED,wBAAgB,kBAAkB,CAAC,WAAW,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,WAAW,CAAC,GAAG,EAAE,gBAAgB,CAAC,CAU1I"}
@@ -0,0 +1,100 @@
1
+ "use strict";
2
+ /*
3
+ * Copyright 2026 the original author or authors.
4
+ *
5
+ * Moderne Proprietary. Only for use by Moderne customers under the terms of a commercial contract.
6
+ */
7
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
8
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
9
+ return new (P || (P = Promise))(function (resolve, reject) {
10
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
11
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
12
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
13
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
14
+ });
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ exports.caretMajors = caretMajors;
18
+ exports.addDependencyByMajor = addDependencyByMajor;
19
+ exports.removeDependencyUnlessImported = removeDependencyUnlessImported;
20
+ exports.majorRange = majorRange;
21
+ exports.singleMajor = singleMajor;
22
+ exports.declares = declares;
23
+ exports.singleMajorScanner = singleMajorScanner;
24
+ const javascript_1 = require("@openrewrite/rewrite/javascript");
25
+ const json_1 = require("@openrewrite/rewrite/json");
26
+ const package_version_1 = require("../libraries/components/package-version");
27
+ /** `^M.0.0` for each major from `first` to `last`. */
28
+ function caretMajors(first, last) {
29
+ return Array.from({ length: last - first + 1 }, (_, i) => ({ major: first + i, version: `^${first + i}.0.0` }));
30
+ }
31
+ /**
32
+ * One `addDependency` for each of `versions`, adding `packageName` to each `package.json` that declares a package
33
+ * matching one of `declaring`, before the cycle's edits, and resolves `following` within that major: by the version its
34
+ * lock resolves, else when every version its constraint admits is within it. A `package.json` that already declares
35
+ * `packageName` is left as it is.
36
+ */
37
+ function addDependencyByMajor(packageName, scope, declaring, following, versions) {
38
+ return __awaiter(this, void 0, void 0, function* () {
39
+ return Promise.all(versions.map(({ major, version, andLater }) => (0, javascript_1.addDependency)({
40
+ packageName,
41
+ version,
42
+ scope,
43
+ onlyIfDeclaring: declaring,
44
+ onlyIfResolving: [`${following}@${majorRange(major, andLater)}`],
45
+ })));
46
+ });
47
+ }
48
+ /**
49
+ * Removes `packageName` from each `package.json` that no source it serves still imports it from, by the nearest
50
+ * `package.json` above each source that declares it. Imports are read before the cycle's edits, so a composite that
51
+ * rewrites them in the same run must set `causesAnotherCycle` for the removal to land in the next cycle.
52
+ */
53
+ function removeDependencyUnlessImported(packageName) {
54
+ return (0, javascript_1.removeDependency)({ packageName, unlessImporting: [packageName] });
55
+ }
56
+ /** The npm range of one major, or of it and every later one, prereleases included. */
57
+ function majorRange(major, andLater = false) {
58
+ return andLater ? `>=${major}.0.0-0` : `>=${major}.0.0-0 <${major + 1}.0.0-0`;
59
+ }
60
+ /**
61
+ * The major that `addDependencyByMajor` takes a `package.json` to resolve `packageName` at, if it can tell: the major of
62
+ * the version its lock resolves, else of a constraint that admits versions of one major only, such as `^20.1.0`,
63
+ * `~20.1.0`, `20.x` or `20.1.0`.
64
+ */
65
+ function singleMajor(packageJson, packageName) {
66
+ var _a, _b;
67
+ const marker = (0, javascript_1.findNodeResolutionResult)(packageJson);
68
+ // `peerDependencies` state a compatible range, not the version the project installs.
69
+ const resolved = marker && ((_b = (_a = [...marker.dependencies, ...marker.devDependencies].find(d => d.name === packageName)) === null || _a === void 0 ? void 0 : _a.resolved) === null || _b === void 0 ? void 0 : _b.version);
70
+ const version = resolved !== null && resolved !== void 0 ? resolved : (0, package_version_1.declaredVersion)(packageJson, packageName);
71
+ const match = version === null || version === void 0 ? void 0 : version.trim().match(resolved ? /^v?(\d+)\./ : /^[\^~]?v?(\d+)(?:\.(?:\d+|x|\*)){0,2}(?:-[\w.]+)?$/);
72
+ return match ? Number(match[1]) : undefined;
73
+ }
74
+ /**
75
+ * Records the `singleMajor` of `packageName` of every `package.json` that it can tell, keyed by its directory, so that a
76
+ * code change runs where `addDependencyByMajor` adds the package it moves the code to, and nowhere else.
77
+ */
78
+ /**
79
+ * Whether a `package.json` declares `requires`, if one is given. A migration whose code changes run after the step that
80
+ * adds the package they import moves code only where that step could add it: npm refuses the edit, and the step leaves
81
+ * the `package.json` alone, in a project whose lock already has a peer conflict of its own.
82
+ */
83
+ function declares(doc, requires) {
84
+ return requires === undefined || (0, package_version_1.declaredVersion)(doc, requires) !== undefined;
85
+ }
86
+ function singleMajorScanner(packageName, majors, requires) {
87
+ return new class extends json_1.JsonVisitor {
88
+ visitDocument(doc, _p) {
89
+ return __awaiter(this, void 0, void 0, function* () {
90
+ const path = doc.sourcePath;
91
+ const major = (path === 'package.json' || path.endsWith('/package.json')) && declares(doc, requires) ?
92
+ singleMajor(doc, packageName) : undefined;
93
+ if (major !== undefined)
94
+ majors.set((0, package_version_1.directoryOf)(path), major);
95
+ return doc;
96
+ });
97
+ }
98
+ }();
99
+ }
100
+ //# sourceMappingURL=package-major.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"package-major.js","sourceRoot":"","sources":["../../src/migration/package-major.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;;;;;;;;;AAeH,kCAEC;AAQD,oDAUC;AAOD,wEAEC;AAGD,gCAEC;AAOD,kCAOC;AAWD,4BAEC;AAED,gDAUC;AArFD,gEAA0G;AAC1G,oDAA4D;AAC5D,6EAAqF;AASrF,sDAAsD;AACtD,SAAgB,WAAW,CAAC,KAAa,EAAE,IAAY;IACnD,OAAO,KAAK,CAAC,IAAI,CAAC,EAAC,MAAM,EAAE,IAAI,GAAG,KAAK,GAAG,CAAC,EAAC,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,EAAC,KAAK,EAAE,KAAK,GAAG,CAAC,EAAE,OAAO,EAAE,IAAI,KAAK,GAAG,CAAC,MAAM,EAAC,CAAC,CAAC,CAAC;AAChH,CAAC;AAED;;;;;GAKG;AACH,SAAsB,oBAAoB,CAAC,WAAmB,EAAE,KAAyC,EAC9D,SAAmB,EAAE,SAAiB,EACtC,QAAwB;;QAC/D,OAAO,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,EAAC,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAC,EAAE,EAAE,CAAC,IAAA,0BAAa,EAAC;YAC1E,WAAW;YACX,OAAO;YACP,KAAK;YACL,eAAe,EAAE,SAAS;YAC1B,e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,SAAS,CAAC;AAChD,CAAC;AAED;;;GAGG;AACH;;;;GAIG;AACH,SAAgB,QAAQ,CAAC,GAAkB,EAAE,QAA4B;IACrE,OAAO,QAAQ,KAAK,SAAS,IAAI,IAAA,iCAAe,EAAC,GAAG,EAAE,QAAQ,CAAC,KAAK,SAAS,CAAC;AAClF,CAAC;AAED,SAAgB,kBAAkB,CAAC,WAAmB,EAAE,MAA2B,EAAE,QAAiB;IAClG,OAAO,IAAI,KAAM,SAAQ,kBAA6B;QAClC,aAAa,CAAC,GAAkB,EAAE,EAAoB;;gBAClE,MAAM,IAAI,GAAG,GAAG,CAAC,UAAU,CAAC;gBAC5B,MAAM,KAAK,GAAG,CAAC,IAAI,KAAK,cAAc,IAAI,IAAI,CAAC,QAAQ,CAAC,eAAe,CAAC,CAAC,IAAI,QAAQ,CAAC,GAAG,EAAE,QAAQ,CAAC,CAAC,CAAC;oBAClG,WAAW,CAAC,GAAG,EAAE,WAAW,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;gBAC9C,IAAI,KAAK,KAAK,SAAS;oBAAE,MAAM,CAAC,GAAG,CAAC,IAAA,6BAAW,EAAC,IAAI,CAAC,EAAE,KAAK,CAAC,CAAC;gBAC9D,OAAO,GAAG,CAAC;YACf,CAAC;SAAA;KACJ,EAAE,CAAC;AACR,CAAC"}
@@ -0,0 +1,32 @@
1
+ import { ExecutionContext, ScanningRecipe, TreeVisitor } from "@openrewrite/rewrite";
2
+ /**
3
+ * The directories of the workspace files, and for each project, by the directory of its `package.json`, whether one
4
+ * of its sources sets the test environment up without resetting it, as a Karma `test.ts` or a Jest setup file does.
5
+ */
6
+ interface Projects {
7
+ workspaces: Set<string>;
8
+ packages: Map<string, string>;
9
+ sharedSetup: Set<string>;
10
+ }
11
+ /**
12
+ * Moves code off `@angular/platform-browser-dynamic`, which Angular 20 deprecated in favor of `@angular/platform-browser`.
13
+ *
14
+ * The only thing the dynamic platform adds to `platformBrowser` is loading `@angular/compiler`, for applications
15
+ * that compile just in time. The Angular CLI's builders add that import themselves to every JIT build (an `aot: false`
16
+ * build and the Karma and unit-test builders), and since Angular 20 `@angular/core/testing` imports it for `TestBed`.
17
+ * So in a project that `angular.json` (or an Nx `project.json`) builds, `platformBrowser` needs nothing more, and an
18
+ * ahead-of-time build stops shipping the compiler. A source file that no such workspace builds imports
19
+ * `@angular/compiler` itself, which is what the dynamic platform did for it before.
20
+ *
21
+ * @see https://github.com/angular/angular/blob/main/packages/platform-browser-dynamic/src/platform-browser-dynamic.ts
22
+ */
23
+ export declare class ReplacePlatformBrowserDynamic extends ScanningRecipe<Projects> {
24
+ readonly name = "org.openrewrite.angular.migration.replace-platform-browser-dynamic";
25
+ readonly displayName: string;
26
+ readonly description: string;
27
+ initialValue(_ctx: ExecutionContext): Projects;
28
+ scanner(projects: Projects): Promise<TreeVisitor<any, ExecutionContext>>;
29
+ editorWithData(projects: Projects): Promise<TreeVisitor<any, ExecutionContext>>;
30
+ }
31
+ export {};
32
+ //# sourceMappingURL=replace-platform-browser-dynamic.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"replace-platform-browser-dynamic.d.ts","sourceRoot":"","sources":["../../src/migration/replace-platform-browser-dynamic.ts"],"names":[],"mappings":"AAMA,OAAO,EAAC,gBAAgB,EAAqB,cAAc,EAAE,WAAW,EAAC,MAAM,sBAAsB,CAAC;AAiDtG;;;GAGG;AACH,UAAU,QAAQ;IACd,UAAU,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IACxB,QAAQ,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC9B,WAAW,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;CAC5B;AA4CD;;;;;;;;;;;GAWG;AACH,qBAAa,6BAA8B,SAAQ,cAAc,CAAC,QAAQ,CAAC;IACvE,QAAQ,CAAC,IAAI,wEAAwE;IACrF,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAkF;IAC9G,QAAQ,CAAC,WAAW,EAAE,MAAM,CAOsF;IAElH,YAAY,CAAC,IAAI,EAAE,gBAAgB,GAAG,QAAQ;IAIxC,OAAO,CAAC,QAAQ,EAAE,QAAQ,GAAG,OAAO,CAAC,WAAW,CAAC,GAAG,EAAE,gBAAgB,CAAC,CAAC;IAmBxE,cAAc,CAAC,QAAQ,EAAE,QAAQ,GAAG,OAAO,CAAC,WAAW,CAAC,GAAG,EAAE,gBAAgB,CAAC,CAAC;CA0CxF"}
@@ -0,0 +1,212 @@
1
+ "use strict";
2
+ /*
3
+ * Copyright 2026 the original author or authors.
4
+ *
5
+ * Moderne Proprietary. Only for use by Moderne customers under the terms of a commercial contract.
6
+ */
7
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
8
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
9
+ return new (P || (P = Promise))(function (resolve, reject) {
10
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
11
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
12
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
13
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
14
+ });
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ exports.ReplacePlatformBrowserDynamic = void 0;
18
+ const rewrite_1 = require("@openrewrite/rewrite");
19
+ const javascript_1 = require("@openrewrite/rewrite/javascript");
20
+ const java_1 = require("@openrewrite/rewrite/java");
21
+ const json_1 = require("@openrewrite/rewrite/json");
22
+ const path_1 = require("path");
23
+ const lst_1 = require("../libraries/components/lst");
24
+ const symbols_1 = require("../libraries/components/symbols");
25
+ const package_version_1 = require("../libraries/components/package-version");
26
+ const DYNAMIC = '@angular/platform-browser-dynamic';
27
+ const DYNAMIC_TESTING = '@angular/platform-browser-dynamic/testing';
28
+ /** The members of `@angular/platform-browser-dynamic` that have a replacement of the same shape elsewhere. */
29
+ const MOVES = [
30
+ { oldModule: DYNAMIC, oldMember: 'platformBrowserDynamic', newModule: '@angular/platform-browser', newMember: 'platformBrowser' },
31
+ // The package is versioned in lockstep with `@angular/core`, so the two `VERSION`s are the same version.
32
+ { oldModule: DYNAMIC, oldMember: 'VERSION', newModule: '@angular/core', newMember: 'VERSION' },
33
+ { oldModule: DYNAMIC_TESTING, oldMember: 'platformBrowserDynamicTesting', newModule: '@angular/platform-browser/testing', newMember: 'platformBrowserTesting' },
34
+ { oldModule: DYNAMIC_TESTING, oldMember: 'BrowserDynamicTestingModule', newModule: '@angular/platform-browser/testing', newMember: 'BrowserTestingModule' },
35
+ ];
36
+ /** The files that say an Angular CLI or Nx builder builds the projects beneath them. */
37
+ const WORKSPACE_FILES = new Set(['angular.json', '.angular-cli.json', 'project.json', 'workspace.json']);
38
+ const LEFTOVER = "`@angular/platform-browser-dynamic` is deprecated since Angular 20. This import has no replacement of the same shape (`JitCompilerFactory` is not needed under Ivy, " +
39
+ "and a bare or namespace import is left for a hand migration): use `@angular/platform-browser`, and import " +
40
+ "`@angular/compiler` where the application compiles just in time outside the Angular CLI.";
41
+ const RESETS = "This file resets the test environment and sets it up again, which needs the platform it creates to " +
42
+ "be the one the environment it replaces was set up with, here the `platformBrowserDynamicTesting` of a setup that " +
43
+ "no source of this project holds, such as the one `jest-preset-angular` runs. Angular throws NG0400 for a " +
44
+ "different one, so this import was left as it is: move it to `@angular/platform-browser/testing` together with " +
45
+ "that setup.";
46
+ const COMPILER = '@angular/compiler';
47
+ /** Whether a source file calls `resetTestEnvironment()` and `initTestEnvironment()`. */
48
+ function testEnvironmentCalls(cu, p) {
49
+ return __awaiter(this, void 0, void 0, function* () {
50
+ const calls = { resets: false, inits: false };
51
+ yield new class extends javascript_1.JavaScriptVisitor {
52
+ visitMethodInvocation(method, ctx) {
53
+ const _super = Object.create(null, {
54
+ visitMethodInvocation: { get: () => super.visitMethodInvocation }
55
+ });
56
+ return __awaiter(this, void 0, void 0, function* () {
57
+ if (method.name.simpleName === 'resetTestEnvironment')
58
+ calls.resets = true;
59
+ if (method.name.simpleName === 'initTestEnvironment')
60
+ calls.inits = true;
61
+ return _super.visitMethodInvocation.call(this, method, ctx);
62
+ });
63
+ }
64
+ }().visit(cu, p);
65
+ return calls;
66
+ });
67
+ }
68
+ const isDynamicModule = (module) => module === DYNAMIC || module === DYNAMIC_TESTING;
69
+ /** The names a `{...}` import clause takes from its module, as the module exports them. */
70
+ function namedMembers(imp) {
71
+ var _a;
72
+ const named = (_a = imp.importClause) === null || _a === void 0 ? void 0 : _a.namedBindings;
73
+ if ((named === null || named === void 0 ? void 0 : named.kind) !== javascript_1.JS.Kind.NamedImports)
74
+ return undefined;
75
+ return named.elements.elements.map(({ element }) => {
76
+ const imported = element.specifier;
77
+ const name = imported.kind === javascript_1.JS.Kind.Alias ? imported.propertyName.element : imported;
78
+ return name.kind === java_1.J.Kind.Identifier ? name.simpleName :
79
+ name.kind === java_1.J.Kind.Literal ? String(name.value) : '';
80
+ });
81
+ }
82
+ function dynamicImports(cu) {
83
+ return cu.statements
84
+ .map(({ element }) => element)
85
+ .filter((s) => s.kind === javascript_1.JS.Kind.Import && isDynamicModule((0, symbols_1.moduleOf)(s)));
86
+ }
87
+ function importsModule(cu, module) {
88
+ return cu.statements.some(({ element }) => element.kind === javascript_1.JS.Kind.Import && (0, symbols_1.moduleOf)(element) === module);
89
+ }
90
+ /**
91
+ * Moves the `@angular/compiler` import that was just added to the top of the file, where the Angular CLI loads it too
92
+ * (as the first polyfill), so that it is in place before any other module evaluates. The import takes the place of
93
+ * the first statement, comments such as a license header included, and that statement the line the import had.
94
+ */
95
+ function loadCompilerFirst(cu) {
96
+ const index = cu.statements.findIndex(({ element }) => element.kind === javascript_1.JS.Kind.Import && (0, symbols_1.moduleOf)(element) === COMPILER);
97
+ if (index <= 0)
98
+ return cu;
99
+ const statements = [...cu.statements];
100
+ const [compiler] = statements.splice(index, 1);
101
+ const first = statements[0];
102
+ statements[0] = Object.assign(Object.assign({}, first), { element: Object.assign(Object.assign({}, first.element), { prefix: compiler.element.prefix }) });
103
+ statements.unshift(Object.assign(Object.assign({}, compiler), { element: Object.assign(Object.assign({}, compiler.element), { prefix: first.element.prefix }) }));
104
+ return Object.assign(Object.assign({}, cu), { statements });
105
+ }
106
+ const isBeneath = (path, dir) => !path_1.posix.relative(dir, path).startsWith('..');
107
+ /**
108
+ * Moves code off `@angular/platform-browser-dynamic`, which Angular 20 deprecated in favor of `@angular/platform-browser`.
109
+ *
110
+ * The only thing the dynamic platform adds to `platformBrowser` is loading `@angular/compiler`, for applications
111
+ * that compile just in time. The Angular CLI's builders add that import themselves to every JIT build (an `aot: false`
112
+ * build and the Karma and unit-test builders), and since Angular 20 `@angular/core/testing` imports it for `TestBed`.
113
+ * So in a project that `angular.json` (or an Nx `project.json`) builds, `platformBrowser` needs nothing more, and an
114
+ * ahead-of-time build stops shipping the compiler. A source file that no such workspace builds imports
115
+ * `@angular/compiler` itself, which is what the dynamic platform did for it before.
116
+ *
117
+ * @see https://github.com/angular/angular/blob/main/packages/platform-browser-dynamic/src/platform-browser-dynamic.ts
118
+ */
119
+ class ReplacePlatformBrowserDynamic extends rewrite_1.ScanningRecipe {
120
+ constructor() {
121
+ super(...arguments);
122
+ this.name = "org.openrewrite.angular.migration.replace-platform-browser-dynamic";
123
+ this.displayName = "Replace `@angular/platform-browser-dynamic` with `@angular/platform-browser`";
124
+ this.description = "Angular 20 deprecated `@angular/platform-browser-dynamic`. Replaces `platformBrowserDynamic` " +
125
+ "with `platformBrowser`, `platformBrowserDynamicTesting` and `BrowserDynamicTestingModule` with " +
126
+ "`platformBrowserTesting` and `BrowserTestingModule` from `@angular/platform-browser/testing`, and its `VERSION` " +
127
+ "with the one of `@angular/core`. Outside an Angular CLI or Nx workspace, where no builder adds the JIT " +
128
+ "compiler, the bootstrap file imports `@angular/compiler` as the dynamic platform did. `JitCompilerFactory` " +
129
+ "and bare or namespace imports of the package are flagged for a hand migration. So are the testing imports of a " +
130
+ "file that resets the test environment in a project where no source sets it up otherwise, as when " +
131
+ "`jest-preset-angular` does, since the file would set it up again on a different platform than that setup's.";
132
+ }
133
+ initialValue(_ctx) {
134
+ return { workspaces: new Set(), packages: new Map(), sharedSetup: new Set() };
135
+ }
136
+ scanner(projects) {
137
+ return __awaiter(this, void 0, void 0, function* () {
138
+ const json = new class extends json_1.JsonVisitor {
139
+ visitDocument(doc, _p) {
140
+ return __awaiter(this, void 0, void 0, function* () {
141
+ const name = path_1.posix.basename(doc.sourcePath);
142
+ if (WORKSPACE_FILES.has(name))
143
+ projects.workspaces.add(path_1.posix.dirname(path_1.posix.normalize(doc.sourcePath)));
144
+ if (name === 'package.json')
145
+ projects.packages.set((0, package_version_1.directoryOf)(doc.sourcePath), (0, package_version_1.directoryOf)(doc.sourcePath));
146
+ return doc;
147
+ });
148
+ }
149
+ }();
150
+ const sources = new class extends javascript_1.JavaScriptVisitor {
151
+ visitJsCompilationUnit(cu, p) {
152
+ return __awaiter(this, void 0, void 0, function* () {
153
+ const calls = yield testEnvironmentCalls(cu, p);
154
+ if (calls.inits && !calls.resets)
155
+ projects.sharedSetup.add(cu.sourcePath);
156
+ return cu;
157
+ });
158
+ }
159
+ }();
160
+ return (0, lst_1.inSequence)(json, sources);
161
+ });
162
+ }
163
+ editorWithData(projects) {
164
+ return __awaiter(this, void 0, void 0, function* () {
165
+ const workspaces = projects.workspaces;
166
+ const projectOf = (path) => { var _a; return (_a = (0, package_version_1.majorFor)(projects.packages, path)) !== null && _a !== void 0 ? _a : ''; };
167
+ const shared = new Set([...projects.sharedSetup].map(projectOf));
168
+ const moves = yield Promise.all(MOVES.map((move) => __awaiter(this, void 0, void 0, function* () { return ({ move, editor: yield new javascript_1.ChangeImport(move).editor() }); })));
169
+ return new class extends javascript_1.JavaScriptVisitor {
170
+ visitJsCompilationUnit(cu, p) {
171
+ return __awaiter(this, void 0, void 0, function* () {
172
+ var _a;
173
+ const before = dynamicImports(cu);
174
+ if (before.length === 0)
175
+ return cu;
176
+ const path = path_1.posix.normalize(cu.sourcePath);
177
+ const bootstraps = before.some(imp => { var _a; return (0, symbols_1.moduleOf)(imp) === DYNAMIC && ((_a = namedMembers(imp)) === null || _a === void 0 ? void 0 : _a.includes('platformBrowserDynamic')); });
178
+ const needsCompiler = bootstraps && ![...workspaces].some(dir => isBeneath(path, dir));
179
+ const keepsTesting = before.some(imp => (0, symbols_1.moduleOf)(imp) === DYNAMIC_TESTING) &&
180
+ !shared.has(projectOf(cu.sourcePath)) && (yield testEnvironmentCalls(cu, p)).resets;
181
+ let result = cu;
182
+ for (const { move, editor } of moves) {
183
+ if (keepsTesting && move.oldModule === DYNAMIC_TESTING)
184
+ continue;
185
+ result = (_a = (yield editor.visit(result, p, this.cursor.parent))) !== null && _a !== void 0 ? _a : result;
186
+ }
187
+ // Whatever is still imported from the package has no replacement of the same shape, or is kept for
188
+ // the test environment this file sets up again.
189
+ const statements = result.statements.map(rp => {
190
+ const s = rp.element;
191
+ if (s.kind !== javascript_1.JS.Kind.Import)
192
+ return rp;
193
+ const module = (0, symbols_1.moduleOf)(s);
194
+ const message = keepsTesting && module === DYNAMIC_TESTING ? RESETS : isDynamicModule(module) ? LEFTOVER : undefined;
195
+ return message && !(0, lst_1.hasSearchResult)(s, message) ? Object.assign(Object.assign({}, rp), { element: (0, rewrite_1.foundSearchResult)(s, message) }) : rp;
196
+ });
197
+ if (statements.some((rp, i) => rp !== result.statements[i]))
198
+ result = Object.assign(Object.assign({}, result), { statements });
199
+ if (needsCompiler && !importsModule(result, COMPILER)) {
200
+ const added = yield new javascript_1.AddImport({ module: COMPILER, sideEffectOnly: true })
201
+ .visit(result, p, this.cursor.parent);
202
+ result = added ? loadCompilerFirst(added) : result;
203
+ }
204
+ return result;
205
+ });
206
+ }
207
+ }();
208
+ });
209
+ }
210
+ }
211
+ exports.ReplacePlatformBrowserDynamic = ReplacePlatformBrowserDynamic;
212
+ //# sourceMappingURL=replace-platform-browser-dynamic.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"replace-platform-browser-dynam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;4BAAE,MAAM,mCAAO,MAAM,KAAE,UAAU,GAAC,CAAC;wBAE9F,IAAI,aAAa,IAAI,CAAC,aAAa,CAAC,MAAM,EAAE,QAAQ,CAAC,EAAE,CAAC;4BACpD,MAAM,KAAK,GAAG,MAAM,IAAI,sBAAS,CAAmB,EAAC,MAAM,EAAE,QAAQ,EAAE,cAAc,EAAE,IAAI,EAAC,CAAC;iCACxF,KAAK,CAAqB,MAAM,EAAE,CAAC,EAAE,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;4BAC9D,MAAM,GAAG,KAAK,CAAC,CAAC,CAAC,iBAAiB,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC;wBACvD,CAAC;wBACD,OAAO,MAAM,CAAC;oBAClB,CAAC;iBAAA;aACJ,EAAE,CAAC;QACR,CAAC;KAAA;CACJ;AA7ED,sEA6EC"}
@@ -1 +1 @@
1
- {"version":3,"file":"upgrade-to-angular-20.d.ts","sourceRoot":"","sources":["../../src/migration/upgrade-to-angular-20.ts"],"names":[],"mappings":"AAMA,OAAO,EAAC,MAAM,EAAC,MAAM,sBAAsB,CAAC;AAe5C,qBAAa,6BAA8B,SAAQ,MAAM;IACrD,QAAQ,CAAC,IAAI,2DAA2D;IACxE,QAAQ,CAAC,WAAW,0CAA0C;IAC9D,QAAQ,CAAC,WAAW,SACkE;IAEhF,UAAU,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC;CAkCxC;AAED,qBAAa,kBAAmB,SAAQ,MAAM;IAC1C,QAAQ,CAAC,IAAI,gDAAgD;IAC7D,QAAQ,CAAC,WAAW,2BAA2B;IAC/C,QAAQ,CAAC,WAAW,SAKqE;IAEnF,UAAU,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC;CAiBxC"}
1
+ {"version":3,"file":"upgrade-to-angular-20.d.ts","sourceRoot":"","sources":["../../src/migration/upgrade-to-angular-20.ts"],"names":[],"mappings":"AAMA,OAAO,EAAC,MAAM,EAAC,MAAM,sBAAsB,CAAC;AAgB5C,qBAAa,6BAA8B,SAAQ,MAAM;IACrD,QAAQ,CAAC,IAAI,2DAA2D;IACxE,QAAQ,CAAC,WAAW,0CAA0C;IAC9D,QAAQ,CAAC,WAAW,SACkE;IAEhF,UAAU,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC;CAoCxC;AAED,qBAAa,kBAAmB,SAAQ,MAAM;IAC1C,QAAQ,CAAC,IAAI,gDAAgD;IAC7D,QAAQ,CAAC,WAAW,2BAA2B;IAC/C,QAAQ,CAAC,WAAW,SAKqE;IAEnF,UAAU,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC;CAiBxC"}
@@ -25,6 +25,7 @@ const move_document_to_core_1 = require("./move-document-to-core");
25
25
  const remove_standalone_true_1 = require("./remove-standalone-true");
26
26
  const remove_zone_js_polyfill_1 = require("./remove-zone-js-polyfill");
27
27
  const replace_provide_server_routing_1 = require("./replace-provide-server-routing");
28
+ const replace_platform_browser_dynamic_1 = require("./replace-platform-browser-dynamic");
28
29
  const upgrade_to_cdk_1 = require("../libraries/cdk/upgrade-to-cdk");
29
30
  const upgrade_to_material_1 = require("../libraries/material/upgrade-to-material");
30
31
  const angular_version_1 = require("./angular-version");
@@ -67,6 +68,8 @@ class UpgradeToAngular20CodeChanges extends rewrite_1.Recipe {
67
68
  newModule: "@angular/ssr",
68
69
  }),
69
70
  new replace_provide_server_routing_1.ReplaceProvideServerRouting(),
71
+ // `@angular/platform-browser-dynamic` is deprecated in favor of `@angular/platform-browser`
72
+ new replace_platform_browser_dynamic_1.ReplacePlatformBrowserDynamic(),
70
73
  new upgrade_to_cdk_1.UpgradeToCdk20CodeChanges(),
71
74
  new upgrade_to_material_1.UpgradeToMaterial20CodeChanges(),
72
75
  ]),
@@ -83,7 +86,7 @@ class UpgradeToAngular20 extends rewrite_1.Recipe {
83
86
  this.description = "Migrates Angular 19.x applications to Angular 20. " +
84
87
  "This includes running the Angular 19 migration first, then updating Angular package versions, " +
85
88
  "renaming experimental APIs promoted to stable, moving `provideServerRendering` to `@angular/ssr` and " +
86
- "folding `provideServerRouting` into it, and upgrading TypeScript to 5.8.x." +
89
+ "folding `provideServerRouting` into it, moving off the deprecated `@angular/platform-browser-dynamic`, and upgrading TypeScript to 5.8.x." +
87
90
  " It includes the Angular Material code changes of version 20." +
88
91
  " Projects that use NgRx also get the NgRx 20 migration and its `@ngrx/*` versions.";
89
92
  }
@@ -1 +1 @@
1
- {"version":3,"file":"upgrade-to-angular-20.js","sourceRoot":"","sources":["../../src/migration/upgrade-to-angular-20.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;;;;;;;;;;AAEH,kDAA4C;AAC5C,gEAA6D;AAC7D,iFAA0E;AAC1E,mEAAsE;AACtE,uEAA+D;AAC/D,iEAA0D;AAC1D,mEAA2D;AAC3D,qEAA8D;AAC9D,uEAA+D;AAC/D,qFAA6E;AAC7E,oEAA0E;AAC1E,mFAAyF;AACzF,uDAAgD;AAChD,6EAAgF;AAEhF,MAAa,6BAA8B,SAAQ,gBAAM;IAAzD;;QACa,SAAI,GAAG,uDAAuD,CAAC;QAC/D,gBAAW,GAAG,sCAAsC,CAAC;QACrD,gBAAW,GAAG,wFAAwF;YAC3G,iFAAiF,CAAC;IAoC1F,CAAC;IAlCS,UAAU;;YACZ,OAAO;gBACH,IAAI,qDAA6B,EAAE;gBACnC,GAAG,IAAA,+BAAa,EAAC,EAAE,EAAE;oBACjB,uBAAuB;oBACvB,IAAI,yBAAY,CAAC;wBACb,SAAS,EAAE,eAAe;wBAC1B,SAAS,EAAE,4CAA4C;wBACvD,SAAS,EAAE,eAAe;wBAC1B,SAAS,EAAE,gCAAgC;qBAC9C,CAAC;oBACF,IAAI,8CAAoB,EAAE;oBAC1B,IAAI,yBAAY,CAAC;wBACb,SAAS,EAAE,eAAe;wBAC1B,SAAS,EAAE,aAAa;wBACxB,SAAS,EAAE,eAAe;wBAC1B,SAAS,EAAE,kBAAkB;qBAChC,CAAC;oBACF,IAAI,yCAAkB,EAAE;oBACxB,IAAI,0CAAkB,EAAE;oBACxB,IAAI,6CAAoB,EAAE;oBAC1B,IAAI,8CAAoB,EAAE;oBAC1B,gEAAgE;oBAChE,IAAI,yBAAY,CAAC;wBACb,SAAS,EAAE,0BAA0B;wBACrC,SAAS,EAAE,wBAAwB;wBACnC,SAAS,EAAE,cAAc;qBAC5B,CAAC;oBACF,IAAI,4DAA2B,EAAE;oBACjC,IAAI,0CAAyB,EAAE;oBAC/B,IAAI,oDAA8B,EAAE;iBACvC,CAAC;aACL,CAAC;QACN,CAAC;KAAA;CACJ;AAxCD,sEAwCC;AAED,MAAa,kBAAmB,SAAQ,gBAAM;IAA9C;;QACa,SAAI,GAAG,4CAA4C,CAAC;QACpD,gBAAW,GAAG,uBAAuB,CAAC;QACtC,gBAAW,GAAG,oDAAoD;YACvE,gGAAgG;YAChG,uGAAuG;YACvG,4EAA4E;YAC5E,+DAA+D;YAC/D,oFAAoF,CAAC;IAmB7F,CAAC;IAjBS,UAAU;;YACZ,OAAO;gBACH,IAAI,6BAA6B,EAAE;gBACnC,uFAAuF;gBACvF,IAAI,+CAA0B,EAAE;gBAChC,oFAAoF;gBACpF,MAAM,IAAA,yDAA0B,EAAC,EAAE,EAAE;oBACjC,sBAAsB,EAAE,MAAM;oBAC9B,oBAAoB,EAAE,MAAM;oBAC5B,+BAA+B,EAAE,MAAM;oBACvC,4BAA4B,EAAE,UAAU;oBACxC,+BAA+B,EAAE,UAAU;oBAC3C,qBAAqB,EAAE,MAAM;oBAC7B,YAAY,EAAE,OAAO;iBACxB,CAAC;aACL,CAAC;QACN,CAAC;KAAA;CACJ;AA3BD,gDA2BC"}
1
+ {"version":3,"file":"upgrade-to-angular-20.js","sourceRoot":"","sources":["../../src/migration/upgrade-to-angular-20.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;;;;;;;;;;AAEH,kDAA4C;AAC5C,gEAA6D;AAC7D,iFAA0E;AAC1E,mEAAsE;AACtE,uEAA+D;AAC/D,iEAA0D;AAC1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AG,4CAA4C,CAAC;QACpD,gBAAW,GAAG,uBAAuB,CAAC;QACtC,gBAAW,GAAG,oDAAoD;YACvE,gGAAgG;YAChG,uGAAuG;YACvG,2IAA2I;YAC3I,+DAA+D;YAC/D,oFAAoF,CAAC;IAmB7F,CAAC;IAjBS,UAAU;;YACZ,OAAO;gBACH,IAAI,6BAA6B,EAAE;gBACnC,uFAAuF;gBACvF,IAAI,+CAA0B,EAAE;gBAChC,oFAAoF;gBACpF,MAAM,IAAA,yDAA0B,EAAC,EAAE,EAAE;oBACjC,sBAAsB,EAAE,MAAM;oBAC9B,oBAAoB,EAAE,MAAM;oBAC5B,+BAA+B,EAAE,MAAM;oBACvC,4BAA4B,EAAE,UAAU;oBACxC,+BAA+B,EAAE,UAAU;oBAC3C,qBAAqB,EAAE,MAAM;oBAC7B,YAAY,EAAE,OAAO;iBACxB,CAAC;aACL,CAAC;QACN,CAAC;KAAA;CACJ;AA3BD,gDA2BC"}
@@ -0,0 +1,51 @@
1
+ import { ExecutionContext, Recipe, ScanningRecipe, TreeVisitor } from "@openrewrite/rewrite";
2
+ /**
3
+ * For each directory with a `package.json`, the major of `@angular-devkit/build-angular` and whether it declares
4
+ * `@angular/build`, or `UseAngularBuildBuilders` adds it there.
5
+ */
6
+ interface Workspaces {
7
+ majors: Map<string, number>;
8
+ declaring: Map<string, boolean>;
9
+ /** Whether the `package.json` declares `zone.js`. */
10
+ zone: Map<string, boolean>;
11
+ }
12
+ /**
13
+ * Moves the builders of an `angular.json` workspace from `@angular-devkit/build-angular` to `@angular/build`, as the
14
+ * last step of the Angular CLI's `use-application-builder` migration does once nothing in the workspace needs the
15
+ * webpack-based builders.
16
+ *
17
+ * A workspace moves only as a whole, since otherwise it would need both packages. One that still uses a builder
18
+ * that `@angular/build` lacks (`browser`, `server`, `app-shell`, `prerender`, `ssr-dev-server`, `jest`,
19
+ * `web-test-runner`, `protractor`, and `browser-esbuild`, whose migration changes the output location) keeps its
20
+ * builders, and that builder is flagged. So is a workspace on a major before `karma` and `ng-packagr` came to
21
+ * `@angular/build` (19) that uses them. Workspaces before Angular 18, or whose version it cannot tell, are left alone.
22
+ *
23
+ * The builders resolve from `@angular/build` only where the `package.json` declares it.
24
+ * `@angular-devkit/build-angular` depends on `@angular/build` of the same version from 18 on, but npm can nest it under
25
+ * `@angular-devkit/build-angular` and pnpm always does, where the CLI does not resolve builders. So a workspace moves
26
+ * only when its `package.json` declares `@angular/build`, or `UseAngularBuildBuilders` adds it there in the same run,
27
+ * and is flagged otherwise. The `package.json` keeps `@angular-devkit/build-angular`, so Karma configurations that load
28
+ * its plugin keep working.
29
+ *
30
+ * @see https://github.com/angular/angular-cli/blob/main/packages/schematics/angular/migrations/use-application-builder/migration.ts
31
+ */
32
+ export declare class MoveToAngularBuildBuilders extends ScanningRecipe<Workspaces> {
33
+ readonly name = "org.openrewrite.angular.migration.move-to-angular-build-builders";
34
+ readonly displayName: string;
35
+ readonly description: string;
36
+ initialValue(_ctx: ExecutionContext): Workspaces;
37
+ scanner({ majors, declaring, zone }: Workspaces): Promise<TreeVisitor<any, ExecutionContext>>;
38
+ editorWithData({ majors, declaring, zone }: Workspaces): Promise<TreeVisitor<any, ExecutionContext>>;
39
+ }
40
+ /**
41
+ * Moves the builders of `angular.json` to `@angular/build` and declares `@angular/build` in `devDependencies` at the
42
+ * major of `@angular-devkit/build-angular`, as the Angular CLI's `use-application-builder` migration does.
43
+ */
44
+ export declare class UseAngularBuildBuilders extends Recipe {
45
+ readonly name = "org.openrewrite.angular.migration.use-angular-build-builders";
46
+ readonly displayName: string;
47
+ readonly description: string;
48
+ recipeList(): Promise<Recipe[]>;
49
+ }
50
+ export {};
51
+ //# sourceMappingURL=use-angular-build-builders.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-angular-build-builders.d.ts","sourceRoot":"","sources":["../../src/migration/use-angular-build-builders.ts"],"names":[],"mappings":"AAMA,OAAO,EAAC,gBAAgB,EAAqB,MAAM,EAAE,cAAc,EAAE,WAAW,EAAC,MAAM,sBAAsB,CAAC;AAyD9G;;;GAGG;AACH,UAAU,UAAU;IAChB,MAAM,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC5B,SAAS,EAAE,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAChC,qDAAqD;IACrD,IAAI,EAAE,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAC9B;AAiFD;;;;;;;;;;;;;;;;;;;GAmBG;AACH,qBAAa,0BAA2B,SAAQ,cAAc,CAAC,UAAU,CAAC;IACtE,QAAQ,CAAC,IAAI,sEAAsE;IACnF,QAAQ,CAAC,WAAW,EAAE,MAAM,CAA6D;IACzF,QAAQ,CAAC,WAAW,EAAE,MAAM,CASkB;IAE9C,YAAY,CAAC,IAAI,EAAE,gBAAgB,GAAG,UAAU;IAI1C,OAAO,CAAC,EAAC,MAAM,EAAE,SAAS,EAAE,IAAI,EAAC,EAAE,UAAU,GAAG,OAAO,CAAC,WAAW,CAAC,GAAG,EAAE,gBAAgB,CAAC,CAAC;IAe3F,cAAc,CAAC,EAAC,MAAM,EAAE,SAAS,EAAE,IAAI,EAAC,EAAE,UAAU,GAAG,OAAO,CAAC,WAAW,CAAC,GAAG,EAAE,gBAAgB,CAAC,CAAC;CAsB3G;AAED;;;GAGG;AACH,qBAAa,uBAAwB,SAAQ,MAAM;IAC/C,QAAQ,CAAC,IAAI,kEAAkE;IAC/E,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAyD;IACrF,QAAQ,CAAC,WAAW,EAAE,MAAM,CAUmC;IAEzD,UAAU,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC;CAMxC"}