Commit 74e2c2a
committed
fix(test): scope sandbox dependencies for bun's isolated linker
Two failures the previous yarn flat-hoist masked:
1. vertex-ai: `version: '*'` resolves to `google-auth-library@10`, but
every published `@google-cloud/vertexai` declares its transitive at
`^9.0.0`. Bun's isolated linker keeps both physical copies — the test
stubs `GoogleAuth.prototype.getAccessToken` on the @10 copy, the SDK
loads the @9 copy at run-time, the stub never applies, and the real
credential lookup throws `GoogleAuthError`. Pin the direct dep to
`^9.0.0` so bun dedupes to a single `.bun/google-auth-library@9.x.y`
entry and the prototype stub propagates to the SDK.
2. ai: `@ai-sdk/ui-utils` ranges `zod-to-json-schema` at `^3.0.0` and
`ai@4.0.2` ranges `zod` at `^3.0.0`; bun picks `zod-to-json-schema@3.25.2`
next to `zod@3.23.8`. `3.25.x` switched its zod imports to the `zod/v3`
subpath, which only exists in `zod@>=3.25.32` and `zod@4`, so the sandbox
crashes at load time with `ERR_PACKAGE_PATH_NOT_EXPORTED`. Bun does
not honour nested overrides (oven-sh/bun#6608), so a flat
`zod-to-json-schema: <3.25.0` override is the only shape that works;
the only other consumer (`langchain` / `langgraph`) declares
`>=3.0.0` and the constraint still holds.1 parent c737eca commit 74e2c2a
2 files changed
Lines changed: 28 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
| |||
264 | 264 | | |
265 | 265 | | |
266 | 266 | | |
267 | | - | |
268 | | - | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
269 | 272 | | |
270 | 273 | | |
271 | 274 | | |
272 | | - | |
| 275 | + | |
273 | 276 | | |
274 | 277 | | |
275 | 278 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
388 | 388 | | |
389 | 389 | | |
390 | 390 | | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
391 | 406 | | |
392 | 407 | | |
393 | 408 | | |
| 409 | + | |
394 | 410 | | |
395 | 411 | | |
396 | 412 | | |
| |||
0 commit comments