Skip to content

Commit

Permalink
refactor: type imports
Browse files Browse the repository at this point in the history
  • Loading branch information
pd4d10 committed Jul 13, 2024
1 parent c498bab commit d5a80ff
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 20 deletions.
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@
"@electron-forge/plugin-auto-unpack-natives": "^7.4.0",
"@electron-forge/plugin-vite": "^7.4.0",
"@electron-forge/publisher-github": "^7.4.0",
"@reduxjs/toolkit": "^2.2.3",
"@trivago/prettier-plugin-sort-imports": "^4.3.0",
"@types/ini": "^4.1.0",
"@types/lodash-es": "^4.17.12",
Expand All @@ -53,6 +52,7 @@
"electron-devtools-installer": "^3.2.0",
"electron-update-notification": "^0.1.0",
"get-port": "^7.1.0",
"immer": "^10.1.1",
"ini": "^4.1.2",
"lodash-es": "^4.17.21",
"node-machine-id": "^1.1.12",
Expand All @@ -64,7 +64,9 @@
"react-dom": "^18.3.1",
"react-redux": "^9.1.2",
"react-use": "^17.5.0",
"redux": "^5.0.1",
"redux-logger": "^3.0.6",
"redux-thunk": "^3.1.0",
"ts-pattern": "^5.1.1",
"ts-results": "^3.3.0",
"typescript": "^5.4.5",
Expand Down
2 changes: 1 addition & 1 deletion src/main/main.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { reducer, type AppInfo } from "../reducer";
import { debug, debugPath, init } from "./actions";
import { setUpdater, setReporter } from "./utils";
import { applyMiddleware, legacy_createStore } from "@reduxjs/toolkit";
import {
app,
BrowserWindow,
Expand All @@ -13,6 +12,7 @@ import {
} from "electron";
import { composeWithStateSync } from "electron-redux/main";
import path from "path";
import { applyMiddleware, legacy_createStore } from "redux";
import logger from "redux-logger";
import { thunk } from "redux-thunk";

Expand Down
3 changes: 2 additions & 1 deletion src/reducer.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import type { Reducer, ThunkDispatch } from "@reduxjs/toolkit";
import { produce } from "immer";
import type { Reducer } from "redux";
import type { ThunkDispatch } from "redux-thunk";
import { match } from "ts-pattern";

export type AppInfo = {
Expand Down
2 changes: 1 addition & 1 deletion src/renderer/store.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { reducer, type State } from "../reducer";
import { applyMiddleware, legacy_createStore } from "@reduxjs/toolkit";
import { composeWithStateSync } from "electron-redux/renderer";
import * as rr from "react-redux";
import { applyMiddleware, legacy_createStore } from "redux";

export const store = legacy_createStore(
reducer,
Expand Down
17 changes: 1 addition & 16 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -888,16 +888,6 @@
resolved "https://registry.npmmirror.com/@popperjs/core/-/core-2.11.8.tgz#6b79032e760a0899cd4204710beede972a3a185f"
integrity sha512-P1st0aksCrn9sGZhp8GMYwBnQsbvAWsZAX44oXNNvLHGqAOcoVxmjZiohstwQ7SqKnbR47akdNi+uleWD8+g6A==

"@reduxjs/toolkit@^2.2.3":
version "2.2.6"
resolved "https://registry.npmmirror.com/@reduxjs/toolkit/-/toolkit-2.2.6.tgz#4a8356dad9d0c1ab255607a555d492168e0e3bc1"
integrity sha512-kH0r495c5z1t0g796eDQAkYbEQ3a1OLYN9o8jQQVZyKyw367pfRGS+qZLkHYvFHiUUdafpoSlQ2QYObIApjPWA==
dependencies:
immer "^10.0.3"
redux "^5.0.1"
redux-thunk "^3.1.0"
reselect "^5.1.0"

"@rollup/[email protected]":
version "4.18.1"
resolved "https://registry.npmmirror.com/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.18.1.tgz#f0da481244b7d9ea15296b35f7fe39cd81157396"
Expand Down Expand Up @@ -2926,7 +2916,7 @@ immediate@~3.0.5:
resolved "https://registry.npmmirror.com/immediate/-/immediate-3.0.6.tgz#9db1dbd0faf8de6fbe0f5dd5e56bb606280de69b"
integrity sha512-XXOFtyqDjNDAQxVfYxuF7g9Il/IbWmmlQg2MYKOH8ExIT1qg6xc4zyS3HaEEATgs1btfzxq15ciUiY7gjSXRGQ==

immer@^10.0.3:
immer@^10.1.1:
version "10.1.1"
resolved "https://registry.npmmirror.com/immer/-/immer-10.1.1.tgz#206f344ea372d8ea176891545ee53ccc062db7bc"
integrity sha512-s2MPrmjovJcoMaHtx6K11Ra7oD05NT97w1IC5zpMkT6Atjr7H8LjaDd81iIxUYpMKSRRNMJE703M1Fhr/TctHw==
Expand Down Expand Up @@ -4346,11 +4336,6 @@ resedit@^2.0.0:
dependencies:
pe-library "^1.0.1"

reselect@^5.1.0:
version "5.1.1"
resolved "https://registry.npmmirror.com/reselect/-/reselect-5.1.1.tgz#c766b1eb5d558291e5e550298adb0becc24bb72e"
integrity sha512-K/BG6eIky/SBpzfHZv/dd+9JBFiS4SWV7FIujVyJRux6e45+73RaUHXLmIR1f7WOMaQ0U1km6qwklRQxpJJY0w==

resize-observer-polyfill@^1.5.1:
version "1.5.1"
resolved "https://registry.npmmirror.com/resize-observer-polyfill/-/resize-observer-polyfill-1.5.1.tgz#0e9020dd3d21024458d4ebd27e23e40269810464"
Expand Down

0 comments on commit d5a80ff

Please sign in to comment.