@systemfsoftware/effect-spec-runtime 1.3.2 → 1.3.3

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,9 +1,5 @@
1
1
  # @systemfsoftware/effect-spec-runtime
2
2
 
3
- # @systemfsoftware/effect-spec-runtime@1.3.2
3
+ # @systemfsoftware/effect-spec-runtime@1.3.3
4
4
 
5
- Dev dependency bump (@types/node) only; the packed tarball is unchanged.
6
-
7
- No consumer-visible package changes.
8
-
9
- Rebuilt with tsdown 0.23.7 against the updated dev dependencies: the bundled `dist/` files carry a different hashed runtime chunk name and comment markers, and the declared devDependency ranges move. The public API and runtime behaviour are unchanged.
5
+ Render JSON text through `Schema.fromJsonString` instead of calling `JSON.stringify` directly, so the package passes the `global-json` check. Output is unchanged for JSON-serialisable values.
package/dist/index.mjs CHANGED
@@ -1,7 +1,7 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-D3KUYPsf.mjs";
2
2
  import { Kernel } from "@systemfsoftware/effect-sim-kernel";
3
3
  import { createSpanRecorder, providedWorkspaceRoot, replayOfText, testIdentityOf, throwFailureRecord } from "@systemfsoftware/vitest/failure";
4
- import { Cause, Config, Context, Effect, Exit, Layer, Match, Option, Schema, Scope, Tracer } from "effect";
4
+ import { Cause, Config, Context, Effect, Exit, Layer, Match, Option, Result, Schema, Scope, Tracer } from "effect";
5
5
  import { dual } from "effect/Function";
6
6
  import { VitestTestContext, vitestTestContextKey } from "@systemfsoftware/vitest";
7
7
  import { captureRunBinding } from "@systemfsoftware/vitest/integration";
@@ -43,6 +43,10 @@ var KernelCase_exports = /* @__PURE__ */ __exportAll({
43
43
  exploreOnce: () => exploreOnce,
44
44
  liveCase: () => liveCase
45
45
  });
46
+ const jsonTextOf = (value) => Result.match(Schema.encodeUnknownResult(Schema.fromJsonString(Schema.Unknown))(value), {
47
+ onFailure: () => String(value),
48
+ onSuccess: (text) => text
49
+ });
46
50
  /**
47
51
  * One run's program: the case's layers build under the zero-preemption
48
52
  * schedule, exploration is marked, and the scenario body runs under the
@@ -99,7 +103,7 @@ const describeSuspended = (fiber) => {
99
103
  if (first === void 0) return `fiber ${fiber.id}`;
100
104
  return `fiber ${fiber.id} at ${first}`;
101
105
  };
102
- const describeKernelFailure = (failure) => Match.value(failure).pipe(Match.when({ _tag: "Escape" }, (escape) => `escaped the controlled schedule through the ${escape.timer} timer at ${escape.site}`), Match.when({ _tag: "Blocked" }, (blocked) => `waited on a resource the kernel cannot observe: ${blocked.resources.join(", ")}`), Match.when({ _tag: "Deadlock" }, (deadlock) => `deadlocked with ${deadlock.suspended.length} suspended fibers: ${deadlock.suspended.map(describeSuspended).join("; ")}`), Match.when({ _tag: "Runaway" }, (runaway) => `ran past ${runaway.steps} steps with ${runaway.pending} fibers pending`), Match.when({ _tag: "ReplayTraceDiverged" }, (diverged) => `the replayed trace diverged at step ${diverged.atStep}: expected ${JSON.stringify(diverged.expected)}, got ${JSON.stringify(diverged.actual)}`), Match.exhaustive);
106
+ const describeKernelFailure = (failure) => Match.value(failure).pipe(Match.when({ _tag: "Escape" }, (escape) => `escaped the controlled schedule through the ${escape.timer} timer at ${escape.site}`), Match.when({ _tag: "Blocked" }, (blocked) => `waited on a resource the kernel cannot observe: ${blocked.resources.join(", ")}`), Match.when({ _tag: "Deadlock" }, (deadlock) => `deadlocked with ${deadlock.suspended.length} suspended fibers: ${deadlock.suspended.map(describeSuspended).join("; ")}`), Match.when({ _tag: "Runaway" }, (runaway) => `ran past ${runaway.steps} steps with ${runaway.pending} fibers pending`), Match.when({ _tag: "ReplayTraceDiverged" }, (diverged) => `the replayed trace diverged at step ${diverged.atStep}: expected ${jsonTextOf(diverged.expected)}, got ${jsonTextOf(diverged.actual)}`), Match.exhaustive);
103
107
  /** One run with its own recorder: the record is rendered from exactly the spans this run opened (KTD2). */
104
108
  const recorded = (program) => {
105
109
  const recorder = createSpanRecorder();
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@systemfsoftware/effect-spec-runtime",
3
3
  "license": "Apache-2.0",
4
- "version": "1.3.2",
4
+ "version": "1.3.3",
5
5
  "author": "Ryan Lee <drdgvhbh@gmail.com>",
6
6
  "repository": {
7
7
  "type": "git",
@@ -37,10 +37,10 @@
37
37
  "devDependencies": {
38
38
  "@microsoft/api-extractor": "^7.60.1",
39
39
  "@systemfsoftware/arethetypeswrong-cli": "^4.2.0",
40
- "@systemfsoftware/oxlint-config-recommended": "^8.0.4",
40
+ "@systemfsoftware/oxlint-config-recommended": "^9.0.0",
41
41
  "@systemfsoftware/tsconfig": "^2.1.0",
42
42
  "@systemfsoftware/tsdown-config": "^0.1.3",
43
- "@systemfsoftware/vitest": "^4.2.0",
43
+ "@systemfsoftware/vitest": "^4.2.1",
44
44
  "@systemfsoftware/vitest-config": "^0.1.4",
45
45
  "@types/node": "^26.6.6",
46
46
  "effect": "^4.1.4",
@@ -52,7 +52,7 @@
52
52
  "vitest": "^5.1.0"
53
53
  },
54
54
  "peerDependencies": {
55
- "@systemfsoftware/vitest": "^4.2.0",
55
+ "@systemfsoftware/vitest": "^4.2.1",
56
56
  "effect": "^4.1.4",
57
57
  "vitest": "^5.1.0"
58
58
  },
@@ -66,7 +66,7 @@
66
66
  "typecheck": "tsc -b",
67
67
  "test": "vitest run",
68
68
  "test:types": "TSTYCHE_TYPESCRIPT_MODULE=tstyche-typescript tstyche",
69
- "lint": "f=${OXLINT_FORMAT:-${AGENT:+agent}}; oxlint . --format=${f:-default}",
69
+ "lint": "f=${OXLINT_FORMAT:-${AGENT:+agent}}; effect-tsgo oxlint . --format=${f:-default}",
70
70
  "attw": "attw --pack .",
71
71
  "api:check": "api-extractor-quiet run",
72
72
  "api:update": "api-extractor run --local"