fix: repair cross-package bugs so tests and typecheck pass#40
Open
stooit wants to merge 1 commit into
Open
Conversation
- utils: re-export useDebounce as useSearchDebounce to match consumer + tests - web: import useSearchDebounce from @e2e/utils (was stale useThrottle) - ui: forward aria-label on icon-only Button for accessible name - utils: fix formatDate to en-AU non-zero-padded day/month order - tsconfig: register already-installed bun-types to resolve bun:test types
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 in the monorepo. The suite now reports 13 pass / 0 fail and
tsc --noEmitexits cleanly (0 errors).Four cross-package bugs (plus a type-config gap) were fixed:
packages/utilsnow exportsuseSearchDebounce(re-export ofuseDebounce), andapps/web/src/lib/api.tsimportsuseSearchDebounceinstead of the staleuseThrottle. This resolved both the failingapi moduletests and theTS2305type error.Button(packages/ui) now forwardsaria-labelso it has an accessible name; when no label is provided it no longer emits an emptyaria-label="".packages/utils/src/format/date.tscorrected to produce en-AU day/month order with a non-zero-padded day (e.g.1/03/2024, not01/03/2024).bun:testtype resolution — added the already-installedbun-typespackage tocompilerOptions.typesintsconfig.jsonso test files type-check. No new dependency was added (the package was already present innode_modules).The DataTable controlled re-render (stale-closure) test was verified to pass; no change was required there.
Verification
```
bun test packages/utils/test packages/ui/test apps/web/test --preload ./packages/ui/test/setup.ts
13 pass, 0 fail
./node_modules/.bin/tsc --noEmit
exit 0
```
Assumptions / constraints honoured
Files changed