mirror of
https://github.com/captbaritone/webamp.git
synced 2026-07-17 16:46:04 +00:00
Upgrade redux-thunk to v3 and tinyqueue to v3
Both now ship ESM. Updated imports to use named exports (redux-thunk v3 dropped the default export). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
e534b8e10c
commit
e593cc12da
5 changed files with 26 additions and 13 deletions
|
|
@ -6,7 +6,7 @@ import * as Actions from "./actionCreators";
|
|||
import { kebabCase } from "lodash";
|
||||
|
||||
import { legacy_createStore as createStore, applyMiddleware } from "redux";
|
||||
import thunk from "redux-thunk";
|
||||
import { withExtraArgument } from "redux-thunk";
|
||||
import { SerializedStateV1 } from "./serializedStates/v1Types";
|
||||
import { AppState, Action } from "./types";
|
||||
|
||||
|
|
@ -81,7 +81,7 @@ function testSerialization<T>({
|
|||
|
||||
function getStore() {
|
||||
const extras = {};
|
||||
const enhancer = applyMiddleware(thunk.withExtraArgument(extras));
|
||||
const enhancer = applyMiddleware(withExtraArgument(extras));
|
||||
return createStore(reducer, undefined, enhancer);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ import {
|
|||
applyMiddleware,
|
||||
Middleware as ReduxMiddleware,
|
||||
} from "redux";
|
||||
import thunk from "redux-thunk";
|
||||
import { withExtraArgument } from "redux-thunk";
|
||||
import { composeWithDevTools } from "@redux-devtools/extension";
|
||||
import reducer from "./reducers";
|
||||
import mediaMiddleware from "./mediaMiddleware";
|
||||
|
|
@ -44,7 +44,7 @@ export default function createWebampStore(
|
|||
};
|
||||
|
||||
const middlewares: Middleware[] = [
|
||||
thunk.withExtraArgument(extras),
|
||||
withExtraArgument(extras),
|
||||
mediaMiddleware(media),
|
||||
emitterMiddleware,
|
||||
...customMiddlewares,
|
||||
|
|
|
|||
|
|
@ -123,9 +123,9 @@
|
|||
"react-redux": "^8.0.5",
|
||||
"redux": "^5.0.0-alpha.0",
|
||||
"redux-sentry-middleware": "^0.1.3",
|
||||
"redux-thunk": "^2.4.0",
|
||||
"redux-thunk": "^3.1.0",
|
||||
"reselect": "^3.0.1",
|
||||
"strtok3": "^10.3.1",
|
||||
"tinyqueue": "^1.2.3"
|
||||
"tinyqueue": "^3.0.0"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
import typescript from "@rollup/plugin-typescript";
|
||||
import json from "@rollup/plugin-json";
|
||||
import commonjs from "@rollup/plugin-commonjs";
|
||||
import { nodeResolve } from "@rollup/plugin-node-resolve";
|
||||
import postcss from "rollup-plugin-postcss";
|
||||
import commonjs from "@rollup/plugin-commonjs";
|
||||
import terser from "@rollup/plugin-terser";
|
||||
import { visualizer } from "rollup-plugin-visualizer";
|
||||
import replace from "@rollup/plugin-replace";
|
||||
|
|
@ -51,8 +51,7 @@ export function getPlugins({ minify, outputFile, vite }) {
|
|||
inject: false,
|
||||
plugins: [atImport, postcssOptimizeDataUriPngs],
|
||||
}),
|
||||
// Without this we get: Error: 'default' is not exported by node_modules/react/index.js
|
||||
// because react-redux import react as if it were an es6 module, but it is not.
|
||||
// Required because React still ships as CJS
|
||||
commonjs(),
|
||||
minify
|
||||
? terser({
|
||||
|
|
|
|||
22
pnpm-lock.yaml
generated
22
pnpm-lock.yaml
generated
|
|
@ -369,8 +369,8 @@ importers:
|
|||
specifier: ^0.1.3
|
||||
version: 0.1.8
|
||||
redux-thunk:
|
||||
specifier: ^2.4.0
|
||||
version: 2.4.2(redux@5.0.1)
|
||||
specifier: ^3.1.0
|
||||
version: 3.1.0(redux@5.0.1)
|
||||
reselect:
|
||||
specifier: ^3.0.1
|
||||
version: 3.0.1
|
||||
|
|
@ -378,8 +378,8 @@ importers:
|
|||
specifier: ^10.3.1
|
||||
version: 10.3.1
|
||||
tinyqueue:
|
||||
specifier: ^1.2.3
|
||||
version: 1.2.3
|
||||
specifier: ^3.0.0
|
||||
version: 3.0.0
|
||||
devDependencies:
|
||||
'@rollup/plugin-commonjs':
|
||||
specifier: ^25.0.8
|
||||
|
|
@ -11214,6 +11214,11 @@ packages:
|
|||
peerDependencies:
|
||||
redux: ^4
|
||||
|
||||
redux-thunk@3.1.0:
|
||||
resolution: {integrity: sha512-NW2r5T6ksUKXCabzhL9z+h206HQw/NJkcLm1GPImRQ8IzfXwRGqjVhKJGauHirT0DAuyy6hjdnMZaRoAcy0Klw==}
|
||||
peerDependencies:
|
||||
redux: ^5.0.0
|
||||
|
||||
redux@4.2.1:
|
||||
resolution: {integrity: sha512-LAUYz4lc+Do8/g7aeRa8JkyDErK6ekstQaqWQrNRW//MY1TvCEpMtpTWvlQ+FPbWCx+Xixu/6SHt5N0HR+SB4w==}
|
||||
|
||||
|
|
@ -12386,6 +12391,9 @@ packages:
|
|||
tinyqueue@1.2.3:
|
||||
resolution: {integrity: sha512-Qz9RgWuO9l8lT+Y9xvbzhPT2efIUIFd69N7eF7tJ9lnQl0iLj1M7peK7IoUGZL9DJHw9XftqLreccfxcQgYLxA==}
|
||||
|
||||
tinyqueue@3.0.0:
|
||||
resolution: {integrity: sha512-gRa9gwYU3ECmQYv3lslts5hxuIa90veaEcxDYuu3QGOIAEM2mOZkVHp48ANJuu1CURtRdHKUBY5Lm1tHV+sD4g==}
|
||||
|
||||
tinyrainbow@2.0.0:
|
||||
resolution: {integrity: sha512-op4nsTR47R6p0vMUUoYl/a+ljLFVtlfaXkLQmqfLR1qHma1h/ysYk4hEXZ880bf2CYgTskvTa/e196Vd5dDQXw==}
|
||||
engines: {node: '>=14.0.0'}
|
||||
|
|
@ -26716,6 +26724,10 @@ snapshots:
|
|||
dependencies:
|
||||
redux: 5.0.1
|
||||
|
||||
redux-thunk@3.1.0(redux@5.0.1):
|
||||
dependencies:
|
||||
redux: 5.0.1
|
||||
|
||||
redux@4.2.1:
|
||||
dependencies:
|
||||
'@babel/runtime': 7.27.6
|
||||
|
|
@ -28216,6 +28228,8 @@ snapshots:
|
|||
|
||||
tinyqueue@1.2.3: {}
|
||||
|
||||
tinyqueue@3.0.0: {}
|
||||
|
||||
tinyrainbow@2.0.0: {}
|
||||
|
||||
tinyspy@4.0.4: {}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue