Skip to content

fix: cross-runtime compat and bump stitch-sdk to 0.3.5 - #188

Merged
davideast merged 2 commits into
mainfrom
fix/cross-runtime-file-read
May 14, 2026
Merged

fix: cross-runtime compat and bump stitch-sdk to 0.3.5#188
davideast merged 2 commits into
mainfrom
fix/cross-runtime-file-read

Conversation

@davideast

Copy link
Copy Markdown
Owner

Fixes

1. Bun is not defined when running via bun x / npx

ParseArgsStep.ts used Bun.file() to read the -f argument file. The Bun global is not available when the CLI is invoked via bun x or npx. Replaced with readFile() from node:fs/promises which works in both runtimes.

2. MissingRefError: can't resolve reference #/$defs/ScreenInstance

Bumps @google/stitch-sdk from 0.3.4 to 0.3.5, which repairs tool schemas before AJV compilation can trigger a crash. See google-labs-code/stitch-sdk#355.

Changes

File Change
src/commands/tool/steps/ParseArgsStep.ts Bun.file()readFile() from node:fs/promises
package.json @google/stitch-sdk 0.3.40.3.5
bun.lock Updated lockfile

davideast added 2 commits May 12, 2026 17:38
- Replace Bun.file() with node:fs/promises readFile in ParseArgsStep
  so the CLI works via npx/bun x where Bun global is unavailable.
- Bump @google/stitch-sdk 0.3.4 → 0.3.5 to fix AJV MissingRefError
  crash on tool list (schema repair before AJV compilation).
@davideast
davideast force-pushed the fix/cross-runtime-file-read branch from 6ef262c to 64d72e0 Compare May 14, 2026 13:34
@davideast
davideast merged commit f929507 into main May 14, 2026
1 check passed
@davideast
davideast deleted the fix/cross-runtime-file-read branch May 14, 2026 13:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant