@systemfsoftware/storybook-gherkin 2.0.0 → 2.0.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 +8 -0
- package/dist/index.d.ts +9 -3
- package/dist/index.mjs +5 -3
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# @systemfsoftware/storybook-gherkin
|
|
2
2
|
|
|
3
|
+
## 2.0.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- The peer requirements for `effect` and for the Effect test-runner integration now accept any compatible `4.0.0-rc` release, instead of demanding one exact release candidate.
|
|
8
|
+
|
|
9
|
+
Installing alongside a newer release candidate no longer reports an unmet peer dependency or resolves a second copy of `effect` into the dependency tree.
|
|
10
|
+
|
|
3
11
|
## 2.0.0
|
|
4
12
|
|
|
5
13
|
### Major Changes
|
package/dist/index.d.ts
CHANGED
|
@@ -2,8 +2,11 @@ import { Context, Effect, Schema } from "effect";
|
|
|
2
2
|
import { UserEventObject, screen, within } from "storybook/test";
|
|
3
3
|
import { Simplify, UnionToIntersection } from "type-fest";
|
|
4
4
|
//#region src/Capture.d.ts
|
|
5
|
-
|
|
5
|
+
declare const CaptureTag: {
|
|
6
6
|
readonly _tag: 'Capture';
|
|
7
|
+
};
|
|
8
|
+
type CaptureTag = typeof CaptureTag;
|
|
9
|
+
interface Capture<Name extends string = string, _A = unknown> extends CaptureTag {
|
|
7
10
|
readonly name: Name;
|
|
8
11
|
readonly schema: Schema.ConstraintDecoder<unknown> | undefined;
|
|
9
12
|
readonly default: string | undefined;
|
|
@@ -148,8 +151,11 @@ interface StepContext<TArgs = unknown> {
|
|
|
148
151
|
type Hole = Capture | string | number;
|
|
149
152
|
type CapsOf<THoles extends readonly Hole[]> = THoles extends readonly [] ? {} : Simplify<UnionToIntersection<{ [K in keyof THoles]: THoles[K] extends Capture<infer N, infer A> ? { [P in N]: A; } : {}; }[number]>>;
|
|
150
153
|
type StepHandler<TCaps, TArgs = unknown> = (ctx: StepContext<TArgs>, caps: TCaps) => void | Promise<void>;
|
|
151
|
-
|
|
152
|
-
readonly _tag:
|
|
154
|
+
declare const StepTag: {
|
|
155
|
+
readonly _tag: "Step";
|
|
156
|
+
};
|
|
157
|
+
type StepTag = typeof StepTag;
|
|
158
|
+
interface Step<TArgs = unknown> extends StepTag {
|
|
153
159
|
readonly model: StepModel;
|
|
154
160
|
readonly run: (values: Readonly<Record<string, string>>, ctx: StepContext<TArgs>) => Effect.Effect<void, CaptureDecodeFailed>;
|
|
155
161
|
}
|
package/dist/index.mjs
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { Array as Array$1, Cause, Context, Deferred, Effect, Exit, Fiber, Match, Schema } from "effect";
|
|
2
2
|
import { screen } from "storybook/test";
|
|
3
3
|
//#region src/Capture.ts
|
|
4
|
+
const CaptureTag = { _tag: "Capture" };
|
|
4
5
|
function capture(name, options) {
|
|
5
6
|
return {
|
|
6
|
-
|
|
7
|
+
...CaptureTag,
|
|
7
8
|
name,
|
|
8
9
|
schema: options?.schema,
|
|
9
10
|
default: options?.default
|
|
@@ -80,6 +81,7 @@ const resolveKeywords = (steps) => {
|
|
|
80
81
|
})[1];
|
|
81
82
|
};
|
|
82
83
|
const STEP_TAG = "Step";
|
|
84
|
+
const StepTag = { _tag: STEP_TAG };
|
|
83
85
|
const buildModel = (keyword, statics, holes) => {
|
|
84
86
|
const parts = [];
|
|
85
87
|
const captures = [];
|
|
@@ -126,7 +128,7 @@ const makeStepCtor = (keyword) => {
|
|
|
126
128
|
return (handler) => {
|
|
127
129
|
const model = buildModel(keyword, statics, holes);
|
|
128
130
|
return {
|
|
129
|
-
|
|
131
|
+
...StepTag,
|
|
130
132
|
model,
|
|
131
133
|
run: (values, ctx) => Effect.forEach(model.captures, (cap) => decodeCapture(cap, values, model)).pipe(Effect.flatMap((decoded) => {
|
|
132
134
|
const caps = {};
|
|
@@ -344,7 +346,7 @@ const From = (story) => {
|
|
|
344
346
|
const play = story.play;
|
|
345
347
|
if (play === void 0) return [];
|
|
346
348
|
return [{
|
|
347
|
-
|
|
349
|
+
...StepTag,
|
|
348
350
|
model: {
|
|
349
351
|
keyword: "Given",
|
|
350
352
|
parts: ["the prior scenario completed"],
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@systemfsoftware/storybook-gherkin",
|
|
3
3
|
"license": "Apache-2.0",
|
|
4
|
-
"version": "2.0.
|
|
4
|
+
"version": "2.0.1",
|
|
5
5
|
"author": "Ryan Lee <drdgvhbh@gmail.com>",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"type-fest": "^5.8.0"
|
|
40
40
|
},
|
|
41
41
|
"peerDependencies": {
|
|
42
|
-
"effect": "4.0.0-rc.
|
|
42
|
+
"effect": "^4.0.0-rc.111",
|
|
43
43
|
"storybook": ">=10.0.0"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
"@types/react-dom": "^19.2.4",
|
|
52
52
|
"@vitest/browser": "^4",
|
|
53
53
|
"@vitest/browser-playwright": "^4",
|
|
54
|
-
"effect": "4.0.0-rc.
|
|
54
|
+
"effect": "4.0.0-rc.111",
|
|
55
55
|
"oxlint": "^1.77.0",
|
|
56
56
|
"playwright": "^1",
|
|
57
57
|
"react": "^19.2.8",
|
|
@@ -62,8 +62,8 @@
|
|
|
62
62
|
"typescript": "^7",
|
|
63
63
|
"vite": "^8",
|
|
64
64
|
"vitest": "^4.1.10",
|
|
65
|
-
"@systemfsoftware/
|
|
66
|
-
"@systemfsoftware/
|
|
65
|
+
"@systemfsoftware/tsconfig": "^1.3.3",
|
|
66
|
+
"@systemfsoftware/oxlint-config": "^0.1.0"
|
|
67
67
|
},
|
|
68
68
|
"publishConfig": {
|
|
69
69
|
"provenance": true
|