Skip to content

Commit 7267078

Browse files
committed
Upgrade some deps in preparation of including lint in CI
1 parent a128c5e commit 7267078

File tree

6 files changed

+2653
-2402
lines changed

6 files changed

+2653
-2402
lines changed

package.json

Lines changed: 33 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -63,47 +63,47 @@
6363
}
6464
},
6565
"dependencies": {
66-
"@types/use-sync-external-store": "^0.0.3",
67-
"use-sync-external-store": "^1.0.0"
66+
"@types/use-sync-external-store": "^0.0.6",
67+
"use-sync-external-store": "^1.2.2"
6868
},
6969
"devDependencies": {
70-
"@babel/cli": "^7.12.1",
71-
"@babel/core": "^7.12.3",
72-
"@babel/plugin-proposal-decorators": "^7.12.1",
73-
"@babel/plugin-proposal-object-rest-spread": "^7.12.1",
74-
"@babel/plugin-transform-flow-strip-types": "^7.22.5",
75-
"@babel/plugin-transform-react-display-name": "^7.12.1",
76-
"@babel/plugin-transform-react-jsx": "^7.12.1",
77-
"@babel/plugin-transform-runtime": "^7.12.1",
78-
"@babel/preset-env": "^7.12.1",
79-
"@babel/preset-typescript": "^7.14.5",
80-
"@microsoft/api-extractor": "^7.18.1",
81-
"@reduxjs/toolkit": "^2.0.0-beta.4",
82-
"@testing-library/jest-dom": "^6.3.0",
83-
"@testing-library/react": "^14.1.2",
84-
"@testing-library/react-hooks": "^8.0.1",
85-
"@types/node": "^20.11.6",
70+
"@babel/cli": "^7.24.7",
71+
"@babel/core": "^7.24.7",
72+
"@babel/plugin-proposal-decorators": "^7.24.7",
73+
"@babel/plugin-proposal-object-rest-spread": "^7.20.7",
74+
"@babel/plugin-transform-flow-strip-types": "^7.24.7",
75+
"@babel/plugin-transform-react-display-name": "^7.24.7",
76+
"@babel/plugin-transform-react-jsx": "^7.24.7",
77+
"@babel/plugin-transform-runtime": "^7.24.7",
78+
"@babel/preset-env": "^7.24.7",
79+
"@babel/preset-typescript": "^7.24.7",
80+
"@microsoft/api-extractor": "^7.47.0",
81+
"@reduxjs/toolkit": "^2.2.5",
82+
"@testing-library/dom": "^10.1.0",
83+
"@testing-library/jest-dom": "^6.4.5",
84+
"@testing-library/react": "^16.0.0",
85+
"@types/node": "^20.14.2",
8686
"@types/prop-types": "^15.7.12",
87-
"@types/react": "18.2.25",
87+
"@types/react": "18.3.3",
88+
"@types/react-dom": "^18.3.0",
8889
"@typescript-eslint/eslint-plugin": "^6.17.0",
8990
"@typescript-eslint/parser": "^6.17.0",
9091
"babel-eslint": "^10.1.0",
91-
"codecov": "^3.8.0",
92-
"cross-env": "^7.0.2",
93-
"eslint": "^8.56.0",
92+
"codecov": "^3.8.3",
93+
"cross-env": "^7.0.3",
94+
"eslint": "^8.57.0",
9495
"eslint-config-prettier": "^9.1.0",
9596
"eslint-plugin-import": "^2.29.1",
96-
"eslint-plugin-prettier": "^5.1.2",
97-
"eslint-plugin-react": "^7.33.2",
98-
"glob": "^7.1.6",
99-
"jsdom": "^24.0.0",
100-
"prettier": "^3.1.1",
101-
"react": "18.2.0",
102-
"react-dom": "18.2.0",
103-
"react-test-renderer": "18.0.0",
104-
"redux": "^5.0.0",
105-
"rimraf": "^3.0.2",
106-
"tsup": "^7.0.0",
97+
"eslint-plugin-prettier": "^5.1.3",
98+
"eslint-plugin-react": "^7.34.2",
99+
"jsdom": "^24.1.0",
100+
"prettier": "^3.3.1",
101+
"react": "18.3.1",
102+
"react-dom": "18.3.1",
103+
"react-test-renderer": "18.3.1",
104+
"redux": "^5.0.1",
105+
"rimraf": "^5.0.7",
106+
"tsup": "^8.1.0",
107107
"typescript": "^5.4.5",
108108
"vitest": "^1.6.0"
109109
},

