fix: resolve cross-package bugs and type errors in monorepo#50
Open
stooit wants to merge 1 commit into
Open
Conversation
- api.ts: import renamed hook useDebounce (was useThrottle) from @e2e/utils, keep useSearchDebounce re-export alias - Button: apply aria-label so icon-only buttons have an accessible name - DataTable: fix stale-closure in handleSort using functional setState updater - date: use Intl dateStyle 'short' with en-AU for correct D/M/Y ordering - tsconfig: add bun-types to compilerOptions.types for bun:test resolution All 13 tests pass; tsc --noEmit clean.
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 multi-package TypeScript monorepo. After these changes
bun run testreports 13 pass / 0 fail andtsc --noEmitis clean.Bugs fixed
packages/utils→apps/web):apps/web/src/lib/api.tsimporteduseThrottle, which was renamed touseDebouncein@e2e/utils. Updated the import and usage. Kept the publicuseSearchDebouncere-export alias (asserted by a test) by re-exportinguseDebounce as useSearchDebounce.packages/ui):Buttondestructured an aria-label prop but never applied it. Now appliesaria-labelso icon-only buttons have an accessible name.packages/ui):DataTable.handleSorttoggled sort direction off a stale capturedsortDir. Switched to the functional updater formsetSortDir(prev => ...).packages/utils):formatDateused explicit Intl{month, day, year}options producing US M/D/Y ordering. Replaced withdateStyle: "short"underen-AUfor correct D/M/Y ordering (e.g.1/03/2024).Tooling
tsconfig.json: added"types": ["bun-types"]sobun:testimports in test files resolve undertsc.bun-typeswas already present innode_modules— no new dependency added.Verification
bun run test→ 13 pass, 0 fail./node_modules/.bin/tsc --noEmit→ cleanConstraints honoured