From 161de07e895412b1836b9b98471cb624771bc9c8 Mon Sep 17 00:00:00 2001 From: Daishi Kato Date: Wed, 21 Jun 2023 20:54:13 +0900 Subject: [PATCH] chore(deps): update dev dependencies (#740) * chore(deps): update dev dependencies * fix typing * update snapshots --- .github/workflows/test-multiple-versions.yml | 4 +- package.json | 52 +- src/vanilla/utils/derive.ts | 4 +- tests/__snapshots__/macro-vite.test.ts.snap | 4 +- yarn.lock | 2452 ++++++++++-------- 5 files changed, 1347 insertions(+), 1169 deletions(-) diff --git a/.github/workflows/test-multiple-versions.yml b/.github/workflows/test-multiple-versions.yml index 79469c7a..897e5c3e 100644 --- a/.github/workflows/test-multiple-versions.yml +++ b/.github/workflows/test-multiple-versions.yml @@ -33,8 +33,8 @@ jobs: - 18.0.0 - 18.1.0 - 18.2.0 - - 18.3.0-canary-aef7ce554-20230503 - - 0.0.0-experimental-aef7ce554-20230503 + - 18.3.0-canary-d1c8cdae3-20230619 + - 0.0.0-experimental-d1c8cdae3-20230619 steps: - uses: actions/checkout@v2 - uses: actions/setup-node@v2 diff --git a/package.json b/package.json index 63d4268c..5727d087 100644 --- a/package.json +++ b/package.json @@ -102,59 +102,59 @@ "use-sync-external-store": "1.2.0" }, "devDependencies": { - "@babel/core": "^7.21.8", - "@babel/helper-module-imports": "^7.21.4", - "@babel/plugin-transform-react-jsx": "^7.21.5", - "@babel/plugin-transform-typescript": "^7.21.3", - "@babel/preset-env": "^7.21.5", - "@babel/types": "^7.21.5", + "@babel/core": "^7.22.5", + "@babel/helper-module-imports": "^7.22.5", + "@babel/plugin-transform-react-jsx": "^7.22.5", + "@babel/plugin-transform-typescript": "^7.22.5", + "@babel/preset-env": "^7.22.5", + "@babel/types": "^7.22.5", "@redux-devtools/extension": "^3.2.5", "@rollup/plugin-alias": "^5.0.0", "@rollup/plugin-babel": "^6.0.3", - "@rollup/plugin-node-resolve": "^15.0.2", + "@rollup/plugin-node-resolve": "^15.1.0", "@rollup/plugin-replace": "^5.0.2", - "@rollup/plugin-terser": "^0.4.1", - "@rollup/plugin-typescript": "^11.1.0", + "@rollup/plugin-terser": "^0.4.3", + "@rollup/plugin-typescript": "^11.1.1", "@testing-library/react": "^14.0.0", "@types/babel-plugin-macros": "^3.1.0", "@types/jsdom": "^21.1.1", - "@types/react": "^18.2.5", - "@types/react-dom": "^18.2.3", + "@types/react": "^18.2.13", + "@types/react-dom": "^18.2.6", "@types/use-sync-external-store": "^0.0.3", - "@typescript-eslint/eslint-plugin": "^5.59.2", - "@typescript-eslint/parser": "^5.59.2", - "@vitest/coverage-c8": "^0.31.0", - "@vitest/ui": "^0.31.0", + "@typescript-eslint/eslint-plugin": "^5.60.0", + "@typescript-eslint/parser": "^5.60.0", + "@vitest/coverage-c8": "^0.32.2", + "@vitest/ui": "^0.32.2", "aslemammad-vite-plugin-macro": "^1.0.0", "babel-plugin-macros": "^3.1.0", "babel-plugin-tester": "10.1.0", - "concurrently": "^8.0.1", + "concurrently": "^8.2.0", "downlevel-dts": "^0.11.0", - "esbuild": "^0.17.18", - "eslint": "^8.39.0", + "esbuild": "^0.18.6", + "eslint": "^8.43.0", "eslint-config-prettier": "^8.8.0", "eslint-import-resolver-alias": "^1.1.2", "eslint-plugin-import": "^2.27.5", "eslint-plugin-prettier": "^4.2.1", "eslint-plugin-react": "^7.32.2", "eslint-plugin-react-hooks": "^4.6.0", - "eslint-plugin-vitest": "^0.1.5", - "jsdom": "^22.0.0", + "eslint-plugin-vitest": "^0.2.6", + "jsdom": "^22.1.0", "json": "^11.0.0", "postinstall-postinstall": "^2.1.0", "prettier": "^2.8.8", - "proxy-memoize": "^2.0.3", + "proxy-memoize": "^2.0.4", "react": "^18.2.0", "react-dom": "^18.2.0", "redux": "^4.2.1", - "rollup": "^3.21.4", + "rollup": "^3.25.1", "rollup-plugin-esbuild": "^5.0.0", "shx": "^0.3.4", "ts-expect": "^1.3.0", - "tslib": "^2.5.0", - "typescript": "^5.0.4", - "vite": "^4.3.4", - "vitest": "^0.31.0" + "tslib": "^2.5.3", + "typescript": "^5.1.3", + "vite": "^4.3.9", + "vitest": "^0.32.2" }, "peerDependencies": { "react": ">=16.8" diff --git a/src/vanilla/utils/derive.ts b/src/vanilla/utils/derive.ts index 60996aca..832f5422 100644 --- a/src/vanilla/utils/derive.ts +++ b/src/vanilla/utils/derive.ts @@ -253,8 +253,8 @@ export function derive( }) lastDependencies = dependencies } - if (value instanceof Promise) { - value.finally(subscribeToDependencies) + if ((value as unknown) instanceof Promise) { + ;(value as Promise).finally(subscribeToDependencies) } else { subscribeToDependencies() } diff --git a/tests/__snapshots__/macro-vite.test.ts.snap b/tests/__snapshots__/macro-vite.test.ts.snap index acac6708..ab9d8265 100644 --- a/tests/__snapshots__/macro-vite.test.ts.snap +++ b/tests/__snapshots__/macro-vite.test.ts.snap @@ -5,7 +5,7 @@ exports[`basic 1`] = ` const Component = () => {const valtio_macro_snap_state = _useSnapshot( - state); + state); return (
{valtio_macro_snap_state.count} @@ -20,7 +20,7 @@ exports[`complex 1`] = ` const Component = () => {const valtio_macro_snap_state = _useSnapshot( - state); + state); return (