test/hooks/useDispatch.spec.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { renderHook } from '@testing-library/react-hooks'
1+
import { renderHook } from '@testing-library/react'
22
import React from 'react'
33
import type { ProviderProps, ReactReduxContextValue } from 'react-redux'
44
import {
@@ -32,7 +32,7 @@ describe('React', () => {
3232
const useCustomDispatch = createDispatchHook(nestedContext)
3333
const { result } = renderHook(() => useDispatch(), {
3434
// eslint-disable-next-line react/prop-types
35-
wrapper: ({ children, ...props }: ProviderProps) => (
35+
wrapper: ({ children, ...props }) => (
3636
<ProviderMock {...props} store={store}>
3737
<ProviderMock context={nestedContext} store={store2}>
3838
{children}
@@ -45,7 +45,7 @@ describe('React', () => {
4545

4646
const { result: result2 } = renderHook(() => useCustomDispatch(), {
4747
// eslint-disable-next-line react/prop-types
48-
wrapper: ({ children, ...props }: ProviderProps) => (
48+
wrapper: ({ children, ...props }) => (
4949
<ProviderMock {...props} store={store}>
5050
<ProviderMock context={nestedContext} store={store2}>
5151
{children}

test/hooks/useReduxContext.spec.tsx

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import {
22
createReduxContextHook,
33
useReduxContext,
44
} from '@internal/hooks/useReduxContext'
5-
import { renderHook } from '@testing-library/react-hooks'
5+
import { renderHook } from '@testing-library/react'
66
import { createContext } from 'react'
77
import type { ReactReduxContextValue } from 'react-redux'
88

@@ -12,12 +12,9 @@ describe('React', () => {
1212
it('throws if component is not wrapped in provider', () => {
1313
const spy = vi.spyOn(console, 'error').mockImplementation(() => {})
1414

15-
const { result } = renderHook(() => useReduxContext())
16-
17-
expect(result.error?.message).toMatch(
15+
expect(() => renderHook(() => useReduxContext())).toThrow(
1816
/could not find react-redux context value/,
1917
)
20-
2118
spy.mockRestore()
2219
})
2320
})
@@ -27,9 +24,7 @@ describe('React', () => {
2724
const useCustomReduxContext = createReduxContextHook(customContext)
2825
const spy = vi.spyOn(console, 'error').mockImplementation(() => {})
2926

30-
const { result } = renderHook(() => useCustomReduxContext())
31-
32-
expect(result.error?.message).toMatch(
27+
expect(() => renderHook(() => useCustomReduxContext())).toThrow(
3328
/could not find react-redux context value/,
3429
)
3530

test/typetests/connect-options-and-issues.test-d.tsx

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -786,11 +786,8 @@ describe('type tests', () => {
786786
// Should be able to pass modern refs to a ForwardRefExoticComponent
787787
const modernRef: React.Ref<string> | undefined = undefined
788788
;<ConnectedForwardedFunctionalComponent ref={modernRef} />
789-
// Should not be able to use legacy string refs
790-
;<ConnectedForwardedFunctionalComponent
791-
// @ts-expect-error
792-
ref={''}
793-
/>
789+
// Should be able to use legacy string refs
790+
;<ConnectedForwardedFunctionalComponent ref={''} />
794791
// ref type should agree with type of the forwarded ref
795792
;<ConnectedForwardedFunctionalComponent
796793
// @ts-expect-error

test/typetests/hooks.test-d.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ describe('type tests', () => {
224224

225225
const state = untypedStore.getState()
226226

227-
expectTypeOf(state).toBeObject()
227+
expectTypeOf(state).toBeUnknown()
228228

229229
const typedStore = useStore<TypedState, TypedAction>()
230230

0 commit comments

Comments
 (0)