Conversation
- api: import current useDebounce hook (renamed from useThrottle) and re-export as useSearchDebounce in apps/web - ui: pass aria-label through Button and add iconOnly fallback label with dev warning (WCAG 4.1.2) - utils: fix formatDate to day-first with no leading zero on the day - tsconfig: register bun-types so bun:test resolves (removes 4 TS2307)
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.
bun run test→ 13 pass / 0 fail;bunx tsc --noEmit→ 0 errors. No test files modified, no dependencies added.Fixes by area
apps/websrc/lib/api.tspackages/utils(useThrottle→useDebounce). Import the current name and re-export it asuseSearchDebounce(the app-level alias the test asserts on). Resolves theTS2305type error and bothapi moduletests.packages/uicomponents/Button/Button.tsxaria-labelwas not forwarded to the rendered<button>. Now passed through, with aniconOnlyfallback label + dev-onlyconsole.warnwhen none is supplied (WCAG 4.1.2). Fixes both accessibility tests.packages/utilsformat/date.tsformatDatereturned01/03/2024; test requires day-first with no leading zero on the day. UsesformatToPartsand strips the day's leading zero →1/03/2024.tsconfig.jsonbun-typesdevDependency viacompilerOptions.typessobun:testresolves — clears 4 pre-existingTS2307errors to reach the required zero-error state.Assumptions
useSearchDebounceis intended as the app-level export name;packages/utilslegitimately exportsuseDebounceand was left unchanged.bun:testTS2307 errors were pre-existing (confirmed against baseline). Fixing them was in-scope given the "eliminate all type errors" goal, and uses only a devDependency already inpackage.json— no new deps.Verification
bun run test→ 13 pass, 0 fail (17 assertions, 5 files)bunx tsc --noEmit→ 0 errors