fix: repair cross-package bugs so all tests and tsc pass#72
Open
stooit wants to merge 1 commit into
Open
Conversation
- api.ts: import/re-export renamed hook (useThrottle -> useDebounce) - date.ts: use en-AU short locale for d/MM/yyyy without leading-zero day - bunfig.toml: preload happy-dom setup so UI tests have a DOM - Button.tsx: apply aria-label prop to the button element - DataTable.tsx: fix stale-closure sort toggle via functional updater - tsconfig.json: add bun-types so bun:test resolves
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 and type errors across the monorepo.
bun testreports 13 pass / 0 fail andtsc --noEmitis clean. No test files modified; no dependencies added.Bugs fixed
apps/web/src/lib/api.tsuseThrottle(no longer exported by@e2e/utils)useDebounce(canonical name) asuseSearchDebouncepackages/utils/src/format/date.ts01/03/2024) and risk of day/month confusionIntl.DateTimeFormat("en-AU", { dateStyle: "short" })→d/MM/yyyy(no leading-zero day, local-time safe)bunfig.tomldocument is not definedin UI testspreloadof the UI happy-dom setup to[test]packages/ui/src/components/Button/Button.tsxariaLabelprop destructured but never appliedaria-labelto the<button>packages/ui/src/components/DataTable/DataTable.tsxsetSortDir(prev => ...)tsconfig.jsonbun:testunresolved (TS2307)"types": ["bun-types"]Verification
bun test→ 13 pass / 0 failnpx tsc --noEmit→ cleantest/or*.test.*were changed.Assumptions
@e2e/utilsisuseDebounce(confirmed inpackages/utils/src/index.ts).en-AUshort date style is the intended format the date test targets; chosen over manual UTC extraction to avoid an off-by-one for non-UTC-timezone callers.