Skip to content

Commit 182b746

Browse files
authored
#99 update packages (#100)
* #99 update packages versions (react to 19) * #99 update version * #99 add @testing-library/dom package
1 parent 746975e commit 182b746

File tree

7 files changed

+1611
-2043
lines changed

7 files changed

+1611
-2043
lines changed

example/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@
2020
"scheduler/tracing": "../node_modules/scheduler/tracing-profiling"
2121
},
2222
"devDependencies": {
23-
"@types/react": "^18.0.25",
24-
"@types/react-dom": "^18.0.9",
23+
"@types/react": "^19.0.8",
24+
"@types/react-dom": "^19.0.3",
2525
"parcel": "^2.8.0",
2626
"typescript": "^4.9.3"
2727
}

example/yarn.lock

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -965,12 +965,10 @@
965965
resolved "https://registry.yarnpkg.com/@types/prop-types/-/prop-types-15.7.5.tgz#5f19d2b85a98e9558036f6a3cacc8819420f05cf"
966966
integrity sha512-JCB8C6SnDoQf0cNycqd/35A7MjcnK+ZTqE7judS6o7utxUCg6imJg3QK2qzHKszlTjcj2cn+NwMB2i96ubpj7w==
967967

968-
"@types/react-dom@^18.0.9":
969-
version "18.0.9"
970-
resolved "https://registry.yarnpkg.com/@types/react-dom/-/react-dom-18.0.9.tgz#ffee5e4bfc2a2f8774b15496474f8e7fe8d0b504"
971-
integrity sha512-qnVvHxASt/H7i+XG1U1xMiY5t+IHcPGUK7TDMDzom08xa7e86eCeKOiLZezwCKVxJn6NEiiy2ekgX8aQssjIKg==
972-
dependencies:
973-
"@types/react" "*"
968+
"@types/react-dom@^19.0.3":
969+
version "19.0.3"
970+
resolved "https://registry.yarnpkg.com/@types/react-dom/-/react-dom-19.0.3.tgz#0804dfd279a165d5a0ad8b53a5b9e65f338050a4"
971+
integrity sha512-0Knk+HJiMP/qOZgMyNFamlIjw9OFCsyC2ZbigmEEyXXixgre6IQpm/4V+r3qH4GC1JPvRJKInw+on2rV6YZLeA==
974972

975973
"@types/react-is@^16.7.1 || ^17.0.0":
976974
version "17.0.3"
@@ -986,7 +984,7 @@
986984
dependencies:
987985
"@types/react" "*"
988986

989-
"@types/react@*", "@types/react@^18.0.25":
987+
"@types/react@*":
990988
version "18.0.25"
991989
resolved "https://registry.yarnpkg.com/@types/react/-/react-18.0.25.tgz#8b1dcd7e56fe7315535a4af25435e0bb55c8ae44"
992990
integrity sha512-xD6c0KDT4m7n9uD4ZHi02lzskaiqcBxf4zi+tXZY98a04wvc0hi/TcCPC2FOESZi51Nd7tlUeOJY8RofL799/g==
@@ -995,6 +993,13 @@
995993
"@types/scheduler" "*"
996994
csstype "^3.0.2"
997995

996+
"@types/react@^19.0.8":
997+
version "19.0.8"
998+
resolved "https://registry.yarnpkg.com/@types/react/-/react-19.0.8.tgz#7098e6159f2a61e4f4cef2c1223c044a9bec590e"
999+
integrity sha512-9P/o1IGdfmQxrujGbIMDyYaaCykhLKc0NGCtYcECNUr9UAaDe4gwvV9bR6tvd5Br1SG0j+PBpbKr2UYY8CwqSw==
1000+
dependencies:
1001+
csstype "^3.0.2"
1002+
9981003
"@types/scheduler@*":
9991004
version "0.16.2"
10001005
resolved "https://registry.yarnpkg.com/@types/scheduler/-/scheduler-0.16.2.tgz#1a62f89525723dde24ba1b01b092bf5df8ad4d39"

package.json

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"version": "2.4.5",
2+
"version": "2.4.6",
33
"license": "MIT",
44
"name": "mui-modal-provider",
55
"author": "Quernest",
@@ -87,29 +87,29 @@
8787
}
8888
},
8989
"peerDependencies": {
90-
"@types/react": "^16.8.6 || ^17.0.0 || ^18.0.0",
91-
"react": "^16.8.0 || ^17.0.0 || ^18.0.0",
92-
"react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0"
90+
"@types/react": "^16.8.6 || ^17.0.0 || ^18.0.0 || ^19.0.0",
91+
"react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0",
92+
"react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0"
9393
},
9494
"peerDependenciesMeta": {
9595
"@types/react": {
9696
"optional": true
9797
}
9898
},
9999
"devDependencies": {
100-
"@testing-library/jest-dom": "^5.16.4",
101-
"@testing-library/react": "^13.3.0",
102-
"@testing-library/react-hooks": "^8.0.1",
103-
"@types/jest": "^28.1.6",
104-
"@types/react": "^18.0.15",
105-
"@types/react-dom": "^18.0.6",
100+
"@testing-library/dom": "^10.4.0",
101+
"@testing-library/jest-dom": "^6.6.3",
102+
"@testing-library/react": "^16.2.0",
103+
"@types/jest": "^28.1.8",
104+
"@types/react": "^16.8.6 || ^17.0.0 || ^18.0.0 || ^19.0.0",
105+
"@types/react-dom": "^19.0.3",
106106
"husky": "^4.2.5",
107107
"install-peers-cli": "^2.2.0",
108-
"react": "^18.2.0",
109-
"react-dom": "^18.2.0",
108+
"react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0",
109+
"react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0",
110110
"semantic-release": "^18.0.1",
111111
"tsdx": "^0.14.1",
112-
"tslib": "^2.3.1",
112+
"tslib": "^2.8.1",
113113
"typescript": "^4.7.4"
114114
}
115115
}

src/modal-context.test.tsx

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
11
import React from 'react';
2-
import {
3-
act,
4-
renderHook,
5-
WrapperComponent,
6-
} from '@testing-library/react-hooks';
2+
import { act, renderHook } from '@testing-library/react';
73
import { ModalProviderWrapper } from './test-utils';
84
import useModal from './use-modal';
95
import { ModalContextState } from './modal-context';
@@ -12,7 +8,7 @@ describe('ModalContext', () => {
128
const rootId = '123';
139
const modalId = '321';
1410

15-
const testHook = (wrapper?: WrapperComponent<any>) => {
11+
const testHook = (wrapper?: any) => {
1612
const { result } = renderHook(() => useModal(), { wrapper });
1713
const ctx = result.current as ModalContextState;
1814

@@ -27,10 +23,7 @@ describe('ModalContext', () => {
2723
return { ctx, performModalActions };
2824
};
2925

30-
const runTests = (
31-
context: ModalContextState,
32-
wrapper?: WrapperComponent<any>
33-
) => {
26+
const runTests = (context: ModalContextState, wrapper?: any) => {
3427
const { performModalActions } = testHook(wrapper);
3528

3629
act(() => {

src/modal-provider.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { act, renderHook } from '@testing-library/react-hooks';
1+
import { act, renderHook } from '@testing-library/react';
22
import * as utils from './utils';
33
import {
44
LegacyModalProviderWrapper as legacyWrapper,

src/use-modal.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { act, renderHook } from '@testing-library/react-hooks';
1+
import { act, renderHook } from '@testing-library/react';
22

33
import { ModalProviderWrapper as wrapper } from './test-utils';
44
import Modal from './test-utils/modal';

0 commit comments

Comments
 (0)