chore: upgrade dependencies & fix tests #102
Open
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
This PR updates multiple dependencies to their latest major/minor versions and fixes the test suite to accommodate breaking changes, particularly from
fetch-mockv12.Dependency Updates
Core Dependencies
@emotion/react@emotion/styledswagger-clientMUI
@mui/icons-material@mui/material@mui/stylesReact Final Form
final-formfinal-form-arraysreact-final-formreact-final-form-arraysDev Dependencies
fetch-mockgh-pageswebpackwebpack-dev-serverTest Fixes for fetch-mock v12
The upgrade to
fetch-mockv12 introduced several breaking changes that required test modifications:1. Custom Jest Environment
Added
tests/jest-environment.jsto expose Node.js built-in fetch globals (Request,Response,ReadableStream,Headers) that fetch-mock v12 expects to be available.2. API Changes
fetchMock.mock()→fetchMock.route()fetchMock.once()→fetchMock.route(..., { repeat: 1 })fetchMock.reset()→fetchMock.removeRoutes().clearHistory()fetchMock.called()→fetchMock.callHistory.called()fetchMock.calls()→fetchMock.callHistory.calls()3. Removed Deprecated Features
fetchMock.config.overwriteRoutes = true(no longer needed)const { Response } = fetchMock.config(Response now comes from globals)4. Route Management
fetchMock.removeRoutes().clearHistory().mockGlobal()