From 80e45328addf319260871103d2219e4da6ad7ebf Mon Sep 17 00:00:00 2001 From: Dane Tsao Date: Tue, 3 Oct 2023 18:48:35 -0500 Subject: [PATCH] Revert "FOLIO-3876: Breaking changes react v18" --- CHANGELOG.md | 5 ----- package.json | 19 ++++++++++--------- .../useAutomaticSchedulerMutation.test.tsx | 5 +++-- .../useManualSchedulerMutation.test.tsx | 3 ++- 4 files changed, 15 insertions(+), 17 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6f63d7a6..4fcaeee1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,11 +3,6 @@ ## (IN PROGRESS) * Support `feesfines` interface version `18.0`. Refs UIPBEX-45. -## [2.4.0](https://github.com/folio-org/ui-plugin-bursar-export/tree/v3.0.0) (2023-10-02) -[Full Changelog](https://github.com/folio-org/ui-plugin-bursar-export/compare/v2.4.0...v3.0.0) -* Upgrade react v18.0.0. Refs FOLIO-3876. -* Upgrade dependent modules. - ## [2.4.0](https://github.com/folio-org/ui-plugin-bursar-export/tree/v2.4.0) (2023-02-20) [Full Changelog](https://github.com/folio-org/ui-plugin-bursar-export/compare/v2.3.0...v2.4.0) * Bump stripes to 8.0.0 for Orchid/2023-R1. Refs UIPBEX-41. diff --git a/package.json b/package.json index 0d78b93e..3f01894e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@folio/plugin-bursar-export", - "version": "3.0.0", + "version": "2.4.0", "description": "Bursar export", "main": "src/index.js", "repository": "", @@ -77,25 +77,26 @@ "@babel/plugin-transform-runtime": "^7.0.0", "@babel/preset-env": "^7.0.0", "@babel/preset-react": "^7.7.4", - "@folio/eslint-config-stripes": "^7.0.0", - "@folio/stripes": "^9.0.0", - "@folio/stripes-cli": "^3.0.0", + "@folio/eslint-config-stripes": "^5.0.0", + "@folio/stripes": "https://github.com/ualibweb/stripes#stripes-859", + "@folio/stripes-cli": "^2.0.0", "@formatjs/cli": "^4.8.2", "@testing-library/jest-dom": "^5.17.0", "@testing-library/react": "^14.0.0", + "@testing-library/react-hooks": "^8.0.1", "@testing-library/user-event": "^14.4.3", "@types/jest": "^29.5.1", "@types/react": "^18.2.0", - "babel-jest": "^29.6.1", + "babel-jest": "^26.3.0", "core-js": "^3.6.1", "eslint": "^6.2.1", "eslint-plugin-filenames": "^1.3.2", "eslint-plugin-jest": "^23.0.4", "identity-obj-proxy": "^3.0.0", - "jest": "^29.6.1", + "jest": "^28.1.3", "jest-css-modules": "^2.1.0", - "jest-environment-jsdom": "^29.6.1", - "jest-junit": "^16.0.0", + "jest-environment-jsdom": "^28.1.3", + "jest-junit": "^14.0.0", "react": "^18.2.0", "react-dom": "^18.2.0", "react-intl": "^6.4.4", @@ -117,7 +118,7 @@ "react-router-prop-types": "^1.0.4" }, "peerDependencies": { - "@folio/stripes": "^9.0.0", + "@folio/stripes": "^8.0.0", "@types/react": "^18.2.0", "final-form": "^4.18.2", "final-form-arrays": "^3.0.1", diff --git a/src/api/mutators/useAutomaticSchedulerMutation.test.tsx b/src/api/mutators/useAutomaticSchedulerMutation.test.tsx index 13647f3d..7144dc6a 100644 --- a/src/api/mutators/useAutomaticSchedulerMutation.test.tsx +++ b/src/api/mutators/useAutomaticSchedulerMutation.test.tsx @@ -1,5 +1,6 @@ import { CalloutContext } from '@folio/stripes/core'; -import { waitFor, act, renderHook } from '@testing-library/react'; +import { waitFor } from '@testing-library/react'; +import { act, renderHook } from '@testing-library/react-hooks'; import React, { ReactNode } from 'react'; import { QueryClient, QueryClientProvider } from 'react-query'; import useAutomaticSchedulerMutation from './useAutomaticSchedulerMutation'; @@ -166,7 +167,7 @@ describe('Automatic scheduling mutation', () => { } as any); }); - waitFor(async () => + await waitFor(() => expect(putMock).toHaveBeenCalledWith('data-export-spring/configs/foo', { json: { id: 'foo', diff --git a/src/api/mutators/useManualSchedulerMutation.test.tsx b/src/api/mutators/useManualSchedulerMutation.test.tsx index 38f5842b..15ef9040 100644 --- a/src/api/mutators/useManualSchedulerMutation.test.tsx +++ b/src/api/mutators/useManualSchedulerMutation.test.tsx @@ -1,5 +1,6 @@ import { CalloutContext } from '@folio/stripes/core'; -import { waitFor, act, renderHook } from '@testing-library/react'; +import { waitFor } from '@testing-library/react'; +import { act, renderHook } from '@testing-library/react-hooks'; import React, { ReactNode } from 'react'; import { QueryClient, QueryClientProvider } from 'react-query'; import useManualSchedulerMutation from './useManualSchedulerMutation';