@systemfsoftware/effect-spec-runtime 1.3.0 → 1.3.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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,5 @@
1
1
  # @systemfsoftware/effect-spec-runtime
2
2
 
3
- # @systemfsoftware/effect-spec-runtime@1.3.0
3
+ # @systemfsoftware/effect-spec-runtime@1.3.1
4
4
 
5
- Adds `SpanRecorder`, a tracer that keeps every span a program opens, in the order they began. It is the span harness for a package below `@systemfsoftware/trace-spec` in the dependency graph whose published behaviour is the spans it emits. Use `SpanRecorder.make()` and run the program under `Effect.withTracer(program, recorder.tracer)`.
5
+ Requires Effect ^4.1.4.
package/dist/index.mjs CHANGED
@@ -101,7 +101,7 @@ const describeSuspended = (fiber) => {
101
101
  if (first === void 0) return `fiber ${fiber.id}`;
102
102
  return `fiber ${fiber.id} at ${first}`;
103
103
  };
104
- 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.exhaustive);
104
+ 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);
105
105
  /** One run with its own recorder: the record is rendered from exactly the spans this run opened (KTD2). */
106
106
  const recorded = (program) => {
107
107
  const recorder = createSpanRecorder();
@@ -124,7 +124,7 @@ const throwRecord = (failure, schedule, recorder) => throwFailureRecord({
124
124
  schedule: scheduleNoteOf(schedule),
125
125
  root: providedWorkspaceRoot()
126
126
  });
127
- const throwKernelFailure = (failure, schedule, recorder) => throwRecord(new KernelFailure({ detail: describeKernelFailure(failure) }), schedule, recorder);
127
+ const throwKernelFailure = (failure, schedule, recorder) => throwRecord(KernelFailure.make({ detail: describeKernelFailure(failure) }), schedule, recorder);
128
128
  const throwExitFailure = (exit, schedule, recorder) => throwRecord(Cause.squash(exit.cause), schedule, recorder);
129
129
  const isKernelFailure = (observed) => "failure" in observed;
130
130
  const throwIfExitFailed = (observed, schedule, recorder) => {
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.0",
4
+ "version": "1.3.1",
5
5
  "author": "Ryan Lee <drdgvhbh@gmail.com>",
6
6
  "repository": {
7
7
  "type": "git",
@@ -32,18 +32,18 @@
32
32
  "dist"
33
33
  ],
34
34
  "dependencies": {
35
- "@systemfsoftware/effect-sim-kernel": "^2.0.5"
35
+ "@systemfsoftware/effect-sim-kernel": "^2.0.6"
36
36
  },
37
37
  "devDependencies": {
38
38
  "@microsoft/api-extractor": "^7.59.4",
39
39
  "@systemfsoftware/arethetypeswrong-cli": "^4.2.0",
40
- "@systemfsoftware/oxlint-config-recommended": "^8.0.1",
40
+ "@systemfsoftware/oxlint-config-recommended": "^8.0.3",
41
41
  "@systemfsoftware/tsconfig": "^2.1.0",
42
42
  "@systemfsoftware/tsdown-config": "^0.1.2",
43
- "@systemfsoftware/vitest": "^4.1.2",
43
+ "@systemfsoftware/vitest": "^4.1.3",
44
44
  "@systemfsoftware/vitest-config": "^0.1.3",
45
45
  "@types/node": "^26.6.5",
46
- "effect": "^4.1.2",
46
+ "effect": "^4.1.4",
47
47
  "fast-check": "^4.10.2",
48
48
  "oxlint": "~1.93.0",
49
49
  "rimraf": "^6.1.3",
@@ -52,8 +52,8 @@
52
52
  "vitest": "^5.1.0"
53
53
  },
54
54
  "peerDependencies": {
55
- "@systemfsoftware/vitest": "^4.1.2",
56
- "effect": "^4.1.2",
55
+ "@systemfsoftware/vitest": "^4.1.3",
56
+ "effect": "^4.1.4",
57
57
  "vitest": "^5.1.0"
58
58
  },
59
59
  "publishConfig": {