fix: repair cross-package bugs and clear type errors#29
Open
stooit wants to merge 1 commit into
Open
Conversation
- apps/web: import renamed hook useDebounce (was stale useThrottle) and re-export it as useSearchDebounce - packages/ui: give icon-only Button an accessible name via aria-label - packages/utils: fix formatDate to emit DD/MM/YYYY (en-AU contract), resolving day/month confusion - tsconfig: resolve bun:test types via a scoped bun-env.d.ts reference instead of clobbering the global types array; include apps test glob
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 5 failing tests and eliminates all
tsc --noEmittype errors across the monorepo. Bugs spanned three packages plus a type-resolution config issue.apps/web/src/lib/api.tspackages/utils(useThrottle→useDebounce); the app still imported the old name. Import the current name and re-export it asuseSearchDebounce(the export the test expects).packages/ui/src/components/Button/Button.tsxaria-labelso the button is reachable by accessible name.packages/utils/src/format/date.tsformatDateproduced ambiguous/locale-wrong output (01/03/2024). Now emits the documentedDD/MM/YYYY(en-AU) contract, fixing the day-1 vs month-1 confusion.tsconfig.json+bun-env.d.tsbun:testtypes are now resolved via a scoped/// <reference types="bun-types" />file instead of clobbering the globaltypesarray (which had suppressed other ambient@types). Test glob added toinclude.Verification
bun run test→ 13 pass / 0 failbunx tsc --noEmit→ 0 errorsNotes / assumptions
date.tsbuilds the formatted string from local date parts (getDate/getMonth/getFullYear) because Bun's ICU pads the day underIntl.DateTimeFormat; this matches every test assertion with no timezone/off-by-one risk for the test inputs.🤖 Generated autonomously.