From c93a0455d5c6a9d75fc879d4d52f2282a5faa36d Mon Sep 17 00:00:00 2001 From: Jonghyeon Ko Date: Thu, 21 Dec 2023 00:59:27 +0900 Subject: [PATCH 1/9] fix(react-image): change Load to return loaded HTMLImageElement --- packages/image/src/LoadClient.ts | 16 ++--- packages/react-image/package.json | 6 +- packages/react-image/src/Load.ts | 11 ++-- pnpm-lock.yaml | 62 +++++++----------- .../public/images/test.png | Bin 0 -> 882 bytes .../demo-react-image-next/src/app/page.tsx | 42 +++++++++++- 6 files changed, 78 insertions(+), 59 deletions(-) create mode 100644 websites/demo-react-image-next/public/images/test.png diff --git a/packages/image/src/LoadClient.ts b/packages/image/src/LoadClient.ts index 414d891..d0d875c 100644 --- a/packages/image/src/LoadClient.ts +++ b/packages/image/src/LoadClient.ts @@ -2,15 +2,15 @@ import { load } from "./load"; export type LoadSrc = Parameters[0]; -export type LoadState = { - src: TLoadSrc; +export type LoadState = { + image: HTMLImageElement; promise?: Promise; error?: unknown; }; type Notify = (...args: unknown[]) => unknown; export class LoadClient { - private loadCache = new Map>(); + private loadCache = new Map(); private notifiesMap = new Map(); attach(src: LoadSrc, notify: Notify) { @@ -38,17 +38,17 @@ export class LoadClient { if (loadState?.error) { throw loadState.error; } - if (loadState?.src) { - return loadState as LoadState; + if (loadState?.image) { + return loadState.image; } if (loadState?.promise) { throw loadState.promise; } - const newLoadState: LoadState = { - src, + const newLoadState: LoadState = { + image: undefined as unknown as HTMLImageElement, promise: load(src) - .then((image) => (newLoadState.src = image.src as TLoadSrc)) + .then((image) => (newLoadState.image = image)) .catch(() => (newLoadState.error = `${src}: load error`)), }; diff --git a/packages/react-image/package.json b/packages/react-image/package.json index b5299fd..e086b44 100644 --- a/packages/react-image/package.json +++ b/packages/react-image/package.json @@ -47,8 +47,7 @@ "type:check": "tsc --noEmit" }, "dependencies": { - "@fepack/image": "workspace:0.2.5", - "use-sync-external-store": "^1.2.0" + "@fepack/image": "workspace:*" }, "devDependencies": { "@testing-library/jest-dom": "^5.16.5", @@ -57,12 +56,11 @@ "@types/react": "^18.2.0", "@types/react-dom": "^18.2.1", "@types/testing-library__jest-dom": "^5.14.5", - "@types/use-sync-external-store": "^0.0.4", "react": "^18.2.0", "react-dom": "^18.2.0" }, "peerDependencies": { - "react": "^16.8 || ^17 || ^18" + "react": "^18" }, "publishConfig": { "access": "public" diff --git a/packages/react-image/src/Load.ts b/packages/react-image/src/Load.ts index cbf728d..e517292 100644 --- a/packages/react-image/src/Load.ts +++ b/packages/react-image/src/Load.ts @@ -1,6 +1,9 @@ -import { LoadClient, type LoadSrc, type LoadState } from "@fepack/image"; -import { type FunctionComponent, createElement } from "react"; -import { useSyncExternalStore } from "use-sync-external-store/shim"; +import { LoadClient, type LoadSrc } from "@fepack/image"; +import { + type FunctionComponent, + createElement, + useSyncExternalStore, +} from "react"; const loadClient = new LoadClient(); @@ -18,7 +21,7 @@ export const useLoad = ( type LoadProps = { src: TLoadSrc; - children: FunctionComponent>; + children: FunctionComponent; }; export const Load = ({ src, diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 7b07442..d44d3c4 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -55,7 +55,7 @@ importers: version: 7.2.0(typescript@5.1.6) turbo: specifier: latest - version: 1.10.14 + version: 1.10.16 typescript: specifier: 5.1.6 version: 5.1.6 @@ -136,11 +136,8 @@ importers: packages/react-image: dependencies: '@fepack/image': - specifier: workspace:0.2.5 + specifier: workspace:* version: link:../image - use-sync-external-store: - specifier: ^1.2.0 - version: 1.2.0(react@18.2.0) devDependencies: '@testing-library/jest-dom': specifier: ^5.16.5 @@ -160,9 +157,6 @@ importers: '@types/testing-library__jest-dom': specifier: ^5.14.5 version: 5.14.9 - '@types/use-sync-external-store': - specifier: ^0.0.4 - version: 0.0.4 react: specifier: ^18.2.0 version: 18.2.0 @@ -4052,10 +4046,6 @@ packages: resolution: {integrity: sha512-d0XxK3YTObnWVp6rZuev3c49+j4Lo8g4L1ZRm9z5L0xpoZycUPshHgczK5gsUMaZOstjVYYi09p5gYvUtfChYw==} dev: false - /@types/use-sync-external-store@0.0.4: - resolution: {integrity: sha512-DMBc2WDEfaGsWXqH/Sk2oBaUkvlUwqgt/YEygpqX0MaiEjqR7afd1QgE4Pq2zBr/TRz0Mpu92eBBo5UQjtTD5Q==} - dev: true - /@types/ws@8.5.5: resolution: {integrity: sha512-lwhs8hktwxSjf9UaZ9tG5M03PGogvFaH8gUgLNbN9HKIg0dvv6q+gkSuJ8HN4/VbyxkuLzCjlN7GquQ0gUJfIg==} dependencies: @@ -12221,64 +12211,64 @@ packages: yargs: 17.7.2 dev: true - /turbo-darwin-64@1.10.14: - resolution: {integrity: sha512-I8RtFk1b9UILAExPdG/XRgGQz95nmXPE7OiGb6ytjtNIR5/UZBS/xVX/7HYpCdmfriKdVwBKhalCoV4oDvAGEg==} + /turbo-darwin-64@1.10.16: + resolution: {integrity: sha512-+Jk91FNcp9e9NCLYlvDDlp2HwEDp14F9N42IoW3dmHI5ZkGSXzalbhVcrx3DOox3QfiNUHxzWg4d7CnVNCuuMg==} cpu: [x64] os: [darwin] requiresBuild: true dev: true optional: true - /turbo-darwin-arm64@1.10.14: - resolution: {integrity: sha512-KAdUWryJi/XX7OD0alOuOa0aJ5TLyd4DNIYkHPHYcM6/d7YAovYvxRNwmx9iv6Vx6IkzTnLeTiUB8zy69QkG9Q==} + /turbo-darwin-arm64@1.10.16: + resolution: {integrity: sha512-jqGpFZipIivkRp/i+jnL8npX0VssE6IAVNKtu573LXtssZdV/S+fRGYA16tI46xJGxSAivrZ/IcgZrV6Jk80bw==} cpu: [arm64] os: [darwin] requiresBuild: true dev: true optional: true - /turbo-linux-64@1.10.14: - resolution: {integrity: sha512-BOBzoREC2u4Vgpap/WDxM6wETVqVMRcM8OZw4hWzqCj2bqbQ6L0wxs1LCLWVrghQf93JBQtIGAdFFLyCSBXjWQ==} + /turbo-linux-64@1.10.16: + resolution: {integrity: sha512-PpqEZHwLoizQ6sTUvmImcRmACyRk9EWLXGlqceogPZsJ1jTRK3sfcF9fC2W56zkSIzuLEP07k5kl+ZxJd8JMcg==} cpu: [x64] os: [linux] requiresBuild: true dev: true optional: true - /turbo-linux-arm64@1.10.14: - resolution: {integrity: sha512-D8T6XxoTdN5D4V5qE2VZG+/lbZX/89BkAEHzXcsSUTRjrwfMepT3d2z8aT6hxv4yu8EDdooZq/2Bn/vjMI32xw==} + /turbo-linux-arm64@1.10.16: + resolution: {integrity: sha512-TMjFYz8to1QE0fKVXCIvG/4giyfnmqcQIwjdNfJvKjBxn22PpbjeuFuQ5kNXshUTRaTJihFbuuCcb5OYFNx4uw==} cpu: [arm64] os: [linux] requiresBuild: true dev: true optional: true - /turbo-windows-64@1.10.14: - resolution: {integrity: sha512-zKNS3c1w4i6432N0cexZ20r/aIhV62g69opUn82FLVs/zk3Ie0GVkSB6h0rqIvMalCp7enIR87LkPSDGz9K4UA==} + /turbo-windows-64@1.10.16: + resolution: {integrity: sha512-+jsf68krs0N66FfC4/zZvioUap/Tq3sPFumnMV+EBo8jFdqs4yehd6+MxIwYTjSQLIcpH8KoNMB0gQYhJRLZzw==} cpu: [x64] os: [win32] requiresBuild: true dev: true optional: true - /turbo-windows-arm64@1.10.14: - resolution: {integrity: sha512-rkBwrTPTxNSOUF7of8eVvvM+BkfkhA2OvpHM94if8tVsU+khrjglilp8MTVPHlyS9byfemPAmFN90oRIPB05BA==} + /turbo-windows-arm64@1.10.16: + resolution: {integrity: sha512-sKm3hcMM1bl0B3PLG4ifidicOGfoJmOEacM5JtgBkYM48ncMHjkHfFY7HrJHZHUnXM4l05RQTpLFoOl/uIo2HQ==} cpu: [arm64] os: [win32] requiresBuild: true dev: true optional: true - /turbo@1.10.14: - resolution: {integrity: sha512-hr9wDNYcsee+vLkCDIm8qTtwhJ6+UAMJc3nIY6+PNgUTtXcQgHxCq8BGoL7gbABvNWv76CNbK5qL4Lp9G3ZYRA==} + /turbo@1.10.16: + resolution: {integrity: sha512-2CEaK4FIuSZiP83iFa9GqMTQhroW2QryckVqUydmg4tx78baftTOS0O+oDAhvo9r9Nit4xUEtC1RAHoqs6ZEtg==} hasBin: true optionalDependencies: - turbo-darwin-64: 1.10.14 - turbo-darwin-arm64: 1.10.14 - turbo-linux-64: 1.10.14 - turbo-linux-arm64: 1.10.14 - turbo-windows-64: 1.10.14 - turbo-windows-arm64: 1.10.14 + turbo-darwin-64: 1.10.16 + turbo-darwin-arm64: 1.10.16 + turbo-linux-64: 1.10.16 + turbo-linux-arm64: 1.10.16 + turbo-windows-64: 1.10.16 + turbo-windows-arm64: 1.10.16 dev: true /typanion@3.14.0: @@ -12637,14 +12627,6 @@ packages: react: 17.0.2 dev: false - /use-sync-external-store@1.2.0(react@18.2.0): - resolution: {integrity: sha512-eEgnFxGQ1Ife9bzYs6VLi8/4X6CObHMw9Qr9tPY43iKwsPw8xE8+EFsf/2cFZ5S3esXgpWgtSCtLNS41F+sKPA==} - peerDependencies: - react: ^16.8.0 || ^17.0.0 || ^18.0.0 - dependencies: - react: 18.2.0 - dev: false - /util-deprecate@1.0.2: resolution: {integrity: sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==} dev: false diff --git a/websites/demo-react-image-next/public/images/test.png b/websites/demo-react-image-next/public/images/test.png new file mode 100644 index 0000000000000000000000000000000000000000..73528e2e81bfc1fa890b11588f5aa4cc38699cb8 GIT binary patch literal 882 zcmeAS@N?(olHy`uVBq!ia0vp^1|ZDA3?vioaBc-s3dtTpz6=aiY77hwEes65fIZO?B_@7h-p7|3|Ns9#?d6=;K&P9Q z1o;IsFqu`Xx%BSmYRQ&I4+STF7YKU!f_VbRx{WOT{{s1+O_KN~^}wXEY}MtruYWZ2 z1@y76H7&omqvO*XpaG0Y-tI0o%d-;C138=p9+AZi4BWyX%*Zfnjs#GUy~NYkmHjy< z6PtyhlEZ7D9HX75i(`n#@w-!_qnjKA+5}zsG!q)8T?o9a;icU^;otxNr4HQYJF_wp{eN3o<3gV&C&fsLk^}w!DsksZoB_=gq|q9cf(^ zZgncgvCfw!VuR63$(5>pwHbJ?sEUN{JY#*)^%&~p=^Sje~ z|5veF_N>*2esp}{7W;Eogl}D&Fq^+Q({ATp`_->B)`?zWTy<)b*t8wYDrb3IJa!oW zRpMz(j;;Tw9jMVWbILl4T2c03C+^+*77IxpuTGNK|CYC to load <>load image error}> }> - {(loaded) => } + {(loadedImage) => } <>load image error}> }> - {(loaded) => } + {(loadedImage) => } + setSize(Number(e.target.value))} + /> + + + + {(loadedImage) => ( +
+ {extractRGBAs(loadedImage).map((rgba, index) => ( +
+ ))} +
+ )} + +
); } From 18abc446c6fed9bd2aae4cb7e1b94812e2128783 Mon Sep 17 00:00:00 2001 From: Jonghyeon Ko Date: Thu, 21 Dec 2023 01:10:56 +0900 Subject: [PATCH 2/9] chore: update --- packages/react-image/src/Load.ts | 10 +++------- websites/demo-react-image-next/src/app/page.tsx | 2 +- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/packages/react-image/src/Load.ts b/packages/react-image/src/Load.ts index e517292..9305a29 100644 --- a/packages/react-image/src/Load.ts +++ b/packages/react-image/src/Load.ts @@ -1,9 +1,5 @@ import { LoadClient, type LoadSrc } from "@fepack/image"; -import { - type FunctionComponent, - createElement, - useSyncExternalStore, -} from "react"; +import { ReactNode, useSyncExternalStore } from "react"; const loadClient = new LoadClient(); @@ -21,9 +17,9 @@ export const useLoad = ( type LoadProps = { src: TLoadSrc; - children: FunctionComponent; + children: (loadedImage: HTMLImageElement) => ReactNode; }; export const Load = ({ src, children, -}: LoadProps) => createElement(children, useLoad({ src })); +}: LoadProps) => children(useLoad({ src })); diff --git a/websites/demo-react-image-next/src/app/page.tsx b/websites/demo-react-image-next/src/app/page.tsx index dd2b913..258ceb0 100644 --- a/websites/demo-react-image-next/src/app/page.tsx +++ b/websites/demo-react-image-next/src/app/page.tsx @@ -7,7 +7,7 @@ import { useState } from "react"; import { Spinner } from "~/components/uis"; export default function Home() { - const [size, setSize] = useState(1); + const [size, setSize] = useState(8); return (
From 17f13d2507d64043ed5394e99acd3ab90c2002b2 Mon Sep 17 00:00:00 2001 From: Jonghyeon Ko Date: Thu, 21 Dec 2023 01:12:18 +0900 Subject: [PATCH 3/9] Create khaki-trees-try.md --- .changeset/khaki-trees-try.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/khaki-trees-try.md diff --git a/.changeset/khaki-trees-try.md b/.changeset/khaki-trees-try.md new file mode 100644 index 0000000..7f128fd --- /dev/null +++ b/.changeset/khaki-trees-try.md @@ -0,0 +1,5 @@ +--- +"@fepack/react-image": patch +--- + +fix(react-image): change Load to return loaded HTMLImageElement From dd5e63f0446f99a35a8d44e8ef868603f2a3dcd0 Mon Sep 17 00:00:00 2001 From: Jonghyeon Ko Date: Thu, 21 Dec 2023 01:12:44 +0900 Subject: [PATCH 4/9] Create neat-trains-speak.md --- .changeset/neat-trains-speak.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/neat-trains-speak.md diff --git a/.changeset/neat-trains-speak.md b/.changeset/neat-trains-speak.md new file mode 100644 index 0000000..42e88d1 --- /dev/null +++ b/.changeset/neat-trains-speak.md @@ -0,0 +1,5 @@ +--- +"@fepack/image": patch +--- + +fix(react-image): change Load to return loaded HTMLImageElement From 55890b4773054b8101667aa8e3f93a458d77b8e4 Mon Sep 17 00:00:00 2001 From: Jonghyeon Ko Date: Thu, 21 Dec 2023 01:25:03 +0900 Subject: [PATCH 5/9] chore: update --- .github/workflows/ci.yml | 2 +- packages/image/src/load.spec.ts | 4 ++-- websites/demo-react-image-next/src/app/load/page.tsx | 2 +- websites/demo-react-image-next/src/app/page.tsx | 12 ++++++------ 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 57336e2..27777dc 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -29,7 +29,7 @@ jobs: cache-dependency-path: "pnpm-lock.yaml" node-version-file: ".nvmrc" - if: matrix.command == 'test' - run: pnpx playwright install + run: pnpx exec playwright install - run: pnpm install --frozen-lockfile - run: pnpm prepack - run: pnpm ${{ matrix.command }} diff --git a/packages/image/src/load.spec.ts b/packages/image/src/load.spec.ts index 1805054..fe33ae6 100644 --- a/packages/image/src/load.spec.ts +++ b/packages/image/src/load.spec.ts @@ -3,7 +3,7 @@ import { load } from "."; describe("load", () => { it("should load image by src", async () => { - const loadedImage = await load("src/images/test.png"); - expect(loadedImage.src).toBe("http://localhost:5173/src/images/test.png"); + const image = await load("src/images/test.png"); + expect(image.src).toBe("http://localhost:5174/src/images/test.png"); }); }); diff --git a/websites/demo-react-image-next/src/app/load/page.tsx b/websites/demo-react-image-next/src/app/load/page.tsx index 68d36a6..a15fb4e 100644 --- a/websites/demo-react-image-next/src/app/load/page.tsx +++ b/websites/demo-react-image-next/src/app/load/page.tsx @@ -12,7 +12,7 @@ export default function Page() { }> - {(loaded) => } + {(image) => } diff --git a/websites/demo-react-image-next/src/app/page.tsx b/websites/demo-react-image-next/src/app/page.tsx index 258ceb0..218075d 100644 --- a/websites/demo-react-image-next/src/app/page.tsx +++ b/websites/demo-react-image-next/src/app/page.tsx @@ -15,14 +15,14 @@ export default function Home() { <>load image error}> }> - {(loadedImage) => } + {(image) => } <>load image error}> }> - {(loadedImage) => } + {(image) => } @@ -35,16 +35,16 @@ export default function Home() { - {(loadedImage) => ( + {(image) => (
- {extractRGBAs(loadedImage).map((rgba, index) => ( + {extractRGBAs(image).map((rgba, index) => (
Date: Thu, 21 Dec 2023 01:26:16 +0900 Subject: [PATCH 6/9] chore: update --- packages/image/src/load.spec.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/image/src/load.spec.ts b/packages/image/src/load.spec.ts index fe33ae6..522f62e 100644 --- a/packages/image/src/load.spec.ts +++ b/packages/image/src/load.spec.ts @@ -4,6 +4,6 @@ import { load } from "."; describe("load", () => { it("should load image by src", async () => { const image = await load("src/images/test.png"); - expect(image.src).toBe("http://localhost:5174/src/images/test.png"); + expect(image.src).toBe("http://localhost:5173/src/images/test.png"); }); }); From 6a3649f1203b2a0a305653c670dd6163a7454407 Mon Sep 17 00:00:00 2001 From: Jonghyeon Ko Date: Thu, 21 Dec 2023 01:28:32 +0900 Subject: [PATCH 7/9] chore: update --- .github/workflows/ci.yml | 2 +- .github/workflows/code-coverage.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 27777dc..6a5162e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -28,8 +28,8 @@ jobs: cache: "pnpm" cache-dependency-path: "pnpm-lock.yaml" node-version-file: ".nvmrc" + - run: pnpm install --frozen-lockfile - if: matrix.command == 'test' run: pnpx exec playwright install - - run: pnpm install --frozen-lockfile - run: pnpm prepack - run: pnpm ${{ matrix.command }} diff --git a/.github/workflows/code-coverage.yml b/.github/workflows/code-coverage.yml index eed470c..089957c 100644 --- a/.github/workflows/code-coverage.yml +++ b/.github/workflows/code-coverage.yml @@ -21,8 +21,8 @@ jobs: cache: "pnpm" cache-dependency-path: "pnpm-lock.yaml" node-version-file: ".nvmrc" - - run: pnpx playwright install - run: pnpm install --frozen-lockfile + - run: pnpx exec playwright install - run: pnpm test - name: Upload coverage reports to Codecov uses: codecov/codecov-action@v3 From 477e4e0fda334ece398ac5de74c0d45eca6fb7db Mon Sep 17 00:00:00 2001 From: Jonghyeon Ko Date: Thu, 21 Dec 2023 01:30:36 +0900 Subject: [PATCH 8/9] chore: update --- package.json | 1 + packages/image/package.json | 3 +-- pnpm-lock.yaml | 29 +++++++++++++++-------------- 3 files changed, 17 insertions(+), 16 deletions(-) diff --git a/package.json b/package.json index 3db7b08..e0fac3b 100644 --- a/package.json +++ b/package.json @@ -46,6 +46,7 @@ "eslint": "^7.32.0", "jsdom": "^22.1.0", "packlint": "^0.2.4", + "playwright": "^1.40.1", "prettier": "^2.5.1", "publint": "^0.2.2", "rimraf": "^5.0.1", diff --git a/packages/image/package.json b/packages/image/package.json index 2a02371..160707d 100644 --- a/packages/image/package.json +++ b/packages/image/package.json @@ -51,8 +51,7 @@ "type:check": "tsc --noEmit" }, "devDependencies": { - "@types/node": "^18.16.2", - "playwright": "^1.38.0" + "@types/node": "^18.16.2" }, "publishConfig": { "access": "public" diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index d44d3c4..0b047ed 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -41,6 +41,9 @@ importers: packlint: specifier: ^0.2.4 version: 0.2.4(typanion@3.14.0) + playwright: + specifier: ^1.40.1 + version: 1.40.1 prettier: specifier: ^2.5.1 version: 2.8.8 @@ -61,7 +64,7 @@ importers: version: 5.1.6 vitest: specifier: ^0.34.3 - version: 0.34.4(@vitest/browser@0.34.4)(@vitest/ui@0.34.4)(jsdom@22.1.0) + version: 0.34.4(@vitest/browser@0.34.4)(@vitest/ui@0.34.4)(jsdom@22.1.0)(playwright@1.40.1) configs/eslint-config: dependencies: @@ -129,9 +132,6 @@ importers: '@types/node': specifier: ^18.16.2 version: 18.17.16 - playwright: - specifier: ^1.38.0 - version: 1.38.0 packages/react-image: dependencies: @@ -4260,7 +4260,7 @@ packages: magic-string: 0.30.3 modern-node-polyfills: 0.1.3(rollup@2.79.1) sirv: 2.0.3 - vitest: 0.34.4(@vitest/browser@0.34.4)(@vitest/ui@0.34.4)(jsdom@22.1.0) + vitest: 0.34.4(@vitest/browser@0.34.4)(@vitest/ui@0.34.4)(jsdom@22.1.0)(playwright@1.40.1) transitivePeerDependencies: - rollup dev: true @@ -4277,7 +4277,7 @@ packages: istanbul-reports: 3.1.6 picocolors: 1.0.0 test-exclude: 6.0.0 - vitest: 0.34.4(@vitest/browser@0.34.4)(@vitest/ui@0.34.4)(jsdom@22.1.0) + vitest: 0.34.4(@vitest/browser@0.34.4)(@vitest/ui@0.34.4)(jsdom@22.1.0)(playwright@1.40.1) transitivePeerDependencies: - supports-color dev: true @@ -4324,7 +4324,7 @@ packages: pathe: 1.1.1 picocolors: 1.0.0 sirv: 2.0.3 - vitest: 0.34.4(@vitest/browser@0.34.4)(@vitest/ui@0.34.4)(jsdom@22.1.0) + vitest: 0.34.4(@vitest/browser@0.34.4)(@vitest/ui@0.34.4)(jsdom@22.1.0)(playwright@1.40.1) dev: true /@vitest/utils@0.34.4: @@ -6957,7 +6957,7 @@ packages: '@typescript-eslint/utils': 6.7.0(eslint@8.50.0)(typescript@5.2.2) eslint: 8.50.0 typescript: 5.2.2 - vitest: 0.34.4(@vitest/browser@0.34.4)(@vitest/ui@0.34.4)(jsdom@22.1.0) + vitest: 0.34.4(@vitest/browser@0.34.4)(@vitest/ui@0.34.4)(jsdom@22.1.0)(playwright@1.40.1) transitivePeerDependencies: - supports-color dev: true @@ -9975,18 +9975,18 @@ packages: find-up: 3.0.0 dev: false - /playwright-core@1.38.0: - resolution: {integrity: sha512-f8z1y8J9zvmHoEhKgspmCvOExF2XdcxMW8jNRuX4vkQFrzV4MlZ55iwb5QeyiFQgOFCUolXiRHgpjSEnqvO48g==} + /playwright-core@1.40.1: + resolution: {integrity: sha512-+hkOycxPiV534c4HhpfX6yrlawqVUzITRKwHAmYfmsVreltEl6fAZJ3DPfLMOODw0H3s1Itd6MDCWmP1fl/QvQ==} engines: {node: '>=16'} hasBin: true dev: true - /playwright@1.38.0: - resolution: {integrity: sha512-fJGw+HO0YY+fU/F1N57DMO+TmXHTrmr905J05zwAQE9xkuwP/QLDk63rVhmyxh03dYnEhnRbsdbH9B0UVVRB3A==} + /playwright@1.40.1: + resolution: {integrity: sha512-2eHI7IioIpQ0bS1Ovg/HszsN/XKNwEG1kbzSDDmADpclKc7CyqkHw7Mg2JCz/bbCxg25QUPcjksoMW7JcIFQmw==} engines: {node: '>=16'} hasBin: true dependencies: - playwright-core: 1.38.0 + playwright-core: 1.40.1 optionalDependencies: fsevents: 2.3.2 dev: true @@ -12746,7 +12746,7 @@ packages: fsevents: 2.3.3 dev: true - /vitest@0.34.4(@vitest/browser@0.34.4)(@vitest/ui@0.34.4)(jsdom@22.1.0): + /vitest@0.34.4(@vitest/browser@0.34.4)(@vitest/ui@0.34.4)(jsdom@22.1.0)(playwright@1.40.1): resolution: {integrity: sha512-SE/laOsB6995QlbSE6BtkpXDeVNLJc1u2LHRG/OpnN4RsRzM3GQm4nm3PQCK5OBtrsUqnhzLdnT7se3aeNGdlw==} engines: {node: '>=v14.18.0'} hasBin: true @@ -12797,6 +12797,7 @@ packages: magic-string: 0.30.3 pathe: 1.1.1 picocolors: 1.0.0 + playwright: 1.40.1 std-env: 3.4.3 strip-literal: 1.3.0 tinybench: 2.5.1 From 0971e0a7a829fcc739d0195982fd7bce8e71a0e5 Mon Sep 17 00:00:00 2001 From: Jonghyeon Ko Date: Thu, 21 Dec 2023 01:32:02 +0900 Subject: [PATCH 9/9] chore: update --- .github/workflows/ci.yml | 2 +- .github/workflows/code-coverage.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6a5162e..1da0c32 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -30,6 +30,6 @@ jobs: node-version-file: ".nvmrc" - run: pnpm install --frozen-lockfile - if: matrix.command == 'test' - run: pnpx exec playwright install + run: pnpm exec playwright install - run: pnpm prepack - run: pnpm ${{ matrix.command }} diff --git a/.github/workflows/code-coverage.yml b/.github/workflows/code-coverage.yml index 089957c..38583b1 100644 --- a/.github/workflows/code-coverage.yml +++ b/.github/workflows/code-coverage.yml @@ -22,7 +22,7 @@ jobs: cache-dependency-path: "pnpm-lock.yaml" node-version-file: ".nvmrc" - run: pnpm install --frozen-lockfile - - run: pnpx exec playwright install + - run: pnpm exec playwright install - run: pnpm test - name: Upload coverage reports to Codecov uses: codecov/codecov-action@v3