@rivus/platform 0.17.0 → 0.18.1

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.
@@ -33,7 +33,7 @@ function createPeriodicEffectLoop(options) {
33
33
  const reported = options.onError?.(error);
34
34
  return reported instanceof Promise ? Effect.promise(() => reported) : Effect.void;
35
35
  };
36
- const continueAfterReporting = (effect) => effect.pipe(Effect.asVoid, Effect.catchAll((error) => reportError(error)));
36
+ const continueAfterReporting = (effect) => effect.pipe(Effect.asVoid, Effect.catch((error) => reportError(error)));
37
37
  const cycle = Effect.suspend(() => continueAfterReporting(options.run()).pipe(Effect.flatMap(() => continueAfterReporting(options.sleep(options.intervalMs))), Effect.flatMap(() => cycle)));
38
38
  return createEffectLoopDriver(cycle);
39
39
  }
@@ -1,8 +1,8 @@
1
1
  import { Exit } from "effect";
2
2
  //#region src/effect/index.d.ts
3
3
  /**
4
- * Returns the success value or throws the typed failure itself, so Promise and synchronous facades do not expose
5
- * Effect's FiberFailure wrapper. Without a typed failure, `Cause.squash` throws the first defect or an interruption.
4
+ * Returns the success value or throws the original typed failure or defect at Promise and synchronous facades.
5
+ * Typed failures take precedence over cleanup defects and interruptions.
6
6
  */
7
7
  export declare function unwrapExit<A, E>(exit: Exit.Exit<A, E>): A;
8
8
  //#endregion
@@ -1,8 +1,8 @@
1
1
  import { Cause, Exit } from "effect";
2
2
  //#region src/effect/index.ts
3
3
  /**
4
- * Returns the success value or throws the typed failure itself, so Promise and synchronous facades do not expose
5
- * Effect's FiberFailure wrapper. Without a typed failure, `Cause.squash` throws the first defect or an interruption.
4
+ * Returns the success value or throws the original typed failure or defect at Promise and synchronous facades.
5
+ * Typed failures take precedence over cleanup defects and interruptions.
6
6
  */
7
7
  function unwrapExit(exit) {
8
8
  if (Exit.isSuccess(exit)) return exit.value;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rivus/platform",
3
- "version": "0.17.0",
3
+ "version": "0.18.1",
4
4
  "description": "Shared technical primitives for Rivus packages.",
5
5
  "type": "module",
6
6
  "license": "GPL-3.0-only",
@@ -50,7 +50,7 @@
50
50
  "LICENSE"
51
51
  ],
52
52
  "dependencies": {
53
- "effect": "^3.22.2"
53
+ "effect": "^4.0.0"
54
54
  },
55
55
  "publishConfig": {
56
56
  "access": "public"