Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .changeset/pre.json
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,7 @@
"infra-sentry-node-dep",
"invalidation-set-add-shortcut-and-batch",
"itchy-mangos-find",
"jitm-json-store-boundary",
"khaki-frogs-wave",
"kind-lizards-bathe",
"large-pugs-strive",
Expand Down
9 changes: 9 additions & 0 deletions packages/e2e/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# @effect-app/e2e

## 4.0.0-beta.326

### Patch Changes

- Updated dependencies [2ebf8ae]
- effect-app@4.0.0-beta.326
- @effect-app/infra@4.0.0-beta.326
- @effect-app/vue@4.0.0-beta.326

## 4.0.0-beta.325

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/e2e/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@effect-app/e2e",
"version": "4.0.0-beta.325",
"version": "4.0.0-beta.326",
"license": "MIT",
"type": "module",
"private": true,
Expand Down
16 changes: 16 additions & 0 deletions packages/effect-app/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,21 @@
# @effect-app/prelude

## 4.0.0-beta.326

### Minor Changes

- 2ebf8ae: `jitM` runs at the store boundary as JSON → JSON, before the `toCodecJson(toEncoded(schema))` decode; repositories decode the Encoded shape only.

`jitM` used to be applied by the repository _after_ the store had already decoded the document, and was typed `(pm: Encoded) => Encoded` - a lie, since jitMs are written against the stored JSON and `Encoded` holds native `Date`/`Map`/`Set` values.

The read pipeline is now: raw JSON document → merge `defaultValues` (unchanged: they only fill _absent_ keys, so an explicitly stored `null` reaches `jitM`) → `jitM` (JSON → JSON) → decode `Schema.toCodecJson(Schema.toEncoded(schema))` → Encoded. The repository then decodes Encoded → the domain type with `schema` and no longer applies `jitM` at all. Because `jitM` now runs before any schema decode sees the document, it can repair legacy shapes including explicit `null`s.

- `StoreConfig.jitM?: (json: JsonRecord) => JsonRecord` is new, where `JsonRecord` (exported from `effect-app/Store`) is `{ readonly [key: string]: Schema.Json }`. It is not applied on the write/encode path, and never receives `_etag`.
- `RepositoryOptions.jitM` changes type from `(pm: Encoded) => Encoded` to `(json: JsonRecord) => JsonRecord` and is forwarded into the store config.
- **Migrating a jitM:** it now receives and must return JSON. A `Date` field arrives as an ISO string (return a string, not a `Date`), a `ReadonlySet` as an array, a `ReadonlyMap` as an array of `[key, value]` pairs. Field access is index-signature based (`json["x"]`) rather than typed property access.
- The JSON→Encoded decode stays strict: a document `jitM` does not repair fails at the store boundary instead of being read back half-decoded.
- `ValidationError.jitMResult` is deprecated: `validateSample` only ever sees the store's output, so it is identical to `rawData`.

## 4.0.0-beta.325

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/effect-app/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "effect-app",
"version": "4.0.0-beta.325",
"version": "4.0.0-beta.326",
"license": "MIT",
"type": "module",
"repository": {
Expand Down
21 changes: 21 additions & 0 deletions packages/infra/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,26 @@
# @effect-app/infra

## 4.0.0-beta.326

### Minor Changes

- 2ebf8ae: `jitM` runs at the store boundary as JSON → JSON, before the `toCodecJson(toEncoded(schema))` decode; repositories decode the Encoded shape only.

`jitM` used to be applied by the repository _after_ the store had already decoded the document, and was typed `(pm: Encoded) => Encoded` - a lie, since jitMs are written against the stored JSON and `Encoded` holds native `Date`/`Map`/`Set` values.

The read pipeline is now: raw JSON document → merge `defaultValues` (unchanged: they only fill _absent_ keys, so an explicitly stored `null` reaches `jitM`) → `jitM` (JSON → JSON) → decode `Schema.toCodecJson(Schema.toEncoded(schema))` → Encoded. The repository then decodes Encoded → the domain type with `schema` and no longer applies `jitM` at all. Because `jitM` now runs before any schema decode sees the document, it can repair legacy shapes including explicit `null`s.

- `StoreConfig.jitM?: (json: JsonRecord) => JsonRecord` is new, where `JsonRecord` (exported from `effect-app/Store`) is `{ readonly [key: string]: Schema.Json }`. It is not applied on the write/encode path, and never receives `_etag`.
- `RepositoryOptions.jitM` changes type from `(pm: Encoded) => Encoded` to `(json: JsonRecord) => JsonRecord` and is forwarded into the store config.
- **Migrating a jitM:** it now receives and must return JSON. A `Date` field arrives as an ISO string (return a string, not a `Date`), a `ReadonlySet` as an array, a `ReadonlyMap` as an array of `[key, value]` pairs. Field access is index-signature based (`json["x"]`) rather than typed property access.
- The JSON→Encoded decode stays strict: a document `jitM` does not repair fails at the store boundary instead of being read back half-decoded.
- `ValidationError.jitMResult` is deprecated: `validateSample` only ever sees the store's output, so it is identical to `rawData`.

### Patch Changes

- Updated dependencies [2ebf8ae]
- effect-app@4.0.0-beta.326

## 4.0.0-beta.325

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/infra/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@effect-app/infra",
"version": "4.0.0-beta.325",
"version": "4.0.0-beta.326",
"license": "MIT",
"type": "module",
"repository": {
Expand Down
8 changes: 8 additions & 0 deletions packages/vue-components/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# @effect-app/vue-components

## 4.0.0-beta.326

### Patch Changes

- Updated dependencies [2ebf8ae]
- effect-app@4.0.0-beta.326
- @effect-app/vue@4.0.0-beta.326

## 4.0.0-beta.325

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/vue-components/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@effect-app/vue-components",
"version": "4.0.0-beta.325",
"version": "4.0.0-beta.326",
"repository": {
"type": "git",
"url": "https://github.com/effect-app/libs.git",
Expand Down
7 changes: 7 additions & 0 deletions packages/vue/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# @effect-app/vue

## 4.0.0-beta.326

### Patch Changes

- Updated dependencies [2ebf8ae]
- effect-app@4.0.0-beta.326

## 4.0.0-beta.325

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/vue/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@effect-app/vue",
"version": "4.0.0-beta.325",
"version": "4.0.0-beta.326",
"license": "MIT",
"type": "module",
"repository": {
Expand Down