@effect-app/vue 4.0.0-beta.292 → 4.0.0-beta.294

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,20 @@
1
1
  # @effect-app/vue
2
2
 
3
+ ## 4.0.0-beta.294
4
+
5
+ ### Patch Changes
6
+
7
+ - 7519318: Fix interrupt repro tests to observe expected suspense interruption rejections.
8
+ - Updated dependencies [a211c12]
9
+ - effect-app@4.0.0-beta.294
10
+
11
+ ## 4.0.0-beta.293
12
+
13
+ ### Patch Changes
14
+
15
+ - Updated dependencies [d1c15d3]
16
+ - effect-app@4.0.0-beta.293
17
+
3
18
  ## 4.0.0-beta.292
4
19
 
5
20
  ### Patch Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@effect-app/vue",
3
- "version": "4.0.0-beta.292",
3
+ "version": "4.0.0-beta.294",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "homepage": "https://github.com/effect-ts-app/libs/tree/main/packages/vue",
@@ -10,7 +10,7 @@
10
10
  "@vueuse/core": "^14.3.0",
11
11
  "change-case": "^5.4.4",
12
12
  "query-string": "^9.4.0",
13
- "effect-app": "4.0.0-beta.292"
13
+ "effect-app": "4.0.0-beta.294"
14
14
  },
15
15
  "peerDependencies": {
16
16
  "@effect/atom-vue": "^4.0.0-beta.90",
@@ -122,6 +122,10 @@ const settle = (p: Promise<any> | undefined) =>
122
122
  new Promise<"pending">((resolve) => setTimeout(() => resolve("pending"), 40))
123
123
  ])
124
124
 
125
+ const ignoreSuspenseInterrupt = (p: Promise<any> | undefined) => {
126
+ p?.catch(() => {})
127
+ }
128
+
125
129
  const writeCommand = (repo: DataDependencies.DataDependency) => DataDependencies.write(repo).pipe(Effect.as(undefined))
126
130
  const drain = (fiber: Fiber.Fiber<any, any>) =>
127
131
  Effect.runPromise(Fiber.interrupt(fiber) as any).then(() => {}, () => {})
@@ -141,6 +145,7 @@ it.fails("A1 — unload during the INITIAL fetch: remount must refetch, not hang
141
145
  await ticks(2)
142
146
  expect(g.starts()).toBe(1)
143
147
 
148
+ ignoreSuspenseInterrupt(m1.getPromise())
144
149
  m1.app.unmount() // page unload -> interrupt the in-flight initial fetch
145
150
  await ticks(2)
146
151
 
@@ -351,6 +356,7 @@ it("M2 — one of two concurrent callers unmounts mid-fetch: the other still res
351
356
  await ticks(2)
352
357
  expect(g.starts()).toBe(1)
353
358
 
359
+ ignoreSuspenseInterrupt(a.getPromise())
354
360
  a.app.unmount() // caller A loses interest -> interrupts ITS await only
355
361
  await ticks(2)
356
362
  g.releaseAll() // the shared fetch must survive for caller B
@@ -568,6 +574,7 @@ it.fails("D1 — sole listener interrupts an in-flight request; a NEW listener s
568
574
  await ticks(2)
569
575
  expect(g.starts()).toBe(1)
570
576
 
577
+ ignoreSuspenseInterrupt(l1.getPromise())
571
578
  l1.app.unmount() // the only interested caller leaves -> the in-flight request should be abandoned
572
579
  await ticks(2)
573
580
  g.setBlocking(false)