Skip to content

Commit f28778c

Browse files
committed
1 parent 2283891 commit f28778c

26 files changed

Lines changed: 1716 additions & 1984 deletions

.yarnrc.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@ compressionLevel: mixed
22

33
enableGlobalCache: false
44

5+
enableTransparentWorkspaces: false
6+
7+
nmSelfReferences: false
8+
59
nodeLinker: node-modules
610

711
yarnPath: .yarn/releases/yarn-4.4.1.cjs

package.json

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@
4545
"lint:fix": "eslint src test --fix",
4646
"prepack": "yarn build",
4747
"pretest": "yarn lint",
48-
"test": "vitest --run --typecheck",
49-
"test:watch": "vitest --watch",
48+
"test": "vitest --run --config=${INIT_CWD}/vitest.config.mts",
49+
"test:watch": "vitest --watch --config=${INIT_CWD}/vitest.config.mts",
5050
"type-tests": "tsc --noEmit -p tsconfig.test.json",
5151
"coverage": "codecov"
5252
},
@@ -64,16 +64,16 @@
6464
}
6565
},
6666
"dependencies": {
67-
"@types/use-sync-external-store": "^0.0.6",
68-
"use-sync-external-store": "^1.4.0"
67+
"@types/use-sync-external-store": "^1.5.0",
68+
"use-sync-external-store": "^1.6.0"
6969
},
7070
"devDependencies": {
7171
"@arethetypeswrong/cli": "^0.18.3",
7272
"@microsoft/api-extractor": "^7.47.0",
73-
"@reduxjs/toolkit": "^2.2.5",
74-
"@testing-library/dom": "^10.4.0",
75-
"@testing-library/jest-dom": "^6.6.3",
76-
"@testing-library/react": "^16.1.0",
73+
"@reduxjs/toolkit": "^2.12.0",
74+
"@testing-library/dom": "^10.4.1",
75+
"@testing-library/jest-dom": "^6.9.1",
76+
"@testing-library/react": "^16.3.2",
7777
"@types/node": "^25.9.3",
7878
"@types/prop-types": "^15.7.12",
7979
"@types/react": "^19.0.1",
@@ -86,7 +86,7 @@
8686
"eslint-plugin-import": "^2.29.1",
8787
"eslint-plugin-prettier": "^5.1.3",
8888
"eslint-plugin-react": "^7.34.2",
89-
"jsdom": "^25.0.1",
89+
"jsdom": "^29.1.1",
9090
"pkg-pr-new": "^0.0.75",
9191
"prettier": "^3.3.3",
9292
"react": "^19.2.0",

src/hooks/useSelector.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
//import * as React from 'react'
2-
import { React } from '../utils/react'
3-
import { useSyncExternalStoreWithSelector } from 'use-sync-external-store/with-selector.js'
2+
import { useSyncExternalStoreWithSelector } from 'use-sync-external-store/with-selector'
43
import type { ReactReduxContextValue } from '../components/Context'
54
import { ReactReduxContext } from '../components/Context'
65
import type { EqualityFn, NoInfer } from '../types'
6+
import { React } from '../utils/react'
77
import {
88
createReduxContextHook,
99
useReduxContext as useDefaultReduxContext,

src/utils/react-is.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,8 @@ function typeOf(object: any): symbol | undefined {
8484
return $$typeof
8585
}
8686
}
87+
88+
return undefined
8789
}
8890

8991
export function isContextConsumer(object: any): object is ReactElement {

test/components/Provider.spec.tsx

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ const createExampleTextReducer =
1414
state
1515

1616
describe('React', () => {
17-
describe('Provider', () => {
17+
describe(Provider, () => {
1818
const createChild = (storeKey = 'store') => {
1919
class Child extends Component {
20-
render() {
20+
override render() {
2121
return (
2222
<ReactReduxContext.Consumer>
2323
{(props) => {
@@ -105,7 +105,7 @@ describe('React', () => {
105105
externalSetState = this.setState.bind(this)
106106
}
107107

108-
render() {
108+
override render() {
109109
return (
110110
<Provider store={this.state.store}>
111111
<Child />
@@ -169,7 +169,7 @@ describe('React', () => {
169169
count: state,
170170
}))
171171
class Inner extends Component<TStateProps> {
172-
render(): JSX.Element {
172+
override render(): JSX.Element {
173173
return <div>{this.props.count}</div>
174174
}
175175
}
@@ -180,7 +180,7 @@ describe('React', () => {
180180

181181
const outerStore = createStore(reducer)
182182
class Outer extends Component {
183-
render() {
183+
override render() {
184184
return (
185185
<Provider store={innerStore}>
186186
<WrapperInner />
@@ -230,7 +230,7 @@ describe('React', () => {
230230
parentState: string
231231
}
232232
class ChildContainer extends Component<ChildContainerProps> {
233-
render() {
233+
override render() {
234234
return <div />
235235
}
236236
}
@@ -255,7 +255,7 @@ describe('React', () => {
255255
store.dispatch({ type: 'APPEND', body: 'b' })
256256
}
257257

258-
render() {
258+
override render() {
259259
return (
260260
<div>
261261
<button onClick={this.emitChange.bind(this)}>change</button>
@@ -366,7 +366,7 @@ describe('React', () => {
366366
const storeB = createStore(reducerB)
367367

368368
class ComponentA extends Component<PropsType> {
369-
render() {
369+
override render() {
370370
return <div data-testid="value">{this.props.value}</div>
371371
}
372372
}
@@ -378,7 +378,7 @@ describe('React', () => {
378378
)(ComponentA)
379379

380380
class ComponentB extends Component<PropsType> {
381-
render() {
381+
override render() {
382382
return <div data-testid="value">{this.props.value}</div>
383383
}
384384
}

0 commit comments

Comments
 (0)