Repository navigation
feat(effect-ts): support Effect v4 - #880
Merged
Merged
Conversation
Migrate the Effect resolver to Effect v4 Schema APIs: - decode with `Schema.decodeUnknownEffect` (replaces the removed `ParseResult` module) - format issues with `SchemaIssue.makeFormatterStandardSchemaV1`, keeping the issue `_tag` as the error `type` - accept `Schema.Codec<Output, Input>` schemas Closes #878 BREAKING CHANGE: the effect-ts resolver now requires `effect@^4.0.0`; Effect v3 is no longer supported. Schemas must be migrated to the Effect v4 Schema API (e.g. `Schema.nonEmptyString()` -> `.check(Schema.isNonEmpty())`, `Schema.Union(a, b)` -> `Schema.Union([a, b])`, `Schema.transform` -> `Schema.decodeTo`). Error `type` values follow Effect v4 issue tags: `Type` -> `InvalidType`, `Missing` -> `MissingKey`, `Refinement` -> `Filter`, `Unexpected` -> `UnexpectedKey`, plus new `AnyOf` and `InvalidValue`. Default error messages now come from Effect v4 (e.g. `is missing` -> `Missing key`, and the received value is no longer included).
jorisre
force-pushed
the
feat/effect-ts-v4
branch
from
October 18, 2026 13:44
5bbfd52 to
d1d22e5
Compare
There was a problem hiding this comment.
馃煝 Approval recommended
Static review found no blocking issues, and focused tests cover the migrated behavior; tests were not executed.
No open issues 馃帀
What changed in this PR
Migrates the Effect resolver to Effect v4, replacing v3 support and updating integration guidance.
Changes:
- Uses v4 decoding and issue-formatting APIs while preserving error tags.
- Updates dependencies and schema examples.
- Expands validation, transformation, asynchronous decoding, and type-inference coverage.
| File | Description |
|---|---|
| tsconfig.json | Adds Effect module-resolution paths. |
| README.md | Documents v4 requirements and usage. |
| package.json | Updates Effect dependencies and build globals. |
| effect-ts/鈥媠rc/鈥媏ffect-ts.ts | Migrates decoding, schema types, and error formatting. |
| effect-ts/鈥媠rc/鈥媉_tests__/鈥媠pecial-path-names.ts | Migrates special-field-name validation. |
| effect-ts/鈥媠rc/鈥媉_tests__/鈥婩orm.tsx | Updates form schemas to v4. |
| effect-ts/鈥媠rc/鈥媉_tests__/鈥婩orm-native-validation.tsx | Updates native-validation schemas to v4. |
| effect-ts/鈥媠rc/鈥媉_tests__/鈥媏ffect-ts.ts | Expands coverage and migrates inference tests. |
| effect-ts/鈥媠rc/鈥媉_tests__/鈥媉_snapshots__/鈥媏ffect-ts.ts.snap | Updates expected error messages and tags. |
| effect-ts/鈥媠rc/鈥媉_tests__/鈥媉_fixtures__/鈥媎ata.ts | Migrates shared schema fixtures. |
| effect-ts/鈥媝ackage.json | Requires Effect v4. |
| bun.lock | Locks the updated Effect dependency. |
Review effort: Balanced
Contributor
|
馃帀 This PR is included in version 6.0.0 馃帀 The release is available on: Your semantic-release bot 馃摝馃殌 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Migrate the Effect resolver to Effect v4 Schema APIs:
Schema.decodeUnknownEffect(replaces the removedParseResultmodule)SchemaIssue.makeFormatterStandardSchemaV1, keeping the issue_tagas the errortypeSchema.Codec<Output, Input>schemasCloses #878
BREAKING CHANGE: the effect-ts resolver now requires
effect@^4.0.0; Effect v3 is no longer supported. Schemas must be migrated to the Effect v4 Schema API (e.g.Schema.nonEmptyString()->.check(Schema.isNonEmpty()),Schema.Union(a, b)->Schema.Union([a, b]),Schema.transform->Schema.decodeTo). Errortypevalues follow Effect v4 issue tags:Type->InvalidType,Missing->MissingKey,Refinement->Filter,Unexpected->UnexpectedKey, plus newAnyOfandInvalidValue. Default error messages now come from Effect v4 (e.g.is missing->Missing key, and the received value is no longer included).