@effect/platform-bun 0.16.1 → 0.16.2

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.
@@ -45,7 +45,10 @@ const platformWorkerImpl = /*#__PURE__*/Worker__namespace.PlatformWorker.of({
45
45
  signal
46
46
  });
47
47
  port.postMessage([1]);
48
- }), Effect__namespace.timeout(5000), Effect__namespace.tap(Option__namespace.match({
48
+ }),
49
+ // TODO: make configurable
50
+ // sometimes bun doesn't fire the close event
51
+ Effect__namespace.timeout(1000), Effect__namespace.tap(Option__namespace.match({
49
52
  onNone: () => Effect__namespace.sync(() => port.terminate()),
50
53
  onSome: _ => Effect__namespace.unit
51
54
  })))));
@@ -45,7 +45,10 @@ const platformWorkerImpl = /*#__PURE__*/Worker__namespace.PlatformWorker.of({
45
45
  signal
46
46
  });
47
47
  port.postMessage([1]);
48
- }), Effect__namespace.timeout(5000), Effect__namespace.tap(Option__namespace.match({
48
+ }),
49
+ // TODO: make configurable
50
+ // sometimes bun doesn't fire the close event
51
+ Effect__namespace.timeout(1000), Effect__namespace.tap(Option__namespace.match({
49
52
  onNone: () => Effect__namespace.sync(() => port.terminate()),
50
53
  onSome: _ => Effect__namespace.unit
51
54
  })))));
@@ -18,7 +18,10 @@ const platformWorkerImpl = /*#__PURE__*/Worker.PlatformWorker.of({
18
18
  signal
19
19
  });
20
20
  port.postMessage([1]);
21
- }), Effect.timeout(5000), Effect.tap(Option.match({
21
+ }),
22
+ // TODO: make configurable
23
+ // sometimes bun doesn't fire the close event
24
+ Effect.timeout(1000), Effect.tap(Option.match({
22
25
  onNone: () => Effect.sync(() => port.terminate()),
23
26
  onSome: _ => Effect.unit
24
27
  })))));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@effect/platform-bun",
3
- "version": "0.16.1",
3
+ "version": "0.16.2",
4
4
  "description": "Unified interfaces for common platform-specific services",
5
5
  "main": "dist/effect-platform-bun.cjs.js",
6
6
  "module": "dist/effect-platform-bun.esm.js",
@@ -30,8 +30,8 @@
30
30
  "license": "MIT",
31
31
  "sideEffects": false,
32
32
  "dependencies": {
33
- "@effect/platform": "^0.27.1",
34
- "@effect/platform-node": "^0.28.1"
33
+ "@effect/platform": "^0.27.2",
34
+ "@effect/platform-node": "^0.28.2"
35
35
  },
36
36
  "devDependencies": {
37
37
  "@effect/schema": "^0.47.1",
@@ -18,7 +18,9 @@ const platformWorkerImpl = Worker.PlatformWorker.of({
18
18
  port.addEventListener("close", () => resume(Effect.unit), { once: true, signal })
19
19
  port.postMessage([1])
20
20
  }),
21
- Effect.timeout(5000),
21
+ // TODO: make configurable
22
+ // sometimes bun doesn't fire the close event
23
+ Effect.timeout(1000),
22
24
  Effect.tap(Option.match({
23
25
  onNone: () => Effect.sync(() => port.terminate()),
24
26
  onSome: (_) => Effect.unit