@mouryaamit/nx-polystack 1.13.1 → 1.15.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 (38) hide show
  1. package/README.md +1 -1
  2. package/dist/migrations.json +5 -0
  3. package/dist/src/cli/commands/ionic-standalone.d.ts +67 -0
  4. package/dist/src/cli/commands/ionic-standalone.js +694 -0
  5. package/dist/src/cli/commands/ionic-standalone.js.map +1 -0
  6. package/dist/src/cli/commands/upgrade-standalone.d.ts +8 -1
  7. package/dist/src/cli/commands/upgrade-standalone.js +42 -10
  8. package/dist/src/cli/commands/upgrade-standalone.js.map +1 -1
  9. package/dist/src/cli/commands/upgrade.js +29 -3
  10. package/dist/src/cli/commands/upgrade.js.map +1 -1
  11. package/dist/src/cli/help.js +8 -2
  12. package/dist/src/cli/help.js.map +1 -1
  13. package/dist/src/cli/launcher.js +1 -0
  14. package/dist/src/cli/launcher.js.map +1 -1
  15. package/dist/src/generators/migrate/adapters/angular-cli.js +12 -0
  16. package/dist/src/generators/migrate/adapters/angular-cli.js.map +1 -1
  17. package/dist/src/generators/migrate/adapters/angular-workspace.js +4 -0
  18. package/dist/src/generators/migrate/adapters/angular-workspace.js.map +1 -1
  19. package/dist/src/generators/migrate/angular-config-files.js +16 -2
  20. package/dist/src/generators/migrate/angular-config-files.js.map +1 -1
  21. package/dist/src/generators/migrate/nx/build-scripts.d.ts +5 -0
  22. package/dist/src/generators/migrate/nx/build-scripts.js +10 -3
  23. package/dist/src/generators/migrate/nx/build-scripts.js.map +1 -1
  24. package/dist/src/generators/migrate/nx/detect.js +3 -2
  25. package/dist/src/generators/migrate/nx/detect.js.map +1 -1
  26. package/dist/src/generators/migrate/schema.json +1 -1
  27. package/dist/src/lib/hardening/source-maps.d.ts +1 -0
  28. package/dist/src/lib/hardening/source-maps.js +28 -7
  29. package/dist/src/lib/hardening/source-maps.js.map +1 -1
  30. package/dist/src/lib/utils/ionic-tags.d.ts +22 -0
  31. package/dist/src/lib/utils/ionic-tags.js +221 -0
  32. package/dist/src/lib/utils/ionic-tags.js.map +1 -0
  33. package/dist/src/lib/utils/karma-ci.d.ts +10 -0
  34. package/dist/src/lib/utils/karma-ci.js +42 -1
  35. package/dist/src/lib/utils/karma-ci.js.map +1 -1
  36. package/dist/src/lib/utils/quality.js +12 -3
  37. package/dist/src/lib/utils/quality.js.map +1 -1
  38. package/package.json +1 -1
package/README.md CHANGED
@@ -96,7 +96,7 @@ Ionic apps keep `IonicModule`; Ionic's own codemod moves them to Ionic's standal
96
96
  - build-provenance meta, EXIF stripping, leak checks, source-map control, comment and console
97
97
  stripping, and optional obfuscation.
98
98
  - **Migration** of existing projects into the workspace: standalone Angular CLI, Ionic/Capacitor and
99
- Flutter apps, multi-project Angular CLI repos, Nx 15–22 workspaces and npm/Yarn/pnpm workspaces —
99
+ Flutter apps, multi-project Angular CLI repos, Nx 14–22 workspaces and npm/Yarn/pnpm workspaces —
100
100
  with rollback.
101
101
  - **Repo infrastructure**: docs, CI gates (affected lint/test/build, dependency cycles, type checks),
102
102
  quality checks and a scheduled dependency-upgrade workflow.
@@ -137,6 +137,11 @@
137
137
  "version": "1.13.1",
138
138
  "description": "Karma test targets get a ci configuration (one run, ChromeHeadless) and the generated CI runs nx affected with -c ci, so Karma no longer watches forever",
139
139
  "implementation": "./src/migrations/karma-ci/karma-ci"
