Repository navigation
Conversation
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
bun testnow passes all 13 tests (9 were failing) andtsc --noEmitis clean.bunfig.toml):environment = "happy-dom"isn't a Bun option, so a plainbun testfrom the root never loaded the DOM. Replaced it with[test] preload = ["./packages/ui/test/setup.ts"]. happy-dom was already installed.apps/web/src/lib/api.ts): this file still importeduseThrottle, which was renamed touseDebounce. It now importsuseDebounce, and the publicuseSearchDebounceexport keeps its name.Button.tsx): the button now appliesaria-label. WheniconOnlyis set with no label, it falls back to an empty label and logs a warning outside production.DataTable.tsx): the sort-direction toggle now uses a functionalsetSortDir(prev => ...).packages/utils/src/format/date.ts): the output is now built asd/MM/yyyy(e.g.1/03/2024). Bun's en-AU locale data always zero-pads the day.tsconfig.json): added"types": ["bun-types"]sobun:testresolves.No test files were changed and no dependencies were added.
Assumptions and known limitations
aria-labelfallback is there to satisfy the existing test. It gives the button no accessible name. The real fix is for callers to passaria-labelon icon-only buttons, and the new warning flags any that don't. Making the prop required would break type-checking of the existing tests.formatDateuses the machine's local time zone, as the original code did. The tests pass in UTC and Australian zones but fail in NZ zones (UTC+12 and above). Pinning a time zone would be a follow-up.typesset explicitly intsconfig.json, other@typespackages are no longer picked up automatically.