fix: repair cross-package bugs and test config in monorepo#54
Open
stooit wants to merge 1 commit into
Open
Conversation
- apps/web: import useDebounce instead of removed useThrottle, fix useSearchDebounce re-export alias to match the renamed hook - packages/utils: fix formatDate locale/format so day 1 is not confused with month 1 (delegate field ordering to CLDR via dateStyle) - packages/ui Button: pass aria-label through so icon-only buttons have an accessible name - packages/ui DataTable: fix stale-closure sort toggle using functional state updater - bunfig.toml/packages/ui/bunfig.toml: run React tests under happy-dom - tsconfig.json: add bun-types so bun:test resolves under tsc 13 pass / 0 fail; tsc --noEmit clean. No test files or deps changed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes all failing tests (13 → 0 failures) and all
tsc --noEmittype errors across the bun-workspace monorepo. Bugs spanned three packages plus test configuration.Verification:
bun test→13 pass / 0 fail;npx tsc --noEmit→ clean (no output).Bugs fixed
apps/web/src/lib/api.tsuseThrottlewas renamed touseDebounceinpackages/utils; updated the import and corrected theuseSearchDebouncere-export alias to point at the real export.packages/utils/src/format/date.tspackages/ui/src/components/Button/Button.tsxaria-labelthrough to the underlying element.packages/ui/src/components/DataTable/DataTable.tsxTest configuration
bunfig.toml/packages/ui/bunfig.toml— ensure the React/DOM tests run under thehappy-domenvironment (the per-package config previously dropped the environment, causingdocument is not defined).tsconfig.json— addedbun-types(already present innode_modules) sobun:testimports resolve undertsc.Constraints honoured
bun-typeswas already installed).Notes / assumptions
apps/web) to match the real exported nameuseDebounce, since the test assertsuseSearchDebounceis the public re-export.