Commit 5c97290
authored
fix(test): add @standard-schema/spec to EXTERNAL_BLOCKLIST (#498)
@vitest/expect imports StandardSchemaV1 from @standard-schema/spec in
its type definitions only (not in JS files). Since collectLeafDependencies()
only scans .js files, this package was not detected and bundled.
Fix by adding @standard-schema/spec to EXTERNAL_BLOCKLIST and as a
runtime dependency, allowing TypeScript to resolve types through
normal node_modules resolution.
> TypeCheckError: Cannot find module '@standard-schema/spec' or its corresponding type declarations.
❯ ../../node_modules/.pnpm/@voidzero-dev+vite-plus-test@0.0.0-4d2367587d11c412d283847253d95e4e36ace419_@types+node_b06a8e0da48f743d40c7a7d8079f73e5/node_modules/@voidzero-dev/vite-plus-test/dist/@vitest/expect/index.d.ts:6:34
<!-- CURSOR_SUMMARY -->
---
> [!NOTE]
> Ensures @standard-schema/spec (types used by `@vitest/expect`) is installed and not bundled so TypeScript can resolve it while Rolldown keeps it external.
>
> - Add `@standard-schema/spec` to `EXTERNAL_BLOCKLIST` in `build.ts` and document it in `BUNDLING.md`
> - Declare `@standard-schema/spec@^1.1.0` in `packages/test/package.json`; update lockfile and align `@vitest/expect` to use 1.1.0
>
> This fixes missing-type errors without changing runtime code paths.
>
> <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit 2c3a2d6. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->1 parent 34a2960 commit 5c97290
4 files changed
Lines changed: 20 additions & 13 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
72 | 72 | | |
73 | 73 | | |
74 | 74 | | |
75 | | - | |
76 | | - | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | | - | |
81 | | - | |
82 | | - | |
83 | | - | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
84 | 85 | | |
85 | 86 | | |
86 | 87 | | |
| |||
398 | 399 | | |
399 | 400 | | |
400 | 401 | | |
| 402 | + | |
401 | 403 | | |
402 | 404 | | |
403 | 405 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
145 | 145 | | |
146 | 146 | | |
147 | 147 | | |
| 148 | + | |
148 | 149 | | |
149 | 150 | | |
150 | 151 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
256 | 256 | | |
257 | 257 | | |
258 | 258 | | |
| 259 | + | |
259 | 260 | | |
260 | 261 | | |
261 | 262 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
0 commit comments