Commit bf2bbce
fix(cli): dynamically scan root .d.ts files from
## Summary
- Replace hardcoded list of root `.d.ts` files with dynamic `readdir`
scan for `@vitest/browser` package
- This ensures newly added type definition files (like `aria-role.d.ts`,
`utils.d.ts`) are automatically included without requiring manual
updates to the build script
related #909 in the TODO.
## Test ways
- Run `node --import @oxc-node/core/register ./build.ts` in
`packages/test` and verify only `@vitest/browser` root `.d.ts` files are
copied (aria-role.d.ts, context.d.ts, jest-dom.d.ts, matchers.d.ts,
utils.d.ts)
- Verify `vp pack` succeeds in a library project that imports
`UserConfig` from `vite-plus`
Co-authored-by: MK (fengmk2) <fengmk2@gmail.com>@vitest/browser (#944)1 parent 2a393e7 commit bf2bbce
1 file changed
Lines changed: 15 additions & 13 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
619 | 619 | | |
620 | 620 | | |
621 | 621 | | |
622 | | - | |
623 | | - | |
624 | | - | |
625 | | - | |
626 | | - | |
627 | | - | |
628 | | - | |
629 | | - | |
| 622 | + | |
| 623 | + | |
| 624 | + | |
| 625 | + | |
| 626 | + | |
| 627 | + | |
630 | 628 | | |
631 | | - | |
632 | | - | |
633 | | - | |
634 | | - | |
| 629 | + | |
| 630 | + | |
| 631 | + | |
| 632 | + | |
| 633 | + | |
| 634 | + | |
| 635 | + | |
| 636 | + | |
635 | 637 | | |
636 | | - | |
| 638 | + | |
637 | 639 | | |
638 | 640 | | |
639 | 641 | | |
| |||
0 commit comments