fix: dep alignment, type fixes, treeshaking, and testing-library types - #938
Merged
Merged
Conversation
- Align peerDependencies across packages (ghost peers, version mismatches, optional markers for @tanstack/react-query) - Add sideEffects declarations for treeshaking (design-tokens, theme, theme-provider, drawer) - Add testing-library.d.ts and tsconfig files entry to fix jest-dom Vitest type augmentation in all packages - Fix TS2883 styled() DTS errors in form-utils, dialog (as typeof cast) - Fix source type errors: spaces WebQL untyped responses, file-selector AxiosResponse mismatch - Bump @availity/* dep versions to latest patch releases
jordan-a-young
requested review from
LauRoxx and
gregmartDOTin
as code owners
September 22, 2026 18:18
Contributor
|
🚀 Preview deployed! |
- authorize: ^6.0.2 → ^6.1.0 - message-core: ^9.3.1 → ^9.3.2 (favorites, form-utils, spaces) - hooks: ^7.0.1 → ^7.1.0 (spaces)
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
Comprehensive dependency and type hygiene pass across all packages.
Dependency Changes
peerDependencies alignment:
devDependencieswhere they were declared as peers but absent from dev (accordion, drawer, controlled-form, feedback)@availity/api-axios^12→^13, utils@mui/utils^6→^7)peerDependenciesMetawithoptional: truefor@tanstack/react-queryin packages where it's not required at runtime (authorize, autocomplete, controlled-form, page-header)@availity/mui-spacesfrom page-headerpeerDependencies— it's a direct runtime dep, not a peer@availity/*dep versions to latest patch releases@availity/elementrollup package:@mui/materialand@mui/systemindependencies(intentional for now)Treeshaking
Added
sideEffectsdeclarations to packages that were missing them:theme-provider,theme,drawer→sideEffects: falsedesign-tokens→sideEffects: ["./dist/css/**", "./dist/scss/**"](CSS files are side-effectful)Type Fixes
DTS build errors (TS2883): Fixed
styled()return types leakingMUIStyledCommonPropsfrom MUI's internal@mui/systemcopy. Appliedas typeof Xcasts in:form-utils/SearchBy.tsx—SearchByContainer as typeof FormGroupform-utils/Select.tsx—SelectDivider as typeof Divider,SelectExpandIcon as typeof ExpandIcondialog/Dialog.tsx—CloseButtonSlot as typeof CloseButtonSource type errors:
spaces/spaces-data.tsx+spaces/DisclaimerModal.tsx— typedavWebQLApi.create()" responses (previouslyunknown`)file-selector/useFileDelivery.tsx— changedresultsarray fromPromise<AxiosResponse>[]toPromise<unknown>[]to matchavFilesDeliveryApireturn type; removed unusedAxiosResponseimportTest type errors:
pagination/ResourcePagination.test.tsx— castavOrganizationsApito satisfy theResourcetypeTesting Library Types (83 errors → 0)
Added
testing-library.d.tsat the repo root containing/// <reference types="@testing-library/jest-dom/vitest" />and registered it via"files": ["testing-library.d.ts"]intsconfig.base.json.Root cause:
vitest.setup.tsimports@testing-library/jest-dom/vitestat runtime, but individual package tsconfigs onlyinclude: ["."](their own directory), so the setup file'sdeclare module 'vitest'augmentation was never in scope for type checking.What's left (stories only)
19 type errors remain in
.stories.tsxfiles — all Storybook-only, no shipped code impact. Will be addressed in a follow-up.