@mittwald/flow-codemods 1.1.0-next.10 → 1.1.0-next.12

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/LICENSE +21 -0
  2. package/dist/migrations.generated.d.ts.map +1 -1
  3. package/dist/migrations.generated.js +9 -0
  4. package/package.json +3 -2
  5. package/dist/checks/context.d.ts +0 -16
  6. package/dist/checks/context.d.ts.map +0 -1
  7. package/dist/checks/context.js +0 -72
  8. package/dist/checks/load.d.ts +0 -13
  9. package/dist/checks/load.d.ts.map +0 -1
  10. package/dist/checks/load.js +0 -53
  11. package/dist/checks/types.d.ts +0 -49
  12. package/dist/checks/types.d.ts.map +0 -1
  13. package/dist/checks/types.js +0 -0
  14. package/dist/cli/detect.d.ts +0 -35
  15. package/dist/cli/detect.d.ts.map +0 -1
  16. package/dist/cli/detect.js +0 -62
  17. package/dist/cli/verify.d.ts +0 -77
  18. package/dist/cli/verify.d.ts.map +0 -1
  19. package/dist/cli/verify.js +0 -148
  20. package/dist/detect/align-to-combine.d.ts +0 -8
  21. package/dist/detect/align-to-combine.d.ts.map +0 -1
  22. package/dist/detect/align-to-combine.js +0 -9
  23. package/dist/detect/overlay-controller-add-on-close-return-type.d.ts +0 -9
  24. package/dist/detect/overlay-controller-add-on-close-return-type.d.ts.map +0 -1
  25. package/dist/detect/overlay-controller-add-on-close-return-type.js +0 -10
  26. package/dist/detect/tooltip-trigger-delay-type.d.ts +0 -11
  27. package/dist/detect/tooltip-trigger-delay-type.d.ts.map +0 -1
  28. package/dist/detect/tooltip-trigger-delay-type.js +0 -12
  29. package/dist/tsconfig.tsbuildinfo +0 -1
  30. package/dist/verify/align-to-combine.d.ts +0 -11
  31. package/dist/verify/align-to-combine.d.ts.map +0 -1
  32. package/dist/verify/align-to-combine.js +0 -22
  33. package/dist/verify/overlay-controller-add-on-close-return-type.d.ts +0 -14
  34. package/dist/verify/overlay-controller-add-on-close-return-type.d.ts.map +0 -1
  35. package/dist/verify/overlay-controller-add-on-close-return-type.js +0 -21
  36. package/dist/verify/tooltip-trigger-delay-type.d.ts +0 -13
  37. package/dist/verify/tooltip-trigger-delay-type.d.ts.map +0 -1
  38. package/dist/verify/tooltip-trigger-delay-type.js +0 -18
