ReviewOS

also looking at this

home-lang/home

feat(ts-conformance): retire per-fixture TS5107 entries via directive helper

#65
Merged glennmichael123 wants to merge feat/retire-ts5107-shim-entries into main
1 file +197 -13

Review threads live on the whole diff, not on one commit, so none are shown here - a thread's line means something in the branch's final form, and painting it into an intermediate step would put it on code it is not about.

packages/ts_conformance/src/ts_conformance.zigmodified+13-20
Changes to packages/ts_conformance/src/ts_conformance.zig
@@ -843,26 +843,19 @@ fn hasHarnessModeledExpectedError(name: []const u8, source: []const u8) bool {
843843 }
844844 if (std.mem.indexOf(u8, name, "verbatimModuleSyntaxCompat2") != null) return true;
845845 if (std.mem.indexOf(u8, name, "verbatimModuleSyntaxCompat3") != null) return true;
846 // These ES5 destructuring variants only carry the upstream TS5107
847 // target-option deprecation diagnostic; the stripped runner has
848 // no source-level checker work to perform for them.
849 //
850 // NOTE: the coarse `had_errors` path in `runOneEntry` now routes
851 // these through `directiveTargetDeprecated(source)` directly, so
852 // the per-fixture entries below are redundant for that path.
853 // Kept for the exact-errors path until `ts_driver` emits a real
854 // TS5107 diagnostic whose byte-form matches the upstream
855 // `.errors.txt` baseline; drop these when that lands.
856 if (std.mem.eql(u8, name, "destructuringObjectAssignmentPatternWithNestedSpread")) return true;
857 if (std.mem.eql(u8, name, "destructuringEvaluationOrder")) return true;
858 if (std.mem.eql(u8, name, "destructuringTypeAssertionsES5_5")) return true;
859 if (std.mem.eql(u8, name, "destructuringObjectBindingPatternAndAssignment6")) return true;
860 if (std.mem.eql(u8, name, "destructuringObjectBindingPatternAndAssignment7")) return true;
861 if (std.mem.eql(u8, name, "destructuringObjectBindingPatternAndAssignment8")) return true;
862 if (std.mem.eql(u8, name, "emptyAssignmentPatterns01_ES5")) return true;
863 if (std.mem.eql(u8, name, "emptyAssignmentPatterns01_ES5iterable")) return true;
864 if (std.mem.eql(u8, name, "emptyAssignmentPatterns03_ES5")) return true;
865 if (std.mem.eql(u8, name, "emptyAssignmentPatterns03_ES5iterable")) return true;
846 // (Retired 2026-05-12) The ES5 destructuring + empty-assignment
847 // fixtures whose only upstream error is TS5107 target deprecation
848 // (`destructuringObjectBindingPatternAndAssignment6/7/8`,
849 // `destructuringObjectAssignmentPatternWithNestedSpread`,
850 // `destructuringEvaluationOrder`, `destructuringTypeAssertionsES5_5`,
851 // `emptyAssignmentPatterns01_ES5{,iterable}`,
852 // `emptyAssignmentPatterns03_ES5{,iterable}`) used to be modeled
853 // here. They were dead code: `loadDirectoryWithOptions` short-
854 // circuits via `baselineHasOnlyOptionDeprecation` and sets
855 // `expects_error=false` for these fixtures, so this shim was
856 // never consulted in the corpus path. Coarse-mode coverage of
857 // any *other* fixture with the same directive shape comes from
858 // `directiveTargetDeprecated(source)` in `runOneEntry`.
866859 // Target/emit-mode diagnostics in this arrow/unicode slice depend on
867860 // the upstream runner materializing target variants. The stripped
868861 // single-source checker runs one targetless source; keep those