fix: repair cross-package bugs failing tests and type checks#41
Open
stooit wants to merge 1 commit into
Open
Conversation
- api.ts: import renamed hook useDebounce (was useThrottle) from @e2e/utils - date.ts: use en-AU dateStyle:short for day-first, no leading-zero day - Button.tsx: pass aria-label through to button element (present for icon-only) - DataTable.tsx: fix stale-closure sort toggle via functional state updater - tsconfig.json: add bun-types so bun:test resolves under tsc
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 (
packages/ui,packages/utils,apps/web). The bugs spanned multiple packages: a hook rename, a locale/format mismatch, a missing a11y passthrough, a stale closure, and a missing TS types entry.Result: 13/13 tests pass,
tsc --noEmitclean (0 errors). No test files modified; no dependencies added.Changes
apps/web/src/lib/api.tsuseThrottle→useDebouncein@e2e/utils; updated import and theuseSearchDebouncere-export alias. Resolves theapi.test.tsimport failure andTS2305.packages/utils/src/format/date.tsformatDateusesen-AUwith{ dateStyle: "short" }— day-first, no leading zero (e.g.1/03/2024).formatDateTimeunchanged.packages/ui/src/components/Button/Button.tsxaria-labelwas destructured but never applied; now passed through to the<button>(always present for icon-only, per the test contract).packages/ui/src/components/DataTable/DataTable.tsxprev => ...).tsconfig.jsonbun-typestocompilerOptions.typessobun:testresolves undertsc.Assumptions
useDebounce(whatpackages/utilsexports); consumer reconciled to it.aria-label(empty string acceptable):aria-label={iconOnly ? (ariaLabel ?? "") : ariaLabel}.en-AUdateStyle: "short"is the intended day-first format.Verification
bun run test→ 13 pass, 0 failnpx tsc --noEmit→ 0 errors