From 29ea8862a201ada994c4be67024eb14e865a3429 Mon Sep 17 00:00:00 2001 From: Cameron Date: Sun, 29 Nov 2026 17:03:26 +0000 Subject: [PATCH] fix(lint/no-unnecessary-boolean-literal-compare): require nullable unions to contain only booleans --- .../no_unnecessary_boolean_literal_compare.rs | 11 +++++++++-- crates/tsrs_lint/tests/baselines/PROGRESS.md | 2 +- .../REFERENCE | 2 +- .../baseline.json | 14 ++++++++++++++ docs/COMPATIBILITY.md | 2 +- 5 files changed, 26 insertions(+), 5 deletions(-) diff --git a/crates/tsrs_lint/src/rules/no_unnecessary_boolean_literal_compare.rs b/crates/tsrs_lint/src/rules/no_unnecessary_boolean_literal_compare.rs index 92e32418b..f8c332c66 100644 --- a/crates/tsrs_lint/src/rules/no_unnecessary_boolean_literal_compare.rs +++ b/crates/tsrs_lint/src/rules/no_unnecessary_boolean_literal_compare.rs @@ -65,8 +65,15 @@ fn is_nullable_boolean(t: P) -> bool { if !t.flags().intersects(TypeFlags::Union) { return false; } - let flags = t.types().iter().fold(TypeFlags::None, |flags, part| flags | part.flags()); - flags.intersects(TypeFlags::Nullable) && flags.intersects(TypeFlags::BooleanLike) + let parts = t.types(); + let is_nullish = + |part: &P| part.flags().intersects(TypeFlags::Undefined | TypeFlags::Null); + parts.iter().any(is_nullish) + && !parts.iter().all(is_nullish) + && parts + .iter() + .filter(|part| !is_nullish(part)) + .all(|part| part.flags().intersects(TypeFlags::BooleanLike)) } fn get_boolean_comparison( diff --git a/crates/tsrs_lint/tests/baselines/PROGRESS.md b/crates/tsrs_lint/tests/baselines/PROGRESS.md index d69981b62..2af74f02a 100644 --- a/crates/tsrs_lint/tests/baselines/PROGRESS.md +++ b/crates/tsrs_lint/tests/baselines/PROGRESS.md @@ -26,7 +26,7 @@ and suggestions before its implementation commit. Upstream skips remain explicit | no-misused-spread | Updated to Go HEAD | 133 current cases, 1 upstream skips; string/array/iterable/class checks, allowlists, await and map suggestions | | no-mixed-enums | Updated to ddba56df | 54 current cases; initializer types, merged declarations, empty or non-enum earlier declarations, enums without symbols and namespace/module augmentation | | no-redundant-type-constituents | Updated to Go HEAD | 104 current cases; union/intersection overrides, aliases, literals and function return exceptions | -| no-unnecessary-boolean-literal-compare | Updated to Go HEAD | 50 current cases; nullable options, unary/precedence fixes and strictNullChecks diagnostics | +| no-unnecessary-boolean-literal-compare | Updated to ada797a9 | 51 current cases; boolean-only nullable unions, nullable options, unary/precedence fixes and strictNullChecks diagnostics | | no-unnecessary-condition | Updated to Go HEAD | 384 current cases; truthiness, nullish checks, optional chains, comparisons, loops and predicates | | no-unnecessary-qualifier | Updated to Go HEAD | 18 current cases; namespace/enum scope, alias resolution, shadowing and qualifier fixes | | no-unnecessary-template-expression | Updated to fc051153 | 185 current cases; string constraints, type templates, comments, canonical literals and raw escaping fixes | diff --git a/crates/tsrs_lint/tests/baselines/no-unnecessary-boolean-literal-compare/REFERENCE b/crates/tsrs_lint/tests/baselines/no-unnecessary-boolean-literal-compare/REFERENCE index 9b842313e..d07372a00 100644 --- a/crates/tsrs_lint/tests/baselines/no-unnecessary-boolean-literal-compare/REFERENCE +++ b/crates/tsrs_lint/tests/baselines/no-unnecessary-boolean-literal-compare/REFERENCE @@ -1,2 +1,2 @@ -tsgolint 4ebf80fd2b166cba4890c6896220fec4a1462b29 +tsgolint ada797a9a5f1684b39e40a966e77183c59f4e2d2 typescript-go 2bd066d87f5bafd315be9f40889d0a60b9e58e0b diff --git a/crates/tsrs_lint/tests/baselines/no-unnecessary-boolean-literal-compare/baseline.json b/crates/tsrs_lint/tests/baselines/no-unnecessary-boolean-literal-compare/baseline.json index b0bc00c28..ebb4c5cbc 100644 --- a/crates/tsrs_lint/tests/baselines/no-unnecessary-boolean-literal-compare/baseline.json +++ b/crates/tsrs_lint/tests/baselines/no-unnecessary-boolean-literal-compare/baseline.json @@ -246,6 +246,20 @@ "Tsx": false, "Files": {}, "Diagnostics": [] + }, + { + "Code": "\nexport function matches(x: 1 | true | undefined): boolean {\n return x === true;\n}\n ", + "Only": false, + "Skip": false, + "FileName": "", + "Options": { + "allowComparingNullableBooleansToFalse": true, + "allowComparingNullableBooleansToTrue": false + }, + "TSConfig": "", + "Tsx": false, + "Files": {}, + "Diagnostics": [] } ], "Invalid": [ diff --git a/docs/COMPATIBILITY.md b/docs/COMPATIBILITY.md index 4e6e41491..e282177e1 100644 --- a/docs/COMPATIBILITY.md +++ b/docs/COMPATIBILITY.md @@ -53,7 +53,7 @@ have been available since 0.20.0. | feature | status | evidence and notes | | --- | --- | --- | -| Type-aware linting | 62 rules | Rust headless binary `tsrs-lint`, also `tsrs --lint` (the npm `tsrs-lint` command), implements 62/62 pinned tsgolint rules; 8220 imported active case inputs pass, 28 upstream skips; the base corpus follows rebuilt tsgolint v7.0.2005 ([reference](../crates/tsrs_lint/tests/baselines/REFERENCE)), with per-rule scoped refreshes; no-misused-promises accepts `checksConditionals: { flagUnions }` from upstream #1353 ([reference](../crates/tsrs_lint/tests/baselines/no-misused-promises/REFERENCE)); no-unsafe-class-instance-assignment is added from upstream #1372 with the recursive comparison guard from #1373 ([reference](../crates/tsrs_lint/tests/baselines/no-unsafe-class-instance-assignment/REFERENCE)); no-meaningless-void-operator reports `void` on non-call operands from upstream #1375 ([reference](../crates/tsrs_lint/tests/baselines/no-meaningless-void-operator/REFERENCE)); restrict-template-expressions handles recursive arrays and tuples with `allowArray` from upstream #1377 ([reference](../crates/tsrs_lint/tests/baselines/restrict-template-expressions/REFERENCE)); non-nullable-type-assertion-style ignores JSDoc casts in JavaScript files from upstream #1286 ([reference](../crates/tsrs_lint/tests/baselines/non-nullable-type-assertion-style/REFERENCE)); no-duplicate-type-constituents fixes a duplicate after a template literal type without panicking from upstream #1389 ([reference](../crates/tsrs_lint/tests/baselines/no-duplicate-type-constituents/REFERENCE)); no-mixed-enums reads the desired member type from an earlier non-empty enum declaration without panicking from upstream #1400 ([reference](../crates/tsrs_lint/tests/baselines/no-mixed-enums/REFERENCE)); the lint traversal visits computed property names in destructuring assignments from upstream #1396 ([reference](../crates/tsrs_lint/tests/baselines/await-thenable/REFERENCE)); no-floating-promises skips parentheses around nested operands from upstream #1399 ([reference](../crates/tsrs_lint/tests/baselines/no-floating-promises/REFERENCE)); no-unnecessary-template-expression autofixes single interpolations only for exact `string` expressions and suggests narrowing removals from upstream #1367 ([reference](../crates/tsrs_lint/tests/baselines/no-unnecessary-template-expression/REFERENCE)); prefer-optional-chain includes 1178 cases, including JSX callback coverage from upstream #1335 ([reference](../crates/tsrs_lint/tests/baselines/prefer-optional-chain/REFERENCE)); no-unnecessary-type-assertion reports assertions that infer generic call type arguments without an autofix, and under `exactOptionalPropertyTypes` compares only the non-`undefined` members of unions that include `undefined` from upstream #1390 ([reference](../crates/tsrs_lint/tests/baselines/no-unnecessary-type-assertion/REFERENCE)); untyped explicit `this` parameters are handled without the current Go HEAD panic ([regression](../crates/tsrs_lint/tests/integration/headless.rs)); a relative type reference that reaches a symlinked package through a type root does not panic in a program with project references ([regression](../crates/tsrs_compiler/tests/integration/typeroot_candidate_test.rs)); `types: ["*"]` lists type roots without panicking in a program with project references ([regression](../crates/tsrs_compiler/tests/integration/program_test.rs)); diagnostics whose text holds a lone surrogate are reported where Go silently drops them ([investigation](../notes/tsgolint-diagnostic-parity.md)); identified rule-version gaps are synchronized to Go HEAD ([refresh evidence](../notes/tsgolint-head-refresh.md)); compiler-version and corpus-order differences remain documented ([investigation](../notes/tsgolint-diagnostic-parity.md)) ([progress](../crates/tsrs_lint/tests/baselines/PROGRESS.md), [baseline tests](../crates/tsrs_lint/tests/integration/baselines.rs)); recursive type-reference traversal includes the newer Go fix ([evidence](../crates/tsrs_lint/tests/fixtures/type_parameter_references/REFERENCE)); V1/V2 payloads reject unpaired JSON surrogate escapes ([protocol tests](../crates/tsrs_lint/tests/integration/protocol.rs)); custom-named configs reached through transitive project references retain inherited compiler options, including in deeper and diamond graphs ([discovery tests](../crates/tsrs_lint/tests/integration/engine_test.rs)); program loading/binding uses the compiler's parallel pool (default up to 32 threads, `RAYON_NUM_THREADS` override) with per-program allocation regions and honors `singleThreaded`; programs in one headless request share parsed extended and referenced-project configs and parsed/bound declaration files in request-owned regions, and a tsconfig program reuses its discovery parse when its config path has the spelling discovery parsed ([#949](https://github.com/oxc-project/tsrs/pull/949), [#950](https://github.com/oxc-project/tsrs/pull/950), [#951](https://github.com/oxc-project/tsrs/pull/951), [issue #1016](https://github.com/oxc-project/tsrs/issues/1016)); linting and requested semantic diagnostics run on each program's checker pool with the fast preset enabled by default (`TSRS_FAST=0` disables it; a positive `RAYON_NUM_THREADS` or a tsconfig `checkers` option sets the count), free the checkers with the program and retain file-order output frames; requested syntactic and semantic diagnostics (oxlint `--type-check`) cover only the files the request lists, as tsgolint does: other program files are not reported, global diagnostics are reported once per program on its tsconfig, declaration diagnostics are reported when `declaration` or `composite` is set, and listed files outside every tsconfig are type-checked in an inferred program ([regressions](../crates/tsrs_lint/tests/integration/headless.rs)); type-check diagnostics include a `category` field (`error`, `warning`, or `message`) so oxlint can map plugin warnings to warnings instead of errors (#1031, [regression](../crates/tsrs_lint/tests/integration/headless.rs)); each type error's description has its message chain, one line for each message, as `tsc` prints it, where tsgolint sends only the first line ([regression](../crates/tsrs_lint/tests/integration/headless.rs)); with semantic reporting enabled, every listed file is type-checked before rules run, so errors retain their file locations ([#955](https://github.com/oxc-project/tsrs/pull/955)); semantic reporting and linting share the pool checker that owns each file, accepting history-dependent diagnostics and fixes ([evidence](../notes/perf-tsgolint-shared-checker.md)); switch default-case comments honor the default marker and custom ECMAScript patterns, including lookarounds, backreferences and scoped `i`/`m`/`s` modifiers ([oracle regressions](../crates/tsrs_lint/tests/fixtures/switch_exhaustiveness_check/REFERENCE)); invalid patterns return protocol errors; virtual source overrides participate in package resolution and include globs ([overlay test](../crates/tsrs_lint/tests/integration/headless.rs)) ([concurrency test](../crates/tsrs_lint/tests/integration/headless.rs), [lifecycle tests](../crates/tsrs_lint/tests/integration/lifecycle.rs), [binding ownership test](../crates/tsrs_compiler/tests/integration/programregions_test.rs)) | +| Type-aware linting | 62 rules | Rust headless binary `tsrs-lint`, also `tsrs --lint` (the npm `tsrs-lint` command), implements 62/62 pinned tsgolint rules; 8221 imported active case inputs pass, 28 upstream skips; the base corpus follows rebuilt tsgolint v7.0.2005 ([reference](../crates/tsrs_lint/tests/baselines/REFERENCE)), with per-rule scoped refreshes; no-misused-promises accepts `checksConditionals: { flagUnions }` from upstream #1353 ([reference](../crates/tsrs_lint/tests/baselines/no-misused-promises/REFERENCE)); no-unsafe-class-instance-assignment is added from upstream #1372 with the recursive comparison guard from #1373 ([reference](../crates/tsrs_lint/tests/baselines/no-unsafe-class-instance-assignment/REFERENCE)); no-meaningless-void-operator reports `void` on non-call operands from upstream #1375 ([reference](../crates/tsrs_lint/tests/baselines/no-meaningless-void-operator/REFERENCE)); restrict-template-expressions handles recursive arrays and tuples with `allowArray` from upstream #1377 ([reference](../crates/tsrs_lint/tests/baselines/restrict-template-expressions/REFERENCE)); non-nullable-type-assertion-style ignores JSDoc casts in JavaScript files from upstream #1286 ([reference](../crates/tsrs_lint/tests/baselines/non-nullable-type-assertion-style/REFERENCE)); no-duplicate-type-constituents fixes a duplicate after a template literal type without panicking from upstream #1389 ([reference](../crates/tsrs_lint/tests/baselines/no-duplicate-type-constituents/REFERENCE)); no-unnecessary-boolean-literal-compare treats a union as a nullable boolean only when its non-nullish members are all boolean, from upstream #1401 ([reference](../crates/tsrs_lint/tests/baselines/no-unnecessary-boolean-literal-compare/REFERENCE)); no-mixed-enums reads the desired member type from an earlier non-empty enum declaration without panicking from upstream #1400 ([reference](../crates/tsrs_lint/tests/baselines/no-mixed-enums/REFERENCE)); the lint traversal visits computed property names in destructuring assignments from upstream #1396 ([reference](../crates/tsrs_lint/tests/baselines/await-thenable/REFERENCE)); no-floating-promises skips parentheses around nested operands from upstream #1399 ([reference](../crates/tsrs_lint/tests/baselines/no-floating-promises/REFERENCE)); no-unnecessary-template-expression autofixes single interpolations only for exact `string` expressions and suggests narrowing removals from upstream #1367 ([reference](../crates/tsrs_lint/tests/baselines/no-unnecessary-template-expression/REFERENCE)); prefer-optional-chain includes 1178 cases, including JSX callback coverage from upstream #1335 ([reference](../crates/tsrs_lint/tests/baselines/prefer-optional-chain/REFERENCE)); no-unnecessary-type-assertion reports assertions that infer generic call type arguments without an autofix, and under `exactOptionalPropertyTypes` compares only the non-`undefined` members of unions that include `undefined` from upstream #1390 ([reference](../crates/tsrs_lint/tests/baselines/no-unnecessary-type-assertion/REFERENCE)); untyped explicit `this` parameters are handled without the current Go HEAD panic ([regression](../crates/tsrs_lint/tests/integration/headless.rs)); a relative type reference that reaches a symlinked package through a type root does not panic in a program with project references ([regression](../crates/tsrs_compiler/tests/integration/typeroot_candidate_test.rs)); `types: ["*"]` lists type roots without panicking in a program with project references ([regression](../crates/tsrs_compiler/tests/integration/program_test.rs)); diagnostics whose text holds a lone surrogate are reported where Go silently drops them ([investigation](../notes/tsgolint-diagnostic-parity.md)); identified rule-version gaps are synchronized to Go HEAD ([refresh evidence](../notes/tsgolint-head-refresh.md)); compiler-version and corpus-order differences remain documented ([investigation](../notes/tsgolint-diagnostic-parity.md)) ([progress](../crates/tsrs_lint/tests/baselines/PROGRESS.md), [baseline tests](../crates/tsrs_lint/tests/integration/baselines.rs)); recursive type-reference traversal includes the newer Go fix ([evidence](../crates/tsrs_lint/tests/fixtures/type_parameter_references/REFERENCE)); V1/V2 payloads reject unpaired JSON surrogate escapes ([protocol tests](../crates/tsrs_lint/tests/integration/protocol.rs)); custom-named configs reached through transitive project references retain inherited compiler options, including in deeper and diamond graphs ([discovery tests](../crates/tsrs_lint/tests/integration/engine_test.rs)); program loading/binding uses the compiler's parallel pool (default up to 32 threads, `RAYON_NUM_THREADS` override) with per-program allocation regions and honors `singleThreaded`; programs in one headless request share parsed extended and referenced-project configs and parsed/bound declaration files in request-owned regions, and a tsconfig program reuses its discovery parse when its config path has the spelling discovery parsed ([#949](https://github.com/oxc-project/tsrs/pull/949), [#950](https://github.com/oxc-project/tsrs/pull/950), [#951](https://github.com/oxc-project/tsrs/pull/951), [issue #1016](https://github.com/oxc-project/tsrs/issues/1016)); linting and requested semantic diagnostics run on each program's checker pool with the fast preset enabled by default (`TSRS_FAST=0` disables it; a positive `RAYON_NUM_THREADS` or a tsconfig `checkers` option sets the count), free the checkers with the program and retain file-order output frames; requested syntactic and semantic diagnostics (oxlint `--type-check`) cover only the files the request lists, as tsgolint does: other program files are not reported, global diagnostics are reported once per program on its tsconfig, declaration diagnostics are reported when `declaration` or `composite` is set, and listed files outside every tsconfig are type-checked in an inferred program ([regressions](../crates/tsrs_lint/tests/integration/headless.rs)); type-check diagnostics include a `category` field (`error`, `warning`, or `message`) so oxlint can map plugin warnings to warnings instead of errors (#1031, [regression](../crates/tsrs_lint/tests/integration/headless.rs)); each type error's description has its message chain, one line for each message, as `tsc` prints it, where tsgolint sends only the first line ([regression](../crates/tsrs_lint/tests/integration/headless.rs)); with semantic reporting enabled, every listed file is type-checked before rules run, so errors retain their file locations ([#955](https://github.com/oxc-project/tsrs/pull/955)); semantic reporting and linting share the pool checker that owns each file, accepting history-dependent diagnostics and fixes ([evidence](../notes/perf-tsgolint-shared-checker.md)); switch default-case comments honor the default marker and custom ECMAScript patterns, including lookarounds, backreferences and scoped `i`/`m`/`s` modifiers ([oracle regressions](../crates/tsrs_lint/tests/fixtures/switch_exhaustiveness_check/REFERENCE)); invalid patterns return protocol errors; virtual source overrides participate in package resolution and include globs ([overlay test](../crates/tsrs_lint/tests/integration/headless.rs)) ([concurrency test](../crates/tsrs_lint/tests/integration/headless.rs), [lifecycle tests](../crates/tsrs_lint/tests/integration/lifecycle.rs), [binding ownership test](../crates/tsrs_compiler/tests/integration/programregions_test.rs)) | | JSON Unicode escape validation | partial | Lint payloads use the API transport's strict decoder, which rejects unpaired surrogate escapes with pinned Go's error text. The native Rust JSON decoder (`tsrs_core::json`) replaces them with U+FFFD, whereas pinned Go rejects them ([protocol tests](../crates/tsrs_lint/tests/integration/protocol.rs), [headless tests](../crates/tsrs_lint/tests/integration/headless.rs)) | | Type checking (`--noEmit`) | yes | All 13,700 error baselines and 12,998 `.types` / `.symbols` baselines match in both histories with the upstream emit sequence; flow-memo keys preserve full-width pointers on Windows and other 64-bit plain-pointer builds, keeping type-query initial states distinct (`recursiveTypesWithTypeof`, `stringLiteralsWithTypeAssertions01`); reserved high-range symbol IDs keep diagnostic truncation aligned with Go (`unique-symbol-link-id-truncation`); `using` with only `[Symbol.asyncDispose]` suggests `await using` (`usingAsyncDisposable`); JS classes eagerly check their own constructor-declared properties after their members, making implicit-any diagnostics stable for both class declarations and expressions (`flakyDiagnosticsJsClassPropertyInitializedToUndefined`); inferred type parameters are sorted by `CompareTypes` before constructing conditional type mappers (`stableTypeMapperOrdering`); merged-interface TS2320/TS2430 errors belong to the first declaration regardless of checker visit order, including when that declaration is in a skipped library (`mergedInterfaceAugmentationDiagnostics`, `mergedInterfaceDefaultLibraryDiagnostics`, `mergedInterfaceInheritanceDiagnostics`); type-argument inference caches distinct priority and variance states and reports the expected TS2345 for correlated union arguments (`inference-type-argument-variance`); static properties avoid contextual typing by their own class and spurious circularity errors (`classStaticPropertyNoSpuriousCircularityError1`); module import attribute types require string literals and reject template literals (`importAttributeType1`); pure return-type inference remains filtered by its constraint during recursive calls (`recursiveTypeInferenceReturnTypeConstraint`); the corrected `customConditions` fixture exercises both conditions and selects `browser` with package exports enabled, `index` with them disabled; empty and dot filename stems, trailing-slash type references, and NodeNext directory-import TS2834 match source 31; `typeof import()` qualifier names do not add emit-only missing-name diagnostics (`noFlakyDiagnosticsTypeofImportTypeQualifier1`, `noFlakyDiagnosticsTypeofImportTypeQualifier2`); deferred imports without namespace bindings report TS18117, including in unchecked JavaScript (`importDeferInvalidDefault`); enum computed-name expressions are checked even when their names have a grammar error, preserving expression diagnostics and reference marking (`missingIdentifierInEnumComputedNameNoFlake`, `parserComputedPropertyName16`); generic mapped-type `keyof` with renamed keys simplifies in bare and template-literal positions (`mappedTypeConstraints2`) and recursive indexed access (`mappedTypeAsClauseIntersectionConstraintIndexedAccess`); an import of an ambient module declared in the same file does not probe the filesystem for a package, including in the resolution trace (`ambientModuleImportingItselfNotResolved`); a relative type reference looked up in a type root uses a normalized candidate path, as in the resolution trace of tsgo (`type-root-relative-candidate`); a type reference or relative import whose name is only a drive root (`C:`) uses the candidate `C:/` as in tsgo, without the probe of `C:.d.ts` that panicked when the drive existed (`type-reference-drive-root`, [regression](../crates/tsrs_module/tests/integration/resolver_drive_root_test.rs)); a type reference or module name that ends with a directory separator skips the file lookup in a type root, as tsgo does (`type-root-trailing-separator-name`, `type-root-trailing-separator-module`); a relative import rewritten into a referenced project reports TS2878 when the two projects' root or output directories have different roots, such as drives, as in tsgo ([regression](../crates/tsrs_cli/tests/integration/rewrite_import_cross_drive_reference.rs)); conditional-type simplification caches reading and writing separately, preserving the write-side TS2322 (`simplifiedConditionalTypeWritingCache`); JavaScript JSDoc `@extends` type arguments apply to call, mixin, element-access, parenthesized, and conditional heritage expressions, and incompatible tags name the full heritage expression (`extendsTag7`–`extendsTag14`); mapped types in JavaScript JSDoc `@extends` and `@augments` type arguments match Go without panicking (`jsdoc-heritage-mapped-type`, `jsdoc-heritage-mapped-type-diagnostics`); async generator `yield` operands and `yield*` async iterables with no awaited type report TS1321, TS1062 or TS1322 and infer a `never` yield type without panicking (`async-generator-invalid-thenable-yield`); beside other yields, where pinned tsgo panics, the other yields give the yield type ([regression](../crates/tsrs_cli/tests/integration/async_generator_missing_yield_type.rs)); undefined-property widening caches by symbol identity, preserving the `undefinedPropertyDeclarationOrder` fixture and canonical `objectLiteralNormalization` baselines; a static initializer that assigns a later readonly property through a nested access (`C.self.later = 1`) reports TS2540 without spurious TS7022 circularity errors, as the declaration-order check skips a nested access before it resolves the property's type (`nested-property-access-declaration-order`); top-repository comparisons still report known parity gaps and tsrs failures; 0.20.1 removes a union-constraint shortcut that could miss `NoInfer` constituents (#808) | | Standard library typings | yes | Source 40 imports upstream `lib.dom.d.ts` and `lib.webworker.d.ts` byte for byte, including their expanded CSS, DOM, Serial, and WebTransport declarations; the two upstream type-baseline changes match. `esnext.promise` selects `lib.esnext.promise.d.ts`; `Promise.allKeyed` and `Promise.allSettledKeyed` preserve object keys and awaited value types (`promiseAllKeyed`). Source-phase imports add `lib.esnext.modulesource.d.ts` to the `esnext` aggregate and expose `AbstractModuleSource`. Source 62 adds `lib.esnext.iterator.d.ts` to that aggregate and maps `--lib esnext.iterator` to it, exposing `IteratorObject.chunks`, `join`, and `includes` plus `Iterator.zip` and `zipKeyed`; all six new compiler variants match error, type, symbol, and JavaScript baselines; replacement libraries retain discovery order when they share a priority (`libReplacementOrder`); `es2023.intl` adds `Intl.PluralRules.selectRange` with an `Intl.LDMLPluralRule` result (`intlPluralRulesSelectRangeES2023`). Windows `noembed` executable paths use the existing OS realpath normalization before adjacent-library lookup (`test_noembed_executable_realpath_uses_compiler_path_spelling` and the `npm_lib_path` CLI tests; Windows runtime validation pending). |