effect-app 4.0.0-beta.263 → 4.0.0-beta.265

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,18 @@
1
1
  # @effect-app/prelude
2
2
 
3
+ ## 4.0.0-beta.265
4
+
5
+ ### Patch Changes
6
+
7
+ - 3e855bc: Update Effect packages to `4.0.0-beta.83` (from `beta.74`): `effect`, `@effect/platform-node`, `@effect/platform-browser`, `@effect/sql-sqlite-node`, `@effect/atom-vue`, `@effect/vitest`.
8
+
9
+ Adapt the infra workflow engines to beta.83 API changes:
10
+
11
+ - `Schema.Defect` is now a constructor function — use `S.Defect()` when building the deferred-exit codec (the bare constant no longer produces a usable schema and crashed `toType`).
12
+ - `Workflow` exposes its name as `_tag` instead of `name`. `WorkflowEngineSqlite`/`WorkflowEngineCosmos` now key the registry, codec caches, and persisted `workflow_name` off `workflow._tag`, fixing crash-recovery (stale-lease re-drive previously registered under an `undefined` key and never matched).
13
+
14
+ ## 4.0.0-beta.264
15
+
3
16
  ## 4.0.0-beta.263
4
17
 
5
18
  ## 4.0.0-beta.262
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "effect-app",
3
- "version": "4.0.0-beta.263",
3
+ "version": "4.0.0-beta.265",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "dependencies": {
@@ -24,7 +24,7 @@
24
24
  "vitest": "^4.1.7"
25
25
  },
26
26
  "peerDependencies": {
27
- "effect": "^4.0.0-beta.74"
27
+ "effect": "^4.0.0-beta.83"
28
28
  },
29
29
  "typesVersions": {
30
30
  "*": {
@@ -33,7 +33,7 @@ describe("Class", () => {
33
33
 
34
34
  const decoded = S.decodeUnknownSync(A)({ a: "hello" })
35
35
  expect(decoded).toBeInstanceOf(A)
36
- expect((decoded as A).a).toBe("hello")
36
+ expect(decoded.a).toBe("hello")
37
37
 
38
38
  expect(() => S.decodeUnknownSync(A)(null)).toThrow()
39
39
  expect(() => S.decodeUnknownSync(A)({ a: 1 })).toThrow()
@@ -119,7 +119,7 @@ describe("Class constructor", () => {
119
119
 
120
120
  const decoded = S.decodeUnknownSync(A)({ a: "hello" })
121
121
  expect(decoded).toBeInstanceOf(A)
122
- expect((decoded as A).a).toBe("hello")
122
+ expect(decoded.a).toBe("hello")
123
123
 
124
124
  expect(() => S.decodeUnknownSync(A)({ a: 1 })).toThrow()
125
125
  })
@@ -176,8 +176,8 @@ describe("TaggedStruct constructor", () => {
176
176
  S.decodeSync(S.toType(X))({ _tag: "X", n: "a" /* not length 3 */ })
177
177
  expect.fail("expected decode to fail with a SchemaError")
178
178
  } catch (error) {
179
- expect(error).toBeInstanceOf(Error)
180
- if (error instanceof Error) {
179
+ expect(S.isSchemaError(error)).toBe(true)
180
+ if (S.isSchemaError(error)) {
181
181
  expect(error.message).toContain("n")
182
182
  expect(error.message.toLowerCase()).toContain("length")
183
183
  }
@@ -435,7 +435,7 @@ describe("SpecialJsonSchema", () => {
435
435
  const structFromNullOr = Schema.Struct({ status: fromNullOr })
436
436
 
437
437
  const encode = Schema.encodeUnknownSync(structFromNullOr as any)
438
- const encodedNull = encode({ status: null }) as any
438
+ const encodedNull = encode({ status: null })
439
439
  expect("status" in encodedNull).toBe(false)
440
440
  expect(encode({ status: "test" })).toStrictEqual({ status: "test" })
441
441