@@ -1,11 +0,0 @@
1
- import type { Verifier } from "../checks/types.js";
2
- /**
3
- * Shape "residual pattern + typecheck" (~14 of the 23 entries). Translated from
4
- * the catalogue's own verify prose: "tsc --noEmit passes, and `rg '\bAlign\b'`
5
- * finds no Flow import." The pattern half is decidable — `search` runs it, and
6
- * `ok` reflects it fully — so there is no separate judgement call left for a
7
- * person and `hints` stays empty. The typecheck half is not decidable here
8
- * (this package wraps no subprocess), so it stays a `typecheckHint`.
9
- */
10
- export declare const verifier: Verifier;
11
- //# sourceMappingURL=align-to-combine.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"align-to-combine.d.ts","sourceRoot":"","sources":["../../src/verify/align-to-combine.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAEnD;;;;;;;GAOG;AACH,eAAO,MAAM,QAAQ,EAAE,QActB,CAAC"}
@@ -1,22 +0,0 @@
1
- /**
2
- * Shape "residual pattern + typecheck" (~14 of the 23 entries). Translated from
3
- * the catalogue's own verify prose: "tsc --noEmit passes, and `rg '\bAlign\b'`
4
- * finds no Flow import." The pattern half is decidable — `search` runs it, and
5
- * `ok` reflects it fully — so there is no separate judgement call left for a
6
- * person and `hints` stays empty. The typecheck half is not decidable here
7
- * (this package wraps no subprocess), so it stays a `typecheckHint`.
8
- */
9
- export const verifier = {
10
- verify: async (context) => {
11
- // Unrestricted extensions, translated from `rg '\bAlign\b'` (no `-t ts`):
12
- // the codemod also rewrites the CSS class name and component tokens, so a
13
- // residual `Align` can show up outside a `.ts`/`.tsx` file too.
14
- const findings = await context.search(/\bAlign\b/);
15
- return {
16
- ok: findings.length === 0,
17
- findings,
18
- hints: [],
19
- typecheckHint: "Run `tsc --noEmit` too: `Align`/`AlignProps` still resolve (this rename is a deprecation, not a removal), so a missed usage does not fail to compile — the residual-usage search above is the real check for that, not the type check.",
20
- };
21
- },
22
- };
@@ -1,14 +0,0 @@
1
- import type { Verifier } from "../checks/types.js";
2
- /**
3
- * Shape "a person must judge it" (~6 of the 23 entries). Translated from the
4
- * catalogue's own verify prose, which says outright that no compiler check
5
- * catches this: the return type widened from `() => void` to `() => unknown`,
6
- * so every previous handler stays assignable and `tsc --noEmit` passes
7
- * unchanged whether or not a handler now vetoes a close/open it never meant to.
8
- * `ok: true` here means only "nothing this module can decide is wrong" — not
9
- * that the review happened, which is why the review instruction stays in
10
- * `hints` rather than moving to `typecheckHint` alongside the (here, negative)
11
- * fact about the typechecker.
12
- */
13
- export declare const verifier: Verifier;
14
- //# sourceMappingURL=overlay-controller-add-on-close-return-type.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"overlay-controller-add-on-close-return-type.d.ts","sourceRoot":"","sources":["../../src/verify/overlay-controller-add-on-close-return-type.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAEnD;;;;;;;;;;GAUG;AACH,eAAO,MAAM,QAAQ,EAAE,QAUtB,CAAC"}
@@ -1,21 +0,0 @@
1
- /**
2
- * Shape "a person must judge it" (~6 of the 23 entries). Translated from the
3
- * catalogue's own verify prose, which says outright that no compiler check
4
- * catches this: the return type widened from `() => void` to `() => unknown`,
5
- * so every previous handler stays assignable and `tsc --noEmit` passes
6
- * unchanged whether or not a handler now vetoes a close/open it never meant to.
7
- * `ok: true` here means only "nothing this module can decide is wrong" — not
8
- * that the review happened, which is why the review instruction stays in
9
- * `hints` rather than moving to `typecheckHint` alongside the (here, negative)
10
- * fact about the typechecker.
11
- */
12
- export const verifier = {
13
- verify: async () => ({
14
- ok: true,
15
- findings: [],
16
- hints: [
17
- "Review each handler by hand for one that can return `false` — `executeHandlers` now treats that as a veto and cancels the close/open, even for a handler that returned `false` incidentally with no intent to block anything.",
18
- ],
19
- typecheckHint: "`tsc --noEmit` passes before and after either way: `() => unknown` accepts every previous `addOnClose`/`addOnOpen` handler, so no compiler check catches this one — the review above is the real check.",
20
- }),
21
- };
@@ -1,13 +0,0 @@
1
- import type { Verifier } from "../checks/types.js";
2
- /**
3
- * Shape "typecheck alone suffices" (~3 of the 23 entries). Translated from the
4
- * catalogue's own verify prose: "tsc --noEmit passes — a numeric `delay` is a
5
- * type error, so no separate `rg` check is needed." There is nothing for
6
- * `search` to run here — a residual numeric literal is a type-level fact, not a
7
- * decidable text pattern — so this always returns `ok: true` with no further
8
- * judgement call, and leans entirely on `typecheckHint`. That is not "done":
9
- * the compiler run itself is outside what this package executes (no
10
- * subprocess), so it stays a person's job.
11
- */
12
- export declare const verifier: Verifier;
13
- //# sourceMappingURL=tooltip-trigger-delay-type.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"tooltip-trigger-delay-type.d.ts","sourceRoot":"","sources":["../../src/verify/tooltip-trigger-delay-type.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAEnD;;;;;;;;;GASG;AACH,eAAO,MAAM,QAAQ,EAAE,QAQtB,CAAC"}
@@ -1,18 +0,0 @@
1
- /**
2
- * Shape "typecheck alone suffices" (~3 of the 23 entries). Translated from the
3
- * catalogue's own verify prose: "tsc --noEmit passes — a numeric `delay` is a
4
- * type error, so no separate `rg` check is needed." There is nothing for
5
- * `search` to run here — a residual numeric literal is a type-level fact, not a
6
- * decidable text pattern — so this always returns `ok: true` with no further
7
- * judgement call, and leans entirely on `typecheckHint`. That is not "done":
8
- * the compiler run itself is outside what this package executes (no
9
- * subprocess), so it stays a person's job.
10
- */
11
- export const verifier = {
12
- verify: async () => ({
13
- ok: true,
14
- findings: [],
15
- hints: [],
16
- typecheckHint: 'Run `tsc --noEmit` — a numeric `delay` on `TooltipTrigger` is a type error under the new signature (only `"default"` and `"long"` are accepted), so a clean typecheck is sufficient on its own.',
17
- }),
18
- };