From 4917d07f2b01dab8a1db9086c104b2c71ccfce97 Mon Sep 17 00:00:00 2001 From: ano3 Date: Sun, 24 May 2026 08:25:56 +0900 Subject: [PATCH 1/5] =?UTF-8?q?chore:=20pnpm=E3=81=AE=E3=82=A2=E3=83=83?= =?UTF-8?q?=E3=83=97=E3=83=87=E3=83=BC=E3=83=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- chrome-extension/package.json | 1 + flake.lock | 6 +++--- flake.nix | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/chrome-extension/package.json b/chrome-extension/package.json index ed6d8ce..40bd9bf 100644 --- a/chrome-extension/package.json +++ b/chrome-extension/package.json @@ -3,6 +3,7 @@ "private": true, "version": "0.0.0", "type": "module", + "packageManager": "pnpm@11.1.2", "scripts": { "dev": "vite", "build": "vue-tsc && vite build", diff --git a/flake.lock b/flake.lock index c04500a..77748eb 100644 --- a/flake.lock +++ b/flake.lock @@ -2,11 +2,11 @@ "nodes": { "nixpkgs": { "locked": { - "lastModified": 1760103332, - "narHash": "sha256-BMsGVfKl4Q80Pr9T1AkCRljO1bpwCmY8rTBVj8XGuhA=", + "lastModified": 1779536132, + "narHash": "sha256-q+fF42iv/geEbHfgSzy3tS0FF/EyD6XTZ98E6yxiBO8=", "owner": "nixos", "repo": "nixpkgs", - "rev": "870493f9a8cb0b074ae5b411b2f232015db19a65", + "rev": "3d8f0f3f72a6cd4d93d0ad13203f2ea1cb7e1456", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index e4345f5..6de82c9 100644 --- a/flake.nix +++ b/flake.nix @@ -24,7 +24,7 @@ default = pkgs.mkShell { packages = with pkgs; [ nodejs_24 - nodePackages.pnpm + pnpm playwright-driver.browsers terraform From a810898866659056fc4027fceb35d1434260cea8 Mon Sep 17 00:00:00 2001 From: ano3 Date: Sun, 24 May 2026 08:39:03 +0900 Subject: [PATCH 2/5] ci: pnpm-workspace.yaml --- chrome-extension/pnpm-workspace.yaml | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 chrome-extension/pnpm-workspace.yaml diff --git a/chrome-extension/pnpm-workspace.yaml b/chrome-extension/pnpm-workspace.yaml new file mode 100644 index 0000000..663e57c --- /dev/null +++ b/chrome-extension/pnpm-workspace.yaml @@ -0,0 +1,4 @@ +allowBuilds: + esbuild: true + +trustPolicy: no-downgrade From d6d517aabec4d3de9ec010005190d4cbb78cdc64 Mon Sep 17 00:00:00 2001 From: ano3 Date: Sun, 24 May 2026 08:43:15 +0900 Subject: [PATCH 3/5] =?UTF-8?q?ci:=20ci=E3=81=AEpnpm=E3=81=AE=E3=82=A2?= =?UTF-8?q?=E3=83=83=E3=83=97=E3=83=87=E3=83=BC=E3=83=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/images/Dockerfile.node | 2 +- .github/workflows/images/Dockerfile.playwright | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/images/Dockerfile.node b/.github/workflows/images/Dockerfile.node index 3fbeebc..244ebe4 100644 --- a/.github/workflows/images/Dockerfile.node +++ b/.github/workflows/images/Dockerfile.node @@ -26,4 +26,4 @@ RUN echo "deb [signed-by=/usr/share/keyrings/cloud.google.gpg] https://packages. && rm -rf /var/lib/apt/lists/* # flake.nix/devShellと揃えるため、pnpmを有効化 -RUN corepack enable && corepack prepare pnpm@10.10.0 --activate +RUN corepack enable && corepack prepare pnpm@11.1.2 --activate diff --git a/.github/workflows/images/Dockerfile.playwright b/.github/workflows/images/Dockerfile.playwright index e6a1fb5..f7e0aa4 100644 --- a/.github/workflows/images/Dockerfile.playwright +++ b/.github/workflows/images/Dockerfile.playwright @@ -15,7 +15,7 @@ RUN curl -fsSL https://deb.nodesource.com/setup_24.x -o nodesource_setup.sh \ && rm -rf /var/lib/apt/lists/* # flake.nix/devShellと揃えるため、pnpmを有効化 -RUN corepack enable && corepack prepare pnpm@10.10.0 --activate +RUN corepack enable && corepack prepare pnpm@11.1.2 --activate # Playwright環境変数の設定 ENV PLAYWRIGHT_BROWSERS_PATH=/ms-playwright From ebf19efb815d10f6c88a4b836bf1062dd7551bfd Mon Sep 17 00:00:00 2001 From: ano3 Date: Sun, 24 May 2026 09:27:48 +0900 Subject: [PATCH 4/5] =?UTF-8?q?ci:=20GitHub=20Actions=E7=94=A8=E3=81=AE?= =?UTF-8?q?=E3=82=A4=E3=83=A1=E3=83=BC=E3=82=B8=E3=81=A7pnpm=E3=82=92?= =?UTF-8?q?=E4=BD=BF=E7=94=A8=E3=81=99=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/README.md | 11 +++++----- .github/workflows/build-chromeex/action.yaml | 4 ++-- .../workflows/images/Dockerfile.playwright | 21 ++++++------------- .github/workflows/test-chromeex/action.yaml | 4 ++-- 4 files changed, 15 insertions(+), 25 deletions(-) diff --git a/.github/workflows/README.md b/.github/workflows/README.md index 0b3f007..1930219 100644 --- a/.github/workflows/README.md +++ b/.github/workflows/README.md @@ -26,7 +26,7 @@ GitHub Actionsの実行時間短縮を目的として、Node.jsとPlaywrightが **基盤**: Ubuntu 24.04 LTS **Node.js**: v24 (flake.nixの`nodejs_24`に準拠) **追加パッケージ**: curl, unzip, git, google-cloud-cli(gcloud / gsutil) -**パッケージ管理**: pnpm 10.10.0(corepack経由) +**パッケージ管理**: pnpm(corepack経由) **用途**: @@ -39,13 +39,13 @@ GitHub Actionsの実行時間短縮を目的として、Node.jsとPlaywrightが **Node.js**: v24 (flake.nixの`nodejs_24`に準拠) **Playwright**: プリインストール(ブラウザ込み) **追加パッケージ**: curl, git -**パッケージ管理**: pnpm 10.10.0(corepack経由) +**パッケージ管理**: pnpm(corepack経由) **特徴**: - Playwright関連依存関係を事前インストール - ブラウザバイナリ(Chromium)を含有 -- `npx playwright install --with-deps`実行済み +- `pnpm exec playwright install --with-deps`実行済み **用途**: @@ -62,12 +62,11 @@ GitHub Actionsの実行時間短縮を目的として、Node.jsとPlaywrightが ```bash # Node.jsイメージのビルド -cd .github/workflows/images -docker build -f Dockerfile.node -t ghcr.io/ano333333/ongeki-score-fetch/node:24.04 . +docker build -f .github/workflows/images/Dockerfile.node -t ghcr.io/ano333333/ongeki-score-fetch/node:24.04 . docker push ghcr.io/ano333333/ongeki-score-fetch/node:24.04 # Playwrightイメージのビルド -docker build -f Dockerfile.playwright -t ghcr.io/ano333333/ongeki-score-fetch/playwright:24.04 . +docker build -f .github/workflows/images/Dockerfile.playwright -t ghcr.io/ano333333/ongeki-score-fetch/playwright:24.04 . docker push ghcr.io/ano333333/ongeki-score-fetch/playwright:24.04 ``` diff --git a/.github/workflows/build-chromeex/action.yaml b/.github/workflows/build-chromeex/action.yaml index 4551a2c..a17b14b 100644 --- a/.github/workflows/build-chromeex/action.yaml +++ b/.github/workflows/build-chromeex/action.yaml @@ -27,7 +27,7 @@ runs: working-directory: ./chrome-extension shell: bash run: | - npm install + pnpm install --frozen-lockfile - name: Build id: build @@ -35,7 +35,7 @@ runs: shell: bash continue-on-error: true run: | - npm run build + pnpm run build - name: Set result id: set-result diff --git a/.github/workflows/images/Dockerfile.playwright b/.github/workflows/images/Dockerfile.playwright index f7e0aa4..e44f5d5 100644 --- a/.github/workflows/images/Dockerfile.playwright +++ b/.github/workflows/images/Dockerfile.playwright @@ -20,27 +20,18 @@ RUN corepack enable && corepack prepare pnpm@11.1.2 --activate # Playwright環境変数の設定 ENV PLAYWRIGHT_BROWSERS_PATH=/ms-playwright -# 最小限のNodeプロジェクトを作成 +# chrome-extension の依存関係を使って Playwright をインストール WORKDIR /opt/playwright-project -# package.jsonを作成 -RUN echo '{\ - "name": "playwright-container",\ - "version": "1.0.0",\ - "type": "module",\ - "devDependencies": {\ - "@vitest/browser": "^3.1.4",\ - "playwright": "^1.52.0",\ - "vitest": "^3.1.4",\ - "vitest-browser-vue": "^0.2.0"\ - }\ -}' > package.json +COPY chrome-extension/package.json ./ +COPY chrome-extension/pnpm-lock.yaml ./ +COPY chrome-extension/pnpm-workspace.yaml ./ # 依存関係のインストール -RUN npm install +RUN pnpm install --frozen-lockfile # Playwrightブラウザのインストール(chromiumを明示的に指定) -RUN npx playwright install chromium --with-deps +RUN pnpm exec playwright install chromium --with-deps # プロジェクトディレクトリを削除(ブラウザはグローバルにインストール済み) RUN rm -rf /opt/playwright-project diff --git a/.github/workflows/test-chromeex/action.yaml b/.github/workflows/test-chromeex/action.yaml index afd3106..eba28e4 100644 --- a/.github/workflows/test-chromeex/action.yaml +++ b/.github/workflows/test-chromeex/action.yaml @@ -27,7 +27,7 @@ runs: working-directory: ./chrome-extension shell: bash run: | - npm install + pnpm install --frozen-lockfile - name: Test id: test @@ -35,7 +35,7 @@ runs: shell: bash continue-on-error: true run: | - npm run test:ci + pnpm run test:ci - name: Set result id: set-result From c3058a99541219359b4932ba3bdd18e7d321f89f Mon Sep 17 00:00:00 2001 From: ano3 Date: Sun, 24 May 2026 09:39:52 +0900 Subject: [PATCH 5/5] =?UTF-8?q?ci:=20gcp=E5=81=B4=E3=81=AE=E3=82=A4?= =?UTF-8?q?=E3=83=A1=E3=83=BC=E3=82=B8=E3=81=A7=E3=81=AEpnpm=E4=BD=BF?= =?UTF-8?q?=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- gcp/sheet-scraper/Dockerfile | 2 +- gcp/sheet-scraper/package.json | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/gcp/sheet-scraper/Dockerfile b/gcp/sheet-scraper/Dockerfile index 0585e1b..6602f5b 100644 --- a/gcp/sheet-scraper/Dockerfile +++ b/gcp/sheet-scraper/Dockerfile @@ -4,11 +4,11 @@ RUN apt-get update RUN apt-get install -y curl RUN curl -fsSL https://deb.nodesource.com/setup_22.x -o nodesource_setup.sh RUN bash nodesource_setup.sh +RUN corepack enable && corepack prepare pnpm@11.1.2 --activate RUN mkdir /usr/src/app WORKDIR /usr/src/app COPY ./package.json ./ COPY ./pnpm-lock.yaml ./ -RUN npm install -g pnpm RUN pnpm i --frozen-lockfile COPY ./codes ./codes diff --git a/gcp/sheet-scraper/package.json b/gcp/sheet-scraper/package.json index 4bd16b8..88dc1b7 100644 --- a/gcp/sheet-scraper/package.json +++ b/gcp/sheet-scraper/package.json @@ -4,7 +4,7 @@ "description": "", "main": "codes/index.js", "scripts": { - "build": "npx tsc", + "build": "tsc", "dev": "node --env-file .env -r ts-node/register codes/index.ts", "test": "jest" }, @@ -13,7 +13,7 @@ "nodeVersion": "22.15.0" } }, - "packageManager": "pnpm@10.10.0", + "packageManager": "pnpm@11.1.2", "author": "", "license": "ISC", "devDependencies": {