fix: repair cross-package monorepo bugs (all tests + types green) - #118
Open
stooit wants to merge 1 commit into
Open
fix: repair cross-package monorepo bugs (all tests + types green)#118stooit wants to merge 1 commit into
stooit wants to merge 1 commit into
Conversation
Fixes all failing tests (13/13 pass) and eliminates all tsc errors. - fix(web): import renamed useDebounce hook from @e2e/utils (api.ts imported a hook name that no longer existed; re-aliased as useSearchDebounce to preserve the app-local export name) - fix(utils): format AU dates with unpadded day via formatToParts (formatDate now yields day-first, unpadded day e.g. 1/03/2024) - fix(a11y): give icon-only Button an accessible name via aria-label [WCAG 4.1.2] with a dev-mode warn when a label is omitted - refactor(ui): read live sort direction via functional setState in DataTable (defensive hardening against stale-closure sorting) - fix(build): register bun-types in tsconfig and include apps tests so bun:test imports resolve and api.test.ts is typechecked
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 eliminates all TypeScript errors in the monorepo.
tscerrorstsc --noEmitclean (0 errors)Bugs fixed
apps/webapi.tsimported a hook name that no longer exists in@e2e/utils. Corrected to importuseDebounceand re-alias it asuseSearchDebounceto preserve the app-local export name the test expects.packages/uiButtonhad no accessible name. Now appliesaria-label(WCAG 2.2 AA — 4.1.2 Name, Role, Value), with a dev-modeconsole.warnfallback when a label is omitted.packages/uiDataTablesort direction now read via a functionalsetStateupdater. (Defensive hardening — see note below.)packages/utilsformatDateproduces a day-first, unpadded day (e.g.1/03/2024) usingIntl.formatToPartswith explicit day-first assembly, so output stays correct even under locale fallback.tsconfig.json: added"types": ["bun-types"]sobun:testimports resolve, and addedapps/*/test/**/*toincludesoapi.test.tsis typechecked.Constraints honoured
/test/in the diff)bun-typeswas already in devDependencies)Notes & assumptions
handleSortis recreated each render. The functional-updater change is kept as the idiomatic, more-robust form, but it is a defensive refactor, not a behaviour fix.tsconfig"types"override: disables auto-inclusion of other@types/*globals packages. Verified@types/reactstill resolves (reached via module resolution) andtscstays clean.Follow-ups (out of scope, not blocking)
aria-labelon icon-onlyButtonat the type level (discriminated union).formatDateis host-timezone dependent (as was the original); consider pinningtimeZone: "Australia/Sydney".formatDateandformatDateTimerender the same instant with different formats — worth unifying.Verification