Repository navigation
@effect/tsgo@0.38.0
Minor Changes
-
773b245: Add the
allOfMapToForEachstyle diagnostic, which suggests replacing
Effect.all(values.map(callback), options)with the equivalent
Effect.forEach(values, callback, options)form. -
fe7a29e: Add the
catchAllDieToOrDiestyle diagnostic, which suggests replacing
Effect.catchorEffect.catchAllwithEffect.orDiewhen the catch-all
handler forwards its typed failure unchanged toEffect.die. -
32c575a: Add the
catchConditionalRefailToCatchIfdiagnostic for conditionalEffect.catchandEffect.catchCausehandlers that re-fail their untouched input, suggestingEffect.catchIf,Effect.catchCauseIf, orEffect.catchTagas appropriate. -
41ec458: Detect the data-first form of
effectMapVoidby driving detection off piping flows.effectMapVoidpreviously matched only the data-last / pipeable form of the pattern, so a data-firstEffect.map(self, () => {})was missed. Detection now runs over the piping-flow transformations, which normalize the subject away, so both forms are reported uniformly and the quick fix rewrites each one correctly.For example, the data-first call:
Effect.map(Effect.succeed(1), () => {})
is now flagged and fixed to:
Effect.asVoid(Effect.succeed(1))
while the existing data-last form (
pipe(self, Effect.map(() => {}))) continues to be fixed to a bareEffect.asVoid. -
1ab4380: Improve dual function detection by matching alpha-equivalent data-first and pipeable overload declarations without instantiating their generic signatures.
For example, data-first calls such as
Option.match(value, handlers)now normalize to the same piping-flow representation asvalue.pipe(Option.match(handlers)), even when the overloads reorder generic parameters or return a generic union. -
2ae20c4: Refactor the
mapSomeToAsSomemapper detection onto the sharedUnwrapIdentityForwarderhelper. The diagnostic and quick fix now also recognize identity-forwarding function expressions:// now triggers, alongside Effect.map(Option.some) and Effect.map((v) => Option.some(v)) numberEffect.pipe( Effect.map(function (value) { return Option.some(value) }) )
Annotated or optional mapper parameters and explicit type arguments on the inner
Option.somecall still do not trigger, since they can intentionally widen the resultingOptiontype. -
2a02aae: Add the
mapSomeToAsSomediagnostic and quick fix, which replacesEffect.map(Option.some)and its exact eta-expanded form withEffect.asSomein pipeable and data-first flows.
Patch Changes
-
68a603e: Bound CI Go caches with a resolved cache identity
repoctl upstream resolvenow emits a Go cache identity derived fromupstream.json: thetypescriptcomponent owns and saves its Go caches,oxlint-tsgolintrestores the compiler objects already cached by the typescript jobs under its TypeScript dependency version (Go's build cache is content-addressed, so the shared compiler packages hit directly), and the Rust-basedoxlintcomponent skips Go caching entirely instead of saving a duplicate GOCACHE snapshot.The go-build cache key no longer includes the commit SHA, so a multi-GB cache entry is written once per dependency state instead of on every push to main, and non-materialized setups are restore-only. Previously each push saved ~15GB of duplicate GOCACHE snapshots, evicting every other cache in the repository (GitHub caps repository caches at 10GB) and forcing all validation jobs to run cold.
The generated shim cache key now also hashes
_patches/typescript/**, so patch changes for the migrated TypeScript compiler repository invalidate cached shims correctly. -
e30bbdb: Fix
supportedEffectmetadata for two rules whose declaration disagreed with their actual behavior:genericEffectServicesdeclared["v3", "v4"]but is gated to run only on Effect v3 projects. It now declares["v3"], so v4 users no longer enable a rule that can never fire.schemaSyncInEffectdeclared["v3"]but fully supports Effect v4 (suggestingdecodeEffect/encodeEffectvariants). It now declares["v3", "v4"].
metadata.jsonand the generated rule docs were regenerated accordingly. No diagnostic behavior changed. -
24cbb0d: Fix
repoctl upstream updatefailing when a TypeScript commit is reachable from both supported provider repositories.Previously,
resolveTypeScriptProviderandreadRemoteTypeScriptGitlinkin_tools/repoctl/src/upstream.tserrored out withTypeScript commit <sha> matched 2 supported repositorieswhenever a single revision existed in bothmicrosoft/TypeScript(the canonical upstream) and the legacymicrosoft/typescript-gofork. This blocked the daily "Update Upstreams" workflow for revisions shared between the two.Both functions now prefer
microsoft/TypeScriptwhen it matches and fall back tomicrosoft/typescript-gootherwise. A "no supported repository matched" error is still raised when neither matches. -
7a07115: Update the TypeScript next tag to
typescript@next, which shipstypescript-gocommit5739027c9a7df24e27123f453a50c011b37717b6, and update the TypeScript latest tag totypescript@latest.