140
+ },
141
+ "typecheck-everywhere-1.14.0": {
142
+ "version": "1.14.0",
143
+ "description": "Run typecheck-everywhere again: projects without tsconfig.app.json/tsconfig.lib.json get typecheck from the tsconfig their build target names",
144
+ "implementation": "./src/migrations/typecheck-everywhere/typecheck-everywhere"
140
145
  }
141
146
  }
142
147
  }
@@ -0,0 +1,67 @@
1
+ import type * as TS from 'typescript';
2
+ import { AngularProject } from './upgrade-standalone';
3
+ /**
4
+ * The `ionic-standalone` step of `pstack upgrade standalone --ionic`: moves an Ionic app that
5
+ * bootstraps with `bootstrapApplication` from Ionic's lazy build (`IonicModule`) to Ionic's
6
+ * standalone components:
7
+ *
8
+ * 1. `importProvidersFrom(IonicModule.forRoot(config))` → `provideIonicAngular(config)` in
9
+ * `main.ts` / `app/app.config.ts`;
10
+ * 2. each standalone component drops `IonicModule` from `imports` and imports the `Ion*` classes
11
+ * of the `ion-*` tags in its template (plus `IonRouterLink` / `IonRouterLinkWithHref` next to
12
+ * `routerLink`);
13
+ * 3. other names imported from Ionic's NgModule entry move to the standalone entry;
14
+ * 4. `<ion-icon name="literal">` names are registered with `addIcons` in the component constructor;
15
+ * 5. the ionicons svg asset leaves the build options when no icon name is left that `addIcons`
16
+ * could not register.
17
+ *
18
+ * All or nothing per app: when one file cannot be converted safely, none of the app's files change
19
+ * and the reasons are reported. An app with no `IonicModule` left is not touched (a rerun changes
20
+ * nothing).
21
+ */
22
+ type Ts = typeof TS;
23
+ export interface IonicContext {
24
+ ts: Ts;
25
+ root: string;
26
+ /** Angular major of the workspace. */
27
+ major: number;
28
+ /** Where the standalone components come from. */
29
+ standaloneEntry: string;
30
+ /** Entries whose imports move to the standalone entry. */
31
+ moving: ReadonlySet<string>;
32
+ /** `Ion*` classes the standalone entry exports. */
33
+ classes: ReadonlySet<string>;
34
+ /** Every name the standalone entry exports, when it is installed. */
35
+ exports?: ReadonlySet<string>;
36
+ /** `ionicons/icons` export names, when installed. */
37
+ icons?: ReadonlySet<string>;
38
+ }
39
+ export interface IonicAppResult {
40
+ /** Absolute path → new text; empty when the app is skipped. */
41
+ writes: Map<string, string>;
42
+ done: string[];
43
+ notes: string[];
44
+ /** Why the app is left as it is (no file changed). */
45
+ reasons: string[];
46
+ }
47
+ /** The context for an Angular major, with the installed Ionic and ionicons exports when present. */
48
+ export declare function ionicContext(ts: Ts, root: string, major: number): IonicContext;
49
+ /** An app whose sources still import IonicModule from @ionic/angular (spec files aside). */
50
+ export declare function isIonicApp(root: string, project: AngularProject): boolean;
51
+ export interface TemplateTag {
52
+ name: string;
53
+ attrs: {
54
+ name: string;
55
+ value?: string;
56
+ }[];
57
+ }
58
+ /** Opening tags of an HTML template with their attributes (quoted values may hold `>`). */
59
+ export declare function scanTags(html: string): TemplateTag[];
60
+ /** Converts one Ionic app (nothing is written here; see IonicAppResult). */
61
+ export declare function convertIonicApp(c: IonicContext, project: AngularProject, libs?: AngularProject[]): IonicAppResult;
62
+ /**
63
+ * The ionic-standalone step on these apps: writes the changes of every app that converts safely,
64
+ * reports the others, and returns the files written (workspace-relative).
65
+ */
66
+ export declare function runIonicStep(root: string, apps: AngularProject[], libs: AngularProject[], angularMajor: number, say: (line: string) => void, log: (line: string) => void): string[];
67
+ export {};