@systemfsoftware/effect-spec-runtime 0.3.1 → 1.0.0

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,24 @@
1
1
  # @systemfsoftware/effect-spec-runtime
2
2
 
3
+ ## 1.0.0
4
+
5
+ ### Major Changes
6
+
7
+ - Require `effect` `^4` (stable 4.0.0). Release candidates are no longer supported: imports follow 4.0.0's module layout (`effect/http`, `effect/rpc`, `effect/http-api`, `effect/cluster`, `effect/process`, `effect/socket`, `effect/persistence`, `effect/reactivity`, `effect/encoding`, `effect/Arbitrary`), which does not exist in any 4.0.0 RC.
8
+
9
+ ### Patch Changes
10
+
11
+ - Updated dependencies:
12
+ - @systemfsoftware/effect-sim-kernel@1.0.0
13
+ - @systemfsoftware/vitest@1.0.0
14
+
15
+ ## 0.3.2
16
+
17
+ ### Patch Changes
18
+
19
+ - Updated dependencies:
20
+ - @systemfsoftware/vitest@0.3.0
21
+
3
22
  ## 0.3.1
4
23
 
5
24
  ### Patch Changes
package/dist/index.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-D7D4PA-g.mjs";
2
2
  import { Kernel } from "@systemfsoftware/effect-sim-kernel";
3
- import { createSpanRecorder, providedWorkspaceRoot, testIdentityOf, throwFailureRecord } from "@systemfsoftware/vitest/failure";
3
+ import { createSpanRecorder, providedWorkspaceRoot, replayOfText, testIdentityOf, throwFailureRecord } from "@systemfsoftware/vitest/failure";
4
4
  import { Cause, Config, Context, Effect, Exit, Layer, Match, Option, Schema } from "effect";
5
5
  import { dual } from "effect/Function";
6
6
  import { VitestTestContext, vitestTestContextKey } from "@systemfsoftware/vitest";
@@ -143,23 +143,6 @@ const seedsToRun = (seed, budget) => {
143
143
  if (seed === void 0) return seedList(budget);
144
144
  return [seed];
145
145
  };
146
- const SEED_PATTERN = /seed=(\d+)/u;
147
- const PATH_PATTERN = /path=((?:\d+)(?:,\d+)*)/u;
148
- const seedOf = (value) => {
149
- const match = SEED_PATTERN.exec(value);
150
- if (match === null) return void 0;
151
- return Number(match[1]);
152
- };
153
- const pathOf = (value) => Option.getOrUndefined(Option.map(Option.flatMap(Option.fromNullishOr(PATH_PATTERN.exec(value)), (match) => Option.fromNullishOr(match[1])), (raw) => raw.split(",").map((entry) => Number(entry))));
154
- const isEmptyReplay = (replay) => replay.seed === void 0 && replay.path === void 0;
155
- const replayOf = (value) => {
156
- const replay = {
157
- seed: seedOf(value),
158
- path: pathOf(value)
159
- };
160
- if (isEmptyReplay(replay)) throw new Error(`CONFORMANCE_REPLAY names neither a seed nor a decision path: ${value}`);
161
- return replay;
162
- };
163
146
  const readReplayValue = () => Effect.runPromise(Effect.map(Config.option(Config.String("CONFORMANCE_REPLAY")), Option.getOrUndefined));
164
147
  const replayRun = (program, replay, path) => {
165
148
  const run = recorded(program);
@@ -202,10 +185,7 @@ const baselineThen = (program, seed) => {
202
185
  return seededRuns(program, seed, surveyOf(baseline));
203
186
  });
204
187
  };
205
- const replayOrSeeded = (program, replay) => {
206
- if (replay.path !== void 0) return replayRun(program, replay, replay.path);
207
- return baselineThen(program, replay.seed);
208
- };
188
+ const replayOrSeeded = (program, replay) => replay.path.length > 0 ? replayRun(program, replay, replay.path) : baselineThen(program, replay.seed);
209
189
  /**
210
190
  * Runs one case's program under the kernel: the direct order first, then the
211
191
  * profile's seeded PCT schedules at the profile depth. A failure reports its
@@ -213,7 +193,7 @@ const replayOrSeeded = (program, replay) => {
213
193
  */
214
194
  const explore = (program) => readReplayValue().then((value) => {
215
195
  if (value === void 0) return baselineThen(program, void 0);
216
- return replayOrSeeded(program, replayOf(value));
196
+ return replayOrSeeded(program, replayOfText(value));
217
197
  });
218
198
  //#endregion
219
199
  //#region src/Register.ts
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": "0.3.1",
4
+ "version": "1.0.0",
5
5
  "author": "Ryan Lee <drdgvhbh@gmail.com>",
6
6
  "repository": {
7
7
  "type": "git",
@@ -32,18 +32,25 @@
32
32
  "dist"
33
33
  ],
34
34
  "dependencies": {
35
- "@systemfsoftware/effect-sim-kernel": "^0.2.0"
35
+ "@systemfsoftware/effect-sim-kernel": "^1.0.0"
36
36
  },
37
37
  "devDependencies": {
38
38
  "@microsoft/api-extractor": "^7.59.1",
39
39
  "@systemfsoftware/arethetypeswrong-cli": "^4.2.0",
40
- "@systemfsoftware/oxlint-config-recommended": "^3.2.0",
40
+ "@systemfsoftware/oxlint-config-recommended": "^4.0.0",
41
+ "@systemfsoftware/stryker-config": "^0.1.0",
42
+ "@systemfsoftware/stryker-ignorer-effect-schema-declarations": "latest",
43
+ "@systemfsoftware/stryker-ignorer-in-source-vitest-block": "latest",
44
+ "@systemfsoftware/stryker-js": "latest",
45
+ "@systemfsoftware/stryker-js-typescript-checker": "latest",
46
+ "@systemfsoftware/stryker-js-vitest-runner": "latest",
47
+ "@systemfsoftware/stryker-test-contribution": "latest",
41
48
  "@systemfsoftware/tsconfig": "^2.0.1",
42
49
  "@systemfsoftware/tsdown-config": "^0.1.0",
43
- "@systemfsoftware/vitest": "^0.2.0",
50
+ "@systemfsoftware/vitest": "^1.0.0",
44
51
  "@systemfsoftware/vitest-config": "^0.1.0",
45
52
  "@types/node": "^26",
46
- "effect": "4.0.0-rc.117",
53
+ "effect": "^4",
47
54
  "fast-check": "^4",
48
55
  "oxlint": "~1.82.0",
49
56
  "rimraf": "^6.1.3",
@@ -52,8 +59,8 @@
52
59
  "vitest": "^5"
53
60
  },
54
61
  "peerDependencies": {
55
- "@systemfsoftware/vitest": "^0.2.0",
56
- "effect": "4.0.0-rc.117",
62
+ "@systemfsoftware/vitest": "^1.0.0",
63
+ "effect": "^4",
57
64
  "vitest": "^5"
58
65
  },
59
66
  "publishConfig": {
@@ -65,6 +72,7 @@
65
72
  "build": "tsdown -l warn && pnpm api:check",
66
73
  "typecheck": "tsc -b",
67
74
  "test": "vitest run",
75
+ "mutation": "stryker run",
68
76
  "test:types": "TSTYCHE_TYPESCRIPT_MODULE=tstyche-typescript tstyche",
69
77
  "lint": "f=${OXLINT_FORMAT:-${AGENT:+agent}}; oxlint . --format=${f:-default}",
70
78
  "attw": "attw --pack .",