diff --git a/.changeset/short-tables-roll.md b/.changeset/short-tables-roll.md new file mode 100644 index 00000000..dd93d211 --- /dev/null +++ b/.changeset/short-tables-roll.md @@ -0,0 +1,5 @@ +--- +'pintora-demo': patch +--- + +Upgrade to reduxjs toolkit v2 diff --git a/demo/package.json b/demo/package.json index af24da7a..6f014781 100644 --- a/demo/package.json +++ b/demo/package.json @@ -29,7 +29,7 @@ "@pintora/standalone": "workspace:*", "@pintora/test-shared": "workspace:*", "@react-hook/debounce": "^4.0.0", - "@reduxjs/toolkit": "^1.8.3", + "@reduxjs/toolkit": "^2.0.0", "browser-fs-access": "^0.35.0", "classnames": "^2.3.2", "daisyui": "^1.22.2", diff --git a/demo/src/live-editor/containers/Preview/index.tsx b/demo/src/live-editor/containers/Preview/index.tsx index 02cb080a..e826d1bd 100644 --- a/demo/src/live-editor/containers/Preview/index.tsx +++ b/demo/src/live-editor/containers/Preview/index.tsx @@ -1,7 +1,6 @@ import React, { useCallback } from 'react' -import { PintoraConfig } from '@pintora/core' +import type { PintoraConfig, DeepPartial } from '@pintora/core' import classnames from 'classnames' -import { DeepPartial } from '@reduxjs/toolkit' import { useDispatch, connect } from 'react-redux' import { StoreState } from 'src/live-editor/redux/store' import { actions } from 'src/live-editor/redux/slice' diff --git a/demo/src/live-editor/redux/slice.ts b/demo/src/live-editor/redux/slice.ts index 8662ef2c..dd34c36b 100644 --- a/demo/src/live-editor/redux/slice.ts +++ b/demo/src/live-editor/redux/slice.ts @@ -1,5 +1,6 @@ -import { createSlice, DeepPartial, Draft, PayloadAction } from '@reduxjs/toolkit' +import { createSlice, Draft, PayloadAction } from '@reduxjs/toolkit' import { EXAMPLES } from '@pintora/test-shared' +import type { DeepPartial } from '@pintora/core' import { PintoraConfig } from '@pintora/standalone' import { ErrorInfo } from 'src/live-editor/type' import '@pintora/diagrams' diff --git a/demo/src/live-editor/redux/themeSlice.ts b/demo/src/live-editor/redux/themeSlice.ts index a6778f8e..bbe8ac0a 100644 --- a/demo/src/live-editor/redux/themeSlice.ts +++ b/demo/src/live-editor/redux/themeSlice.ts @@ -1,4 +1,4 @@ -import { createSlice, DeepPartial, Draft, PayloadAction } from '@reduxjs/toolkit' +import { createSlice } from '@reduxjs/toolkit' import { EXAMPLES } from '@pintora/test-shared' export type State = { diff --git a/packages/pintora-target-wintercg/.gitignore b/packages/pintora-target-wintercg/.gitignore index 7d862fe5..4ef07c69 100644 --- a/packages/pintora-target-wintercg/.gitignore +++ b/packages/pintora-target-wintercg/.gitignore @@ -1,2 +1,2 @@ -dist/ -out-scripts/ +build-meta.json +dist diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 2d246748..0f758fc7 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -1,9 +1,5 @@ lockfileVersion: '6.0' -settings: - autoInstallPeers: true - excludeLinksFromLockfile: false - importers: .: @@ -114,8 +110,8 @@ importers: specifier: ^4.0.0 version: 4.0.0(react@18.2.0) '@reduxjs/toolkit': - specifier: ^1.8.3 - version: 1.8.3(react-redux@9.0.4)(react@18.2.0) + specifier: ^2.0.0 + version: 2.0.1(react-redux@9.0.4)(react@18.2.0) browser-fs-access: specifier: ^0.35.0 version: 0.35.0 @@ -139,7 +135,7 @@ importers: version: 2.4.0(csstype@3.1.0)(react-dom@18.2.0)(react@18.2.0) react-redux: specifier: ^9.0.0 - version: 9.0.4(@types/react@18.0.8)(react@18.2.0)(redux@4.1.2) + version: 9.0.4(@types/react@18.0.8)(react@18.2.0)(redux@5.0.1) react-router-dom: specifier: ^6.3.0 version: 6.3.0(react-dom@18.2.0)(react@18.2.0) @@ -230,13 +226,13 @@ importers: packages/pintora-cli: dependencies: '@pintora/core': - specifier: workspace:^0.6.3 + specifier: workspace:^0.7.0-alpha.0 version: link:../pintora-core '@pintora/renderer': - specifier: ^0.6.1 + specifier: ^0.7.0-alpha.0 version: link:../pintora-renderer '@pintora/standalone': - specifier: workspace:^0.6.5 + specifier: workspace:^0.7.0-alpha.0 version: link:../pintora-standalone canvas: specifier: ^2.11.2 @@ -255,7 +251,7 @@ importers: version: 16.2.0 devDependencies: '@pintora/test-shared': - specifier: workspace:^0.4.1 + specifier: workspace:^0.5.0-alpha.0 version: link:../test-shared '@types/jsdom': specifier: ^20.0.0 @@ -313,7 +309,7 @@ importers: specifier: ^2.21.0-beta.1 version: 2.21.0-beta.1 '@pintora/core': - specifier: workspace:^0.6.2 + specifier: workspace:^0.7.0-alpha.0 version: link:../pintora-core '@pintora/dagre': specifier: ^0.10.10 @@ -344,7 +340,7 @@ importers: specifier: workspace:^0.1.1 version: link:../development-kit '@pintora/test-shared': - specifier: workspace:^0.4.1 + specifier: workspace:^0.5.0-alpha.0 version: link:../test-shared '@types/d3-interpolate': specifier: ^3.0.1 @@ -392,7 +388,7 @@ importers: specifier: ^0.5.6 version: 0.5.6 '@pintora/core': - specifier: workspace:^0.6.2 + specifier: workspace:^0.7.0-alpha.0 version: link:../pintora-core '@types/node': specifier: ^16.11.7 @@ -408,13 +404,13 @@ importers: packages/pintora-standalone: dependencies: '@pintora/core': - specifier: workspace:^0.6.2 + specifier: workspace:^0.7.0-alpha.0 version: link:../pintora-core '@pintora/diagrams': - specifier: workspace:^0.6.5 + specifier: workspace:^0.7.0-alpha.0 version: link:../pintora-diagrams '@pintora/renderer': - specifier: ^0.6.1 + specifier: ^0.7.0-alpha.0 version: link:../pintora-renderer devDependencies: '@pintora/test-shared': @@ -541,10 +537,10 @@ importers: specifier: ^3.0.0 version: 3.0.0(@types/react@18.0.8)(react@18.1.0) '@pintora/standalone': - specifier: workspace:^0.6.3 + specifier: workspace:^0.7.0-alpha.0 version: link:../packages/pintora-standalone '@pintora/test-shared': - specifier: workspace:^0.4.0 + specifier: workspace:^0.5.0-alpha.0 version: link:../packages/test-shared '@svgr/webpack': specifier: ^8.0.0 @@ -5681,23 +5677,23 @@ packages: react: 18.2.0 dev: false - /@reduxjs/toolkit@1.8.3(react-redux@9.0.4)(react@18.2.0): - resolution: {integrity: sha512-lU/LDIfORmjBbyDLaqFN2JB9YmAT1BElET9y0ZszwhSBa5Ef3t6o5CrHupw5J1iOXwd+o92QfQZ8OJpwXvsssg==} + /@reduxjs/toolkit@2.0.1(react-redux@9.0.4)(react@18.2.0): + resolution: {integrity: sha512-fxIjrR9934cmS8YXIGd9e7s1XRsEU++aFc9DVNMFMRTM5Vtsg2DCRMj21eslGtDt43IUf9bJL3h5bwUlZleibA==} peerDependencies: react: ^16.9.0 || ^17.0.0 || ^18 - react-redux: ^7.2.1 || ^8.0.2 + react-redux: ^7.2.1 || ^8.1.3 || ^9.0.0 peerDependenciesMeta: react: optional: true react-redux: optional: true dependencies: - immer: 9.0.12 + immer: 10.0.3 react: 18.2.0 - react-redux: 9.0.4(@types/react@18.0.8)(react@18.2.0)(redux@4.1.2) - redux: 4.1.2 - redux-thunk: 2.4.1(redux@4.1.2) - reselect: 4.1.5 + react-redux: 9.0.4(@types/react@18.0.8)(react@18.2.0)(redux@5.0.1) + redux: 5.0.1 + redux-thunk: 3.1.0(redux@5.0.1) + reselect: 5.0.1 dev: false /@rollup/plugin-alias@3.1.9(rollup@2.79.1): @@ -11975,6 +11971,10 @@ packages: dependencies: queue: 6.0.2 + /immer@10.0.3: + resolution: {integrity: sha512-pwupu3eWfouuaowscykeckFmVTpqbzW+rXFCX8rQLkZzM9ftBmU/++Ra+o+L27mz03zJTlyV4UUr+fdKNffo4A==} + dev: false + /immer@9.0.12: resolution: {integrity: sha512-lk7UNmSbAukB5B6dh9fnh5D0bJTOFKxVg2cyJWTYrWRfhLrLMBquONcUs3aFq507hNoIZEDDh8lb8UtOizSMhA==} dev: false @@ -16315,7 +16315,7 @@ packages: webpack: 5.89.0(esbuild@0.19.11) dev: false - /react-redux@9.0.4(@types/react@18.0.8)(react@18.2.0)(redux@4.1.2): + /react-redux@9.0.4(@types/react@18.0.8)(react@18.2.0)(redux@5.0.1): resolution: {integrity: sha512-9J1xh8sWO0vYq2sCxK2My/QO7MzUMRi3rpiILP/+tDr8krBHixC6JMM17fMK88+Oh3e4Ae6/sHIhNBgkUivwFA==} peerDependencies: '@types/react': ^18.2.25 @@ -16333,7 +16333,7 @@ packages: '@types/react': 18.0.8 '@types/use-sync-external-store': 0.0.3 react: 18.2.0 - redux: 4.1.2 + redux: 5.0.1 use-sync-external-store: 1.1.0(react@18.2.0) dev: false @@ -16506,18 +16506,16 @@ packages: strip-indent: 3.0.0 dev: true - /redux-thunk@2.4.1(redux@4.1.2): - resolution: {integrity: sha512-OOYGNY5Jy2TWvTL1KgAlVy6dcx3siPJ1wTq741EPyUKfn6W6nChdICjZwCd0p8AZBs5kWpZlbkXW2nE/zjUa+Q==} + /redux-thunk@3.1.0(redux@5.0.1): + resolution: {integrity: sha512-NW2r5T6ksUKXCabzhL9z+h206HQw/NJkcLm1GPImRQ8IzfXwRGqjVhKJGauHirT0DAuyy6hjdnMZaRoAcy0Klw==} peerDependencies: - redux: ^4 + redux: ^5.0.0 dependencies: - redux: 4.1.2 + redux: 5.0.1 dev: false - /redux@4.1.2: - resolution: {integrity: sha512-SH8PglcebESbd/shgf6mii6EIoRM0zrQyjcuQ+ojmfxjTtE0z9Y8pa62iA/OJ58qjP6j27uyW4kUF4jl/jd6sw==} - dependencies: - '@babel/runtime': 7.17.9 + /redux@5.0.1: + resolution: {integrity: sha512-M9/ELqF6fy8FwmkpnF0S3YKOqMyoWJ4+CS5Efg2ct3oY9daQvd/Pc71FpGZsVsbl3Cpb+IIcjBDUnnyBdQbq4w==} dev: false /regenerate-unicode-properties@10.0.1: @@ -16809,8 +16807,8 @@ packages: /requires-port@1.0.0: resolution: {integrity: sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ==} - /reselect@4.1.5: - resolution: {integrity: sha512-uVdlz8J7OO+ASpBYoz1Zypgx0KasCY20H+N8JD13oUMtPvSHQuscrHop4KbXrbsBcdB9Ds7lVK7eRkBIfO43vQ==} + /reselect@5.0.1: + resolution: {integrity: sha512-D72j2ubjgHpvuCiORWkOUxndHJrxDaSolheiz5CO+roz8ka97/4msh2E8F5qay4GawR5vzBt5MkbDHT+Rdy/Wg==} dev: false /resolve-alpn@1.2.1: @@ -20029,3 +20027,7 @@ packages: /zwitch@2.0.4: resolution: {integrity: sha512-bXE4cR/kVZhKZX/RjPEflHaKVhUVl85noU3v6b8apfQEc1x4A+zBxjZ4lN8LqGd6WZ3dl98pY4o717VFmoPp+A==} dev: false + +settings: + autoInstallPeers: true + excludeLinksFromLockfile: false