waygraph 0.7.14 → 0.7.15

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/dist/graph.js CHANGED
@@ -98,7 +98,7 @@ export async function findOrphanBlocks(projectDir) {
98
98
  const exportName = m[1];
99
99
  if (referenced.has(exportName))
100
100
  continue;
101
- if (!/defineBlock|defineNavBlock/.test(src))
101
+ if (!/defineBlock|defineEffectBlock|defineMemEffectBlock|defineNavBlock|defineMemNavBlock/.test(src))
102
102
  continue;
103
103
  let block = exportNameToBlockName(exportName);
104
104
  try {
@@ -234,14 +234,17 @@ function resolveGenericArg(blockFilePath, arg) {
234
234
  return [inline[1]];
235
235
  return resolveTypeToTags(blockFilePath, arg);
236
236
  }
237
- /** Every `defineBlock<In, Out>(` call site in a file's own source, in order. */
237
+ /** Every `defineBlock` / `defineEffectBlock` / `defineMemEffectBlock` `<In, Out>` call site. */
238
238
  function extractDefineBlockGenerics(src) {
239
239
  // Each argument is either a plain identifier or an inline `Checkpoint<...>`
240
- // (its own angle brackets, so the outer defineBlock<...> pair alone won't
240
+ // (its own angle brackets, so the outer defineX<...> pair alone won't
241
241
  // balance correctly against a naive greedy match) - captured as a single
242
242
  // alternation so both shapes come out of the same two capture groups.
243
+ // Effect helpers are TypeScript salt over defineBlock - same In/Out edges.
243
244
  const arg = String.raw `(Checkpoint<[^>]*>|[A-Za-z_$][\w]*)`;
244
- const re = new RegExp(String.raw `defineBlock<\s*${arg}\s*,\s*${arg}\s*>`, "g");
245
+ const re = new RegExp(String.raw `define(?:Mem)?(?:Effect)?Block<\s*${arg}\s*,\s*${arg}\s*>`, "g");
246
+ // Matches: defineBlock | defineEffectBlock | defineMemEffectBlock
247
+ // (defineMemBlock alone is not a real helper - Mem* only prefixes Effect.)
245
248
  const calls = [];
246
249
  let m;
247
250
  while ((m = re.exec(src)) !== null) {
@@ -301,7 +304,11 @@ export async function discoverGraph(projectDir) {
301
304
  }
302
305
  const call = calls[callIndex++];
303
306
  if (!call) {
304
- skipped.push({ block: blockName, file: relFile, reason: "no defineBlock<In, Out> generic call found" });
307
+ skipped.push({
308
+ block: blockName,
309
+ file: relFile,
310
+ reason: "no defineBlock/defineEffectBlock<In, Out> generic call found",
311
+ });
305
312
  continue;
306
313
  }
307
314
  const fromTags = resolveGenericArg(file, call.in);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "waygraph",
3
- "version": "0.7.14",
3
+ "version": "0.7.15",
4
4
  "type": "module",
5
5
  "description": "A typed graph of reusable Blocks for driving a browser through E2E flows.",
6
6
  "license": "MIT",
@@ -19,7 +19,7 @@
19
19
  "baseUrl": "https://www.saucedemo.com"
20
20
  },
21
21
  "dependencies": {
22
- "waygraph": "^0.7.14"
22
+ "waygraph": "^0.7.15"
23
23
  },
24
24
  "devDependencies": {
25
25
  "@playwright/test": "^1.55.0",