Skip to content

Commit 5541295

Browse files
la14-1spawn-qa-bot
andauthored
refactor: fix stale parseJsonRaw references in docs (#2247)
parseJsonRaw was removed in 8b99fe0 but CLAUDE.md and .claude/rules/type-safety.md still referenced it. Updated to parseJsonObj which is the current function name. Co-authored-by: spawn-qa-bot <qa@openrouter.ai>
1 parent 849e980 commit 5541295

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

.claude/rules/type-safety.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ If multiple modules validate the same shape, extract the schema to a shared file
6464

6565
Shared schema locations:
6666
- `.claude/scripts/schemas.ts` — hook stdin payload schemas
67-
- `packages/shared/src/parse.ts``parseJsonWith(text, schema)` and `parseJsonRaw(text)`
67+
- `packages/shared/src/parse.ts``parseJsonWith(text, schema)` and `parseJsonObj(text)`
6868

6969
### For test mocks — use proper Response objects instead of `as any`:
7070
```typescript
@@ -83,5 +83,5 @@ global.fetch = mock(() => Promise.resolve(new Response("Error", { status: 500 })
8383
```
8484

8585
### Shared utilities
86-
- `packages/shared/src/parse.ts``parseJsonWith(text, schema)` and `parseJsonRaw(text)`
86+
- `packages/shared/src/parse.ts``parseJsonWith(text, schema)` and `parseJsonObj(text)`
8787
- `packages/shared/src/type-guards.ts``isString`, `isNumber`, `hasStatus`, `hasMessage`

CLAUDE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ spawn/
2121
src/commands.ts # Compatibility shim → re-exports from commands/
2222
package.json # npm package (@openrouter/spawn)
2323
shared/
24-
src/parse.ts # parseJsonWith(text, schema) and parseJsonRaw(text)
24+
src/parse.ts # parseJsonWith(text, schema) and parseJsonObj(text)
2525
src/type-guards.ts # isString, isNumber, hasStatus, hasMessage
2626
package.json # npm package (@openrouter/spawn-shared)
2727
sh/

0 commit comments

Comments
 (0)