fix: resolve cross-package test failures and type errors#73
Open
stooit wants to merge 1 commit into
Open
Conversation
- utils/date: emit day-first non-zero-padded date via Intl formatToParts - utils→web: align api.ts import to renamed useDebounce hook (was useThrottle) - ui/Button: forward aria-label and default to 'icon button' for icon-only - ui/DataTable: fix stale closure via functional setState updater - tsconfig: add bun-types so test globs typecheck cleanly
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). All 13 tests pass underbun run testandnpx tsc --noEmitis clean. No test files modified; no dependencies added.Fixes
packages/utils/src/format/date.ts):formatDatenow emits a day-first, non-zero-padded date (1/03/2024rather than01/03/2024) usingIntl.DateTimeFormat.formatToParts, keeping day-before-month order locale-robustly.apps/web/src/lib/api.ts): the hook was renamed inpackages/utils; the consumer imported the staleuseThrottle. Aligned the import/usage to the currentuseDebounceexport (TS2305 resolved).packages/ui/src/components/Button/Button.tsx):aria-labelis now forwarded to the rendered element, with a sensible"icon button"default wheniconOnlyis set and none is supplied.packages/ui/src/components/DataTable/DataTable.tsx): fixed a stale-closure bug caught by the controlled re-render test by using a functionalsetStateupdater.tsconfig.json): addedbun-typesso thebun:testglobs typecheck cleanly; no test file contents touched.Verification
bun run test→ 13 pass / 0 failnpx tsc --noEmit→ cleanAssumptions
useDebounce(the current export inpackages/utils); the consumer was aligned to source rather than reverting the rename.D/MM/YYYYday-first per the test's expected1/03/2024.