Skip to content

Commit

Permalink
Update redux to latest version (#851)
Browse files Browse the repository at this point in the history
* - Update redux to latest version.

useDispatch used in EditableTextCellWithCrudAndModified requires correct action types, but best practice is to derive types from store.

Since we don't have a store, we need a different solution here.
Will just typecast to "never" for now.

* - Add type to Dispatch instead of casting actions as never.
- Remove unused @types/react-redux.
  • Loading branch information
mattias800 authored Oct 11, 2024
1 parent f74ddb1 commit 009ff91
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 54 deletions.
4 changes: 2 additions & 2 deletions packages/filter/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
"prop-types": ">=15.5.4",
"react": ">=18.3.1",
"react-dom": ">=18.3.1",
"redux": ">=4.0.5"
"redux": ">=5.0.1"
},
"devDependencies": {
"@emotion/react": "^11.11.4",
Expand All @@ -65,7 +65,7 @@
"prop-types": "^15.5.4",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"redux": "^4.0.5"
"redux": "^5.0.1"
},
"files": [
"dist"
Expand Down
10 changes: 4 additions & 6 deletions packages/grid/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,12 @@
"@types/lodash-es": ">=4.17.12",
"@types/react": ">=18.3.3",
"@types/react-dom": ">=18.3.0",
"@types/react-redux": ">=7.1.8",
"csstype": ">=3.0.8",
"prop-types": ">=15.5.4",
"react": ">=18.3.1",
"react-dom": ">=18.3.1",
"react-redux": ">=7.2.0",
"redux": ">=4.0.5"
"react-redux": ">=9.1.2",
"redux": ">=5.0.1"
},
"devDependencies": {
"@emotion/react": "^11.11.4",
Expand All @@ -67,13 +66,12 @@
"@types/lodash-es": "^4.17.12",
"@types/react": "^18.3.3",
"@types/react-dom": "^18.3.0",
"@types/react-redux": "^7.1.8",
"csstype": "^3.0.8",
"prop-types": "^15.5.4",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react-redux": "^7.2.0",
"redux": "^4.0.5"
"react-redux": "^9.1.2",
"redux": "^5.0.1"
},
"files": [
"dist"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import {
CrudStatusIndicator,
hasIndicatorContent,
} from "../CrudStatusIndicator";
import { Action, Dispatch } from "redux";

interface Props<TStoreState> {
value?: string;
Expand Down Expand Up @@ -58,7 +59,7 @@ export const EditableTextCellWithCrudAndModified =
}: Props<TStoreState>) {
const enableGridCell = true;

const dispatch = useDispatch();
const dispatch = useDispatch() as Dispatch<Action>;

const modifiedFieldsState = useSelector(
modifiedFieldsRedux.selectors.getState,
Expand Down
8 changes: 4 additions & 4 deletions packages/redux/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,17 +36,17 @@
"prop-types": ">=15.5.4",
"react": ">=18.3.1",
"react-dom": ">=18.3.1",
"react-redux": ">=7.2.0",
"redux": ">=4.0.5"
"react-redux": ">=9.1.2",
"redux": ">=5.0.1"
},
"devDependencies": {
"@types/react": "^18.3.3",
"@types/react-dom": "^18.3.0",
"prop-types": "^15.5.4",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react-redux": "^7.2.0",
"redux": "^4.0.5"
"react-redux": "^9.1.2",
"redux": "^5.0.1"
},
"files": [
"dist"
Expand Down
63 changes: 22 additions & 41 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@
dependencies:
"@babel/helper-plugin-utils" "^7.25.7"

"@babel/runtime@^7.12.0", "@babel/runtime@^7.12.1", "@babel/runtime@^7.12.5", "@babel/runtime@^7.17.8", "@babel/runtime@^7.18.3", "@babel/runtime@^7.5.4", "@babel/runtime@^7.5.5", "@babel/runtime@^7.8.7":
"@babel/runtime@^7.12.0", "@babel/runtime@^7.12.5", "@babel/runtime@^7.17.8", "@babel/runtime@^7.18.3", "@babel/runtime@^7.5.4", "@babel/runtime@^7.5.5", "@babel/runtime@^7.8.7":
version "7.25.0"
resolved "https://registry.npmjs.org/@babel/runtime/-/runtime-7.25.0.tgz"
integrity sha512-7dRy4DwXwtzBrPbZflqxnvfxLF8kdZXPkhymtDeFoFqE6ldzjQFgYTtYIFARcLEYDrqfBfYcZt1WqFxRoyC9Rw==
Expand Down Expand Up @@ -2608,14 +2608,6 @@
dependencies:
"@types/unist" "*"

"@types/hoist-non-react-statics@^3.3.0":
version "3.3.1"
resolved "https://registry.npmjs.org/@types/hoist-non-react-statics/-/hoist-non-react-statics-3.3.1.tgz"
integrity sha512-iMIqiko6ooLrTh1joXodJK5X9xeEALT1kM5G3ZLhD3hszxBdIEd5C75U834D9mLcINgD4OyZf5uQXjkuYydWvA==
dependencies:
"@types/react" "*"
hoist-non-react-statics "^3.3.0"

"@types/http-errors@*":
version "2.0.4"
resolved "https://registry.npmjs.org/@types/http-errors/-/http-errors-2.0.4.tgz"
Expand Down Expand Up @@ -2723,16 +2715,6 @@
dependencies:
"@types/react" "*"

"@types/react-redux@^7.1.8":
version "7.1.11"
resolved "https://registry.npmjs.org/@types/react-redux/-/react-redux-7.1.11.tgz"
integrity sha512-OjaFlmqy0CRbYKBoaWF84dub3impqnLJUrz4u8PRjDzaa4n1A2cVmjMV81shwXyAD5x767efhA8STFGJz/r1Zg==
dependencies:
"@types/hoist-non-react-statics" "^3.3.0"
"@types/react" "*"
hoist-non-react-statics "^3.3.0"
redux "^4.0.0"

"@types/react-test-renderer@*":
version "17.0.0"
resolved "https://registry.npmjs.org/@types/react-test-renderer/-/react-test-renderer-17.0.0.tgz"
Expand Down Expand Up @@ -2797,6 +2779,11 @@
resolved "https://registry.npmjs.org/@types/unist/-/unist-3.0.3.tgz"
integrity sha512-ko/gIFJRv177XgZsZcBwnqJN5x/Gien8qNOn0D5bQU/zAzVf9Zt3BlcUiLqhV9y4ARk0GbT3tnUiPNgnTXzc/Q==

"@types/use-sync-external-store@^0.0.3":
version "0.0.3"
resolved "https://registry.yarnpkg.com/@types/use-sync-external-store/-/use-sync-external-store-0.0.3.tgz#b6725d5f4af24ace33b36fafd295136e75509f43"
integrity sha512-EwmlvuaxPNej9+T4v5AuBPJa2x2UOJVdjCtDHgcDqitUeOtjnJKJ+apYjVcAoBEMjKW1VVFGZLUb5+qqa09XFA==

"@types/uuid@^9.0.1":
version "9.0.8"
resolved "https://registry.npmjs.org/@types/uuid/-/uuid-9.0.8.tgz"
Expand Down Expand Up @@ -6006,7 +5993,7 @@ hast-util-to-string@^3.0.0:
dependencies:
"@types/hast" "^3.0.0"

hoist-non-react-statics@^3.3.0, hoist-non-react-statics@^3.3.1, hoist-non-react-statics@^3.3.2:
hoist-non-react-statics@^3.3.1:
version "3.3.2"
resolved "https://registry.npmjs.org/hoist-non-react-statics/-/hoist-non-react-statics-3.3.2.tgz"
integrity sha512-/gGivxi8JPKWNm/W0jSmzcMPpfpPLc3dY/6GxhX2hQ9iGj3aDfklV4ET7NjKpSinLpJ5vafa9iiGIEZg10SfBw==
Expand Down Expand Up @@ -9407,16 +9394,13 @@ react-modal@^3.14.3:
react-lifecycles-compat "^3.0.0"
warning "^4.0.3"

react-redux@^7.2.0:
version "7.2.2"
resolved "https://registry.npmjs.org/react-redux/-/react-redux-7.2.2.tgz"
integrity sha512-8+CQ1EvIVFkYL/vu6Olo7JFLWop1qRUeb46sGtIMDCSpgwPQq8fPLpirIB0iTqFe9XYEFPHssdX8/UwN6pAkEA==
react-redux@^9.1.2:
version "9.1.2"
resolved "https://registry.yarnpkg.com/react-redux/-/react-redux-9.1.2.tgz#deba38c64c3403e9abd0c3fbeab69ffd9d8a7e4b"
integrity sha512-0OA4dhM1W48l3uzmv6B7TXPCGmokUU4p1M44DGN2/D9a1FjVPukVjER1PcPX97jIg6aUeLq1XJo1IpfbgULn0w==
dependencies:
"@babel/runtime" "^7.12.1"
hoist-non-react-statics "^3.3.2"
loose-envify "^1.4.0"
prop-types "^15.7.2"
react-is "^16.13.1"
"@types/use-sync-external-store" "^0.0.3"
use-sync-external-store "^1.0.0"

react-refresh@^0.14.2:
version "0.14.2"
Expand Down Expand Up @@ -9579,13 +9563,10 @@ reduce-flatten@^2.0.0:
resolved "https://registry.npmjs.org/reduce-flatten/-/reduce-flatten-2.0.0.tgz"
integrity sha512-EJ4UNY/U1t2P/2k6oqotuX2Cc3T6nxJwsM0N0asT7dhrtH1ltUxDn4NalSYmPE2rCkVpcf/X6R0wDwcFpzhd4w==

redux@^4.0.0, redux@^4.0.5:
version "4.0.5"
resolved "https://registry.npmjs.org/redux/-/redux-4.0.5.tgz"
integrity sha512-VSz1uMAH24DM6MF72vcojpYPtrTUu3ByVWfPL1nPfVRb5mZVTve5GnNCUV53QM/BZ66xfWrm0CTWoM+Xlz8V1w==
dependencies:
loose-envify "^1.4.0"
symbol-observable "^1.2.0"
[email protected], redux@^5.0.1:
version "5.0.1"
resolved "https://registry.yarnpkg.com/redux/-/redux-5.0.1.tgz#97fa26881ce5746500125585d5642c77b6e9447b"
integrity sha512-M9/ELqF6fy8FwmkpnF0S3YKOqMyoWJ4+CS5Efg2ct3oY9daQvd/Pc71FpGZsVsbl3Cpb+IIcjBDUnnyBdQbq4w==

reflect.getprototypeof@^1.0.4:
version "1.0.6"
Expand Down Expand Up @@ -10514,11 +10495,6 @@ svgson@^4.1.0:
omit-deep "0.3.0"
xml-reader "2.4.3"

symbol-observable@^1.2.0:
version "1.2.0"
resolved "https://registry.npmjs.org/symbol-observable/-/symbol-observable-1.2.0.tgz"
integrity sha512-e900nM8RRtGhlV36KGEU9k65K3mPb1WV70OdjfxlG2EAuM1noi/E/BaW/uMhL7bPEssK8QV57vN3esixjUvcXQ==

symbol-tree@^3.2.4:
version "3.2.4"
resolved "https://registry.npmjs.org/symbol-tree/-/symbol-tree-3.2.4.tgz"
Expand Down Expand Up @@ -11079,6 +11055,11 @@ url-parse@^1.5.3:
querystringify "^2.1.1"
requires-port "^1.0.0"

use-sync-external-store@^1.0.0:
version "1.2.2"
resolved "https://registry.yarnpkg.com/use-sync-external-store/-/use-sync-external-store-1.2.2.tgz#c3b6390f3a30eba13200d2302dcdf1e7b57b2ef9"
integrity sha512-PElTlVMwpblvbNqQ82d2n6RjStvdSoNe9FG28kNfz3WiXilJm4DdNkEzRhCZuIDwY8U08WVihhGR5iRqAwfDiw==

user-home@^2.0.0:
version "2.0.0"
resolved "https://registry.npmjs.org/user-home/-/user-home-2.0.0.tgz"
Expand Down

0 comments on commit 009ff91

Please sign in to comment.