fix: repair cross-package bugs and test DOM/type setup#71
Open
stooit wants to merge 1 commit into
Open
Conversation
- api.ts: update stale useThrottle import to renamed useDebounce - Button: apply aria-label so icon-only buttons have an accessible name - DataTable: use functional setState to fix stale-closure sort direction - date.ts: use en-AU day/month/year order for short date formatting - bunfig: wire happy-dom preload so bare 'bun test' has a DOM env - tsconfig: add bun-types so bun:test globals type-check
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
bun testcases andtsc --noEmiterrors across the monorepo. Bugs spanned three packages plus the shared test/type configuration. All 13 tests now pass andtsc --noEmitis clean.Changes
src/lib/api.tsuseThrottlewas renamed touseDebounceinpackages/utils; updated the import and theuseSearchDebouncere-export to the new name.src/components/Button/Button.tsxariaLabel. Now wired to the<button>element.src/components/DataTable/DataTable.tsxsetSortDirread a capturedsortDir. Switched to the functional updater form so a second click sorts descending.src/format/date.tsen-AUday/month/year to match the expected format.bunfig.toml,packages/ui/bunfig.tomlenvironment = "happy-dom"alone does not inject DOM globals in bun 1.3.14. Addedpreloadof the@happy-dom/global-registratorsetup so a barebun testfrom the repo root hasdocument/window.tsconfig.json"types": ["bun-types"]sobun:testglobals type-check undertsc --noEmit.Verification
Constraints honored
happy-domandbun-typeswere already installed).