diff --git a/.changeset/add-all-of-map-to-for-each.md b/.changeset/add-all-of-map-to-for-each.md deleted file mode 100644 index 45190563..00000000 --- a/.changeset/add-all-of-map-to-for-each.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -"@effect/tsgo": minor ---- - -Add the `allOfMapToForEach` style diagnostic, which suggests replacing -`Effect.all(values.map(callback), options)` with the equivalent -`Effect.forEach(values, callback, options)` form. diff --git a/.changeset/add-catch-die-to-or-die.md b/.changeset/add-catch-die-to-or-die.md deleted file mode 100644 index 12c4abd7..00000000 --- a/.changeset/add-catch-die-to-or-die.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -"@effect/tsgo": minor ---- - -Add the `catchAllDieToOrDie` style diagnostic, which suggests replacing -`Effect.catch` or `Effect.catchAll` with `Effect.orDie` when the catch-all -handler forwards its typed failure unchanged to `Effect.die`. diff --git a/.changeset/bounded-go-build-caches.md b/.changeset/bounded-go-build-caches.md deleted file mode 100644 index 1c4422eb..00000000 --- a/.changeset/bounded-go-build-caches.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -"@effect/tsgo": patch ---- - -Bound CI Go caches with a resolved cache identity - -`repoctl upstream resolve` now emits a Go cache identity derived from `upstream.json`: the `typescript` component owns and saves its Go caches, `oxlint-tsgolint` restores 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-based `oxlint` component 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. diff --git a/.changeset/catch-conditional-refail-to-catch-if.md b/.changeset/catch-conditional-refail-to-catch-if.md deleted file mode 100644 index 0699969b..00000000 --- a/.changeset/catch-conditional-refail-to-catch-if.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@effect/tsgo": minor ---- - -Add the `catchConditionalRefailToCatchIf` diagnostic for conditional `Effect.catch` and `Effect.catchCause` handlers that re-fail their untouched input, suggesting `Effect.catchIf`, `Effect.catchCauseIf`, or `Effect.catchTag` as appropriate. diff --git a/.changeset/effect-map-void-data-first.md b/.changeset/effect-map-void-data-first.md deleted file mode 100644 index f4a2a2db..00000000 --- a/.changeset/effect-map-void-data-first.md +++ /dev/null @@ -1,21 +0,0 @@ ---- -"@effect/tsgo": minor ---- - -Detect the data-first form of `effectMapVoid` by driving detection off piping flows. - -`effectMapVoid` previously matched only the data-last / pipeable form of the pattern, so a data-first `Effect.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: - -```ts -Effect.map(Effect.succeed(1), () => {}) -``` - -is now flagged and fixed to: - -```ts -Effect.asVoid(Effect.succeed(1)) -``` - -while the existing data-last form (`pipe(self, Effect.map(() => {}))`) continues to be fixed to a bare `Effect.asVoid`. diff --git a/.changeset/fix-supported-effect-declarations.md b/.changeset/fix-supported-effect-declarations.md deleted file mode 100644 index ea0fd3ca..00000000 --- a/.changeset/fix-supported-effect-declarations.md +++ /dev/null @@ -1,10 +0,0 @@ ---- -"@effect/tsgo": patch ---- - -Fix `supportedEffect` metadata for two rules whose declaration disagreed with their actual behavior: - -- `genericEffectServices` declared `["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. -- `schemaSyncInEffect` declared `["v3"]` but fully supports Effect v4 (suggesting `decodeEffect`/`encodeEffect` variants). It now declares `["v3", "v4"]`. - -`metadata.json` and the generated rule docs were regenerated accordingly. No diagnostic behavior changed. diff --git a/.changeset/improve-dual-function-detection.md b/.changeset/improve-dual-function-detection.md deleted file mode 100644 index 55ec2c18..00000000 --- a/.changeset/improve-dual-function-detection.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -"@effect/tsgo": minor ---- - -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 as `value.pipe(Option.match(handlers))`, even when the overloads reorder generic parameters or return a generic union. diff --git a/.changeset/map-some-to-as-some-identity-forwarder.md b/.changeset/map-some-to-as-some-identity-forwarder.md deleted file mode 100644 index 39e23f7e..00000000 --- a/.changeset/map-some-to-as-some-identity-forwarder.md +++ /dev/null @@ -1,16 +0,0 @@ ---- -"@effect/tsgo": minor ---- - -Refactor the `mapSomeToAsSome` mapper detection onto the shared `UnwrapIdentityForwarder` helper. The diagnostic and quick fix now also recognize identity-forwarding function expressions: - -```ts -// 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.some` call still do not trigger, since they can intentionally widen the resulting `Option` type. diff --git a/.changeset/map-some-to-as-some.md b/.changeset/map-some-to-as-some.md deleted file mode 100644 index 806c5200..00000000 --- a/.changeset/map-some-to-as-some.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@effect/tsgo": minor ---- - -Add the `mapSomeToAsSome` diagnostic and quick fix, which replaces `Effect.map(Option.some)` and its exact eta-expanded form with `Effect.asSome` in pipeable and data-first flows. diff --git a/.changeset/prioritize-typescript-provider.md b/.changeset/prioritize-typescript-provider.md deleted file mode 100644 index 0e9f6065..00000000 --- a/.changeset/prioritize-typescript-provider.md +++ /dev/null @@ -1,9 +0,0 @@ ---- -"@effect/tsgo": patch ---- - -Fix `repoctl upstream update` failing when a TypeScript commit is reachable from both supported provider repositories. - -Previously, `resolveTypeScriptProvider` and `readRemoteTypeScriptGitlink` in `_tools/repoctl/src/upstream.ts` errored out with `TypeScript commit matched 2 supported repositories` whenever a single revision existed in both `microsoft/TypeScript` (the canonical upstream) and the legacy `microsoft/typescript-go` fork. This blocked the daily "Update Upstreams" workflow for revisions shared between the two. - -Both functions now prefer `microsoft/TypeScript` when it matches and fall back to `microsoft/typescript-go` otherwise. A "no supported repository matched" error is still raised when neither matches. diff --git a/.changeset/update-upstreams.md b/.changeset/update-upstreams.md deleted file mode 100644 index 9175b753..00000000 --- a/.changeset/update-upstreams.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@effect/tsgo": patch ---- - -Update the TypeScript next tag to [`typescript@next`](https://www.npmjs.com/package/typescript/v/7.1.0-dev.20260826.1), which ships [`typescript-go`](https://github.com/microsoft/typescript-go/commit/5739027c9a7df24e27123f453a50c011b37717b6) commit `5739027c9a7df24e27123f453a50c011b37717b6`, and update the TypeScript latest tag to [`typescript@latest`](https://www.npmjs.com/package/typescript/v/7.0.2). diff --git a/README.md b/README.md index b96d45a4..8f34d21a 100644 --- a/README.md +++ b/README.md @@ -38,11 +38,11 @@ When running in dedicated diagnostics mode, the Effect diagnostics can be emitte ## Supported Package Versions -The following target package versions are supported by `@effect/tsgo@0.37.0`: +The following target package versions are supported by `@effect/tsgo@0.38.0`: | Component | Supported versions | |---|---| -| TypeScript | `7.0.2`, `7.1.0-dev.20260824.1` | +| TypeScript | `7.0.2`, `7.1.0-dev.20260826.1` | | Oxlint | `1.79.0`, `1.80.0` | | oxlint-tsgolint | `7.0.2001` | diff --git a/_packages/tsgo-darwin-arm64/CHANGELOG.md b/_packages/tsgo-darwin-arm64/CHANGELOG.md index e367d64d..679b92c0 100644 --- a/_packages/tsgo-darwin-arm64/CHANGELOG.md +++ b/_packages/tsgo-darwin-arm64/CHANGELOG.md @@ -1,5 +1,7 @@ # @effect/tsgo-darwin-arm64 +## 0.38.0 + ## 0.37.0 ## 0.36.5 diff --git a/_packages/tsgo-darwin-arm64/package.json b/_packages/tsgo-darwin-arm64/package.json index 2c4bf4cb..9b38fa31 100644 --- a/_packages/tsgo-darwin-arm64/package.json +++ b/_packages/tsgo-darwin-arm64/package.json @@ -1,6 +1,6 @@ { "name": "@effect/tsgo-darwin-arm64", - "version": "0.37.0", + "version": "0.38.0", "description": "Effect Language Service for TypeScript-Go — Effect-specific diagnostics and hover features.", "license": "MIT", "repository": { diff --git a/_packages/tsgo-darwin-x64/CHANGELOG.md b/_packages/tsgo-darwin-x64/CHANGELOG.md index 1be26d76..b0fb7a9f 100644 --- a/_packages/tsgo-darwin-x64/CHANGELOG.md +++ b/_packages/tsgo-darwin-x64/CHANGELOG.md @@ -1,5 +1,7 @@ # @effect/tsgo-darwin-x64 +## 0.38.0 + ## 0.37.0 ## 0.36.5 diff --git a/_packages/tsgo-darwin-x64/package.json b/_packages/tsgo-darwin-x64/package.json index 63750c20..7404fed9 100644 --- a/_packages/tsgo-darwin-x64/package.json +++ b/_packages/tsgo-darwin-x64/package.json @@ -1,6 +1,6 @@ { "name": "@effect/tsgo-darwin-x64", - "version": "0.37.0", + "version": "0.38.0", "description": "Effect Language Service for TypeScript-Go — Effect-specific diagnostics and hover features.", "license": "MIT", "repository": { diff --git a/_packages/tsgo-linux-arm/CHANGELOG.md b/_packages/tsgo-linux-arm/CHANGELOG.md index 480a0935..b09d2219 100644 --- a/_packages/tsgo-linux-arm/CHANGELOG.md +++ b/_packages/tsgo-linux-arm/CHANGELOG.md @@ -1,5 +1,7 @@ # @effect/tsgo-linux-arm +## 0.38.0 + ## 0.37.0 ## 0.36.5 diff --git a/_packages/tsgo-linux-arm/package.json b/_packages/tsgo-linux-arm/package.json index 40a1b56d..7866ae85 100644 --- a/_packages/tsgo-linux-arm/package.json +++ b/_packages/tsgo-linux-arm/package.json @@ -1,6 +1,6 @@ { "name": "@effect/tsgo-linux-arm", - "version": "0.37.0", + "version": "0.38.0", "description": "Effect Language Service for TypeScript-Go — Effect-specific diagnostics and hover features.", "license": "MIT", "repository": { diff --git a/_packages/tsgo-linux-arm64/CHANGELOG.md b/_packages/tsgo-linux-arm64/CHANGELOG.md index ea110f0d..8ecec01a 100644 --- a/_packages/tsgo-linux-arm64/CHANGELOG.md +++ b/_packages/tsgo-linux-arm64/CHANGELOG.md @@ -1,5 +1,7 @@ # @effect/tsgo-linux-arm64 +## 0.38.0 + ## 0.37.0 ## 0.36.5 diff --git a/_packages/tsgo-linux-arm64/package.json b/_packages/tsgo-linux-arm64/package.json index 93f099ea..3507d30b 100644 --- a/_packages/tsgo-linux-arm64/package.json +++ b/_packages/tsgo-linux-arm64/package.json @@ -1,6 +1,6 @@ { "name": "@effect/tsgo-linux-arm64", - "version": "0.37.0", + "version": "0.38.0", "description": "Effect Language Service for TypeScript-Go — Effect-specific diagnostics and hover features.", "license": "MIT", "repository": { diff --git a/_packages/tsgo-linux-x64/CHANGELOG.md b/_packages/tsgo-linux-x64/CHANGELOG.md index 97dabd8e..211369c7 100644 --- a/_packages/tsgo-linux-x64/CHANGELOG.md +++ b/_packages/tsgo-linux-x64/CHANGELOG.md @@ -1,5 +1,7 @@ # @effect/tsgo-linux-x64 +## 0.38.0 + ## 0.37.0 ## 0.36.5 diff --git a/_packages/tsgo-linux-x64/package.json b/_packages/tsgo-linux-x64/package.json index 9f11f6ab..9a7e165a 100644 --- a/_packages/tsgo-linux-x64/package.json +++ b/_packages/tsgo-linux-x64/package.json @@ -1,6 +1,6 @@ { "name": "@effect/tsgo-linux-x64", - "version": "0.37.0", + "version": "0.38.0", "description": "Effect Language Service for TypeScript-Go — Effect-specific diagnostics and hover features.", "license": "MIT", "repository": { diff --git a/_packages/tsgo-win32-arm64/CHANGELOG.md b/_packages/tsgo-win32-arm64/CHANGELOG.md index 8124a967..eb339b2e 100644 --- a/_packages/tsgo-win32-arm64/CHANGELOG.md +++ b/_packages/tsgo-win32-arm64/CHANGELOG.md @@ -1,5 +1,7 @@ # @effect/tsgo-win32-arm64 +## 0.38.0 + ## 0.37.0 ## 0.36.5 diff --git a/_packages/tsgo-win32-arm64/package.json b/_packages/tsgo-win32-arm64/package.json index b246383b..949c6b12 100644 --- a/_packages/tsgo-win32-arm64/package.json +++ b/_packages/tsgo-win32-arm64/package.json @@ -1,6 +1,6 @@ { "name": "@effect/tsgo-win32-arm64", - "version": "0.37.0", + "version": "0.38.0", "description": "Effect Language Service for TypeScript-Go — Effect-specific diagnostics and hover features.", "license": "MIT", "repository": { diff --git a/_packages/tsgo-win32-x64/CHANGELOG.md b/_packages/tsgo-win32-x64/CHANGELOG.md index 16dd16ec..170c15ca 100644 --- a/_packages/tsgo-win32-x64/CHANGELOG.md +++ b/_packages/tsgo-win32-x64/CHANGELOG.md @@ -1,5 +1,7 @@ # @effect/tsgo-win32-x64 +## 0.38.0 + ## 0.37.0 ## 0.36.5 diff --git a/_packages/tsgo-win32-x64/package.json b/_packages/tsgo-win32-x64/package.json index c8a4df22..ee4fb15f 100644 --- a/_packages/tsgo-win32-x64/package.json +++ b/_packages/tsgo-win32-x64/package.json @@ -1,6 +1,6 @@ { "name": "@effect/tsgo-win32-x64", - "version": "0.37.0", + "version": "0.38.0", "description": "Effect Language Service for TypeScript-Go — Effect-specific diagnostics and hover features.", "license": "MIT", "repository": { diff --git a/_packages/tsgo/CHANGELOG.md b/_packages/tsgo/CHANGELOG.md index d4006407..505ca7fa 100644 --- a/_packages/tsgo/CHANGELOG.md +++ b/_packages/tsgo/CHANGELOG.md @@ -1,5 +1,72 @@ # @effect/tsgo +## 0.38.0 + +### Minor Changes + +- 773b245: Add the `allOfMapToForEach` style diagnostic, which suggests replacing + `Effect.all(values.map(callback), options)` with the equivalent + `Effect.forEach(values, callback, options)` form. +- fe7a29e: Add the `catchAllDieToOrDie` style diagnostic, which suggests replacing + `Effect.catch` or `Effect.catchAll` with `Effect.orDie` when the catch-all + handler forwards its typed failure unchanged to `Effect.die`. +- 32c575a: Add the `catchConditionalRefailToCatchIf` diagnostic for conditional `Effect.catch` and `Effect.catchCause` handlers that re-fail their untouched input, suggesting `Effect.catchIf`, `Effect.catchCauseIf`, or `Effect.catchTag` as appropriate. +- 41ec458: Detect the data-first form of `effectMapVoid` by driving detection off piping flows. + + `effectMapVoid` previously matched only the data-last / pipeable form of the pattern, so a data-first `Effect.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: + + ```ts + Effect.map(Effect.succeed(1), () => {}) + ``` + + is now flagged and fixed to: + + ```ts + Effect.asVoid(Effect.succeed(1)) + ``` + + while the existing data-last form (`pipe(self, Effect.map(() => {}))`) continues to be fixed to a bare `Effect.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 as `value.pipe(Option.match(handlers))`, even when the overloads reorder generic parameters or return a generic union. +- 2ae20c4: Refactor the `mapSomeToAsSome` mapper detection onto the shared `UnwrapIdentityForwarder` helper. The diagnostic and quick fix now also recognize identity-forwarding function expressions: + + ```ts + // 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.some` call still do not trigger, since they can intentionally widen the resulting `Option` type. +- 2a02aae: Add the `mapSomeToAsSome` diagnostic and quick fix, which replaces `Effect.map(Option.some)` and its exact eta-expanded form with `Effect.asSome` in pipeable and data-first flows. + +### Patch Changes + +- 68a603e: Bound CI Go caches with a resolved cache identity + + `repoctl upstream resolve` now emits a Go cache identity derived from `upstream.json`: the `typescript` component owns and saves its Go caches, `oxlint-tsgolint` restores 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-based `oxlint` component 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 `supportedEffect` metadata for two rules whose declaration disagreed with their actual behavior: + + - `genericEffectServices` declared `["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. + - `schemaSyncInEffect` declared `["v3"]` but fully supports Effect v4 (suggesting `decodeEffect`/`encodeEffect` variants). It now declares `["v3", "v4"]`. + + `metadata.json` and the generated rule docs were regenerated accordingly. No diagnostic behavior changed. +- 24cbb0d: Fix `repoctl upstream update` failing when a TypeScript commit is reachable from both supported provider repositories. + + Previously, `resolveTypeScriptProvider` and `readRemoteTypeScriptGitlink` in `_tools/repoctl/src/upstream.ts` errored out with `TypeScript commit matched 2 supported repositories` whenever a single revision existed in both `microsoft/TypeScript` (the canonical upstream) and the legacy `microsoft/typescript-go` fork. This blocked the daily "Update Upstreams" workflow for revisions shared between the two. + + Both functions now prefer `microsoft/TypeScript` when it matches and fall back to `microsoft/typescript-go` otherwise. A "no supported repository matched" error is still raised when neither matches. +- 7a07115: Update the TypeScript next tag to [`typescript@next`](https://www.npmjs.com/package/typescript/v/7.1.0-dev.20260826.1), which ships [`typescript-go`](https://github.com/microsoft/typescript-go/commit/5739027c9a7df24e27123f453a50c011b37717b6) commit `5739027c9a7df24e27123f453a50c011b37717b6`, and update the TypeScript latest tag to [`typescript@latest`](https://www.npmjs.com/package/typescript/v/7.0.2). + ## 0.37.0 ### Minor Changes diff --git a/_packages/tsgo/package.json b/_packages/tsgo/package.json index 102a202c..4c090d4f 100644 --- a/_packages/tsgo/package.json +++ b/_packages/tsgo/package.json @@ -1,6 +1,6 @@ { "name": "@effect/tsgo", - "version": "0.37.0", + "version": "0.38.0", "type": "module", "description": "Effect Language Service for TypeScript-Go — Effect-specific diagnostics and hover features.", "license": "MIT", diff --git a/etscore/version_generated.go b/etscore/version_generated.go index 672206b5..f41eb200 100644 --- a/etscore/version_generated.go +++ b/etscore/version_generated.go @@ -2,4 +2,4 @@ package etscore -const EffectVersion = "0.37.0" +const EffectVersion = "0.38.0"