From d0a6c6f510dcab0831bb0b45ca805f74a938ff49 Mon Sep 17 00:00:00 2001 From: concertypin <55056558+concertypin@users.noreply.github.com> Date: Mon, 3 Aug 2026 02:07:14 +0900 Subject: [PATCH 1/4] ci: standardize pnpm workflow setup (cherry picked from commit d1d9d1d64451f45cf70c21f4a4626e8f9e436ac2) --- .github/workflows/deploy.yml | 5 ++--- .github/workflows/lint.yml | 11 +++++++++-- .github/workflows/test.yml | 22 ++++++++++++++++++---- oxlint.config.ts | 3 +-- package.json | 2 +- pnpm-lock.yaml | 10 +++++----- 6 files changed, 36 insertions(+), 17 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 01a868b..772cd0e 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -23,12 +23,11 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 + - uses: pnpm/action-setup@v6 - uses: actions/setup-node@v4 with: node-version-file: package.json - - uses: pnpm/action-setup@v4 - with: - version: 10.17.1 + cache: pnpm - name: Install dependencies run: pnpm install --frozen-lockfile - id: pages diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 5fb1561..1dca877 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -10,8 +10,15 @@ jobs: - name: Checkout uses: actions/checkout@v4 - - name: Setup pnpm Environment - uses: concertypin/action/pnpm-install@master + - uses: pnpm/action-setup@v6 + + - uses: actions/setup-node@v4 + with: + node-version-file: package.json + cache: pnpm + + - name: Install dependencies + run: pnpm install --frozen-lockfile - name: Buildable test run: pnpm build diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 1045ccb..e64c2e6 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -18,8 +18,15 @@ jobs: steps: - uses: actions/checkout@v4 - - name: Setup pnpm Environment - uses: concertypin/action/pnpm-install@master + - uses: pnpm/action-setup@v6 + + - uses: actions/setup-node@v4 + with: + node-version-file: package.json + cache: pnpm + + - name: Install dependencies + run: pnpm install --frozen-lockfile - name: Run tests run: pnpm run test --reporter=blob --coverage.enabled --shard=${{ matrix.shardIndex }}/${{ matrix.shardTotal }} @@ -44,8 +51,15 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - name: Setup pnpm Environment - uses: concertypin/action/pnpm-install@master + - uses: pnpm/action-setup@v6 + + - uses: actions/setup-node@v4 + with: + node-version-file: package.json + cache: pnpm + + - name: Install dependencies + run: pnpm install --frozen-lockfile - name: Download blob reports from GitHub Actions Artifacts uses: actions/download-artifact@v4 diff --git a/oxlint.config.ts b/oxlint.config.ts index 1f94cd6..28edee6 100644 --- a/oxlint.config.ts +++ b/oxlint.config.ts @@ -1,7 +1,6 @@ import { defineConfig } from "oxlint"; import frontendConfig from "@concertypin/config/oxlint/frontend"; import reactConfig from "./scripts/linter/oxlint-react.ts"; -import scriptsConfig from "@concertypin/config/oxlint/scripts"; export default defineConfig({ $schema: "./node_modules/oxlint/configuration_schema.json", @@ -24,5 +23,5 @@ export default defineConfig({ typeAware: true, typeCheck: true, }, - extends: [frontendConfig, reactConfig, scriptsConfig], + extends: [frontendConfig, reactConfig], }); diff --git a/package.json b/package.json index 3c19808..bdc3eed 100644 --- a/package.json +++ b/package.json @@ -29,7 +29,7 @@ "react-router-dom": "^7.18.1" }, "devDependencies": { - "@concertypin/config": "^0.1.2", + "@concertypin/config": "^0.2.0", "@tailwindcss/postcss": "^4.3.2", "@testing-library/dom": "^10.4.1", "@testing-library/jest-dom": "^6.9.1", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index c9b1b72..f9876d8 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -19,8 +19,8 @@ importers: version: 7.18.2(react-dom@19.2.8(react@19.2.8))(react@19.2.8) devDependencies: '@concertypin/config': - specifier: ^0.1.2 - version: 0.1.2(oxlint@1.76.0(oxlint-tsgolint@0.24.0)) + specifier: ^0.2.0 + version: 0.2.0(oxlint@1.76.0(oxlint-tsgolint@0.24.0)) '@tailwindcss/postcss': specifier: ^4.3.2 version: 4.3.3 @@ -132,8 +132,8 @@ packages: resolution: {integrity: sha512-ctxtJ/eA+t+6q2++vj5j7FYX3nRu311q1wfYH3xjlLOsczhlhxAg2FWNUXhpGvAw3BWo1xBcvOV6/YLc2r5FJw==} hasBin: true - '@concertypin/config@0.1.2': - resolution: {integrity: sha512-gNFRio/XcnbuBay96knzkmozbZF7T3VauNiYgMYTs1X+CwAgp4Huq8Jufmv5DdRTgJ9AgcZxvr+SxQttwILw7Q==} + '@concertypin/config@0.2.0': + resolution: {integrity: sha512-ezicM+Ia7NJ/d7FdSEvpWsvm6VPhrjGcP4JNQfFmdTBhqMgyry7aDaczKVlk70fpTq1E3FJ5tsL1pdVA9layxg==} engines: {node: '>=24'} peerDependencies: oxlint: '>=1.47.0 <2' @@ -1441,7 +1441,7 @@ snapshots: dependencies: css-tree: 3.2.1 - '@concertypin/config@0.1.2(oxlint@1.76.0(oxlint-tsgolint@0.24.0))': + '@concertypin/config@0.2.0(oxlint@1.76.0(oxlint-tsgolint@0.24.0))': dependencies: oxlint: 1.76.0(oxlint-tsgolint@0.24.0) From fbdb5ab023e373fbeb5a3ab75e55672ef84af090 Mon Sep 17 00:00:00 2001 From: concertypin <55056558+concertypin@users.noreply.github.com> Date: Mon, 3 Aug 2026 05:00:11 +0900 Subject: [PATCH 2/4] ci: consolidate pnpm workflow setup (cherry picked from commit 34b4f3f5a958e106f60ed59c7bd43f5df3978dd9) --- .github/actions/setup-pnpm/action.yml | 14 ++++++++++++++ .github/workflows/deploy.yml | 7 ++----- .github/workflows/lint.yml | 8 ++------ .github/workflows/test.yml | 16 ++++------------ 4 files changed, 22 insertions(+), 23 deletions(-) create mode 100644 .github/actions/setup-pnpm/action.yml diff --git a/.github/actions/setup-pnpm/action.yml b/.github/actions/setup-pnpm/action.yml new file mode 100644 index 0000000..b5ea6cb --- /dev/null +++ b/.github/actions/setup-pnpm/action.yml @@ -0,0 +1,14 @@ +name: Set up pnpm and Node.js +description: Install pnpm and set up Node.js with a pnpm dependency cache from package.json. + +runs: + using: composite + steps: + - name: Set up pnpm + uses: pnpm/action-setup@v6 + + - name: Set up Node.js with pnpm cache + uses: actions/setup-node@v4 + with: + node-version-file: package.json + cache: pnpm diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 772cd0e..4f35590 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -23,11 +23,8 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - uses: pnpm/action-setup@v6 - - uses: actions/setup-node@v4 - with: - node-version-file: package.json - cache: pnpm + - name: Set up pnpm and Node.js + uses: ./.github/actions/setup-pnpm - name: Install dependencies run: pnpm install --frozen-lockfile - id: pages diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 1dca877..b2f5bb7 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -10,12 +10,8 @@ jobs: - name: Checkout uses: actions/checkout@v4 - - uses: pnpm/action-setup@v6 - - - uses: actions/setup-node@v4 - with: - node-version-file: package.json - cache: pnpm + - name: Set up pnpm and Node.js + uses: ./.github/actions/setup-pnpm - name: Install dependencies run: pnpm install --frozen-lockfile diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index e64c2e6..9bf398c 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -18,12 +18,8 @@ jobs: steps: - uses: actions/checkout@v4 - - uses: pnpm/action-setup@v6 - - - uses: actions/setup-node@v4 - with: - node-version-file: package.json - cache: pnpm + - name: Set up pnpm and Node.js + uses: ./.github/actions/setup-pnpm - name: Install dependencies run: pnpm install --frozen-lockfile @@ -51,12 +47,8 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - uses: pnpm/action-setup@v6 - - - uses: actions/setup-node@v4 - with: - node-version-file: package.json - cache: pnpm + - name: Set up pnpm and Node.js + uses: ./.github/actions/setup-pnpm - name: Install dependencies run: pnpm install --frozen-lockfile From 14ac9eb71ee9e287f8287ff0bae2797a21dfdc8e Mon Sep 17 00:00:00 2001 From: concertypin <55056558+concertypin@users.noreply.github.com> Date: Tue, 4 Aug 2026 03:00:08 +0900 Subject: [PATCH 3/4] chore: make project check apply fixes --- README.md | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 684eb79..cf7e123 100644 --- a/README.md +++ b/README.md @@ -23,7 +23,7 @@ Then install the dependencies: pnpm install ``` -`postinstall` registers the git hooks (via `simple-git-hooks`), so run `pnpm install` before your first commit. The pre-commit hook runs the non-mutating `check` script (formatting, lint, and tests); when it fails, apply fixes with `pnpm format` and `pnpm lint`. +`postinstall` registers the git hooks (via `simple-git-hooks`), so run `pnpm install` before your first commit. The pre-commit hook runs `pnpm check`, which formats the project, applies lint fixes, and then runs the tests. ## Conventions and Rules diff --git a/package.json b/package.json index bdc3eed..4cf10b7 100644 --- a/package.json +++ b/package.json @@ -17,7 +17,7 @@ "lint:check": "oxlint .", "postinstall": "pnpm exec simple-git-hooks", "preview": "vite preview", - "check": "pnpm run format:check && pnpm run lint:check && pnpm run test", + "check": "pnpm run format && pnpm run lint && pnpm run test", "test": "vitest run" }, "engines": { From a52681fada7124bab96b8afe26ab4f33eb2d3e4a Mon Sep 17 00:00:00 2001 From: concertypin <55056558+concertypin@users.noreply.github.com> Date: Tue, 4 Aug 2026 17:00:03 +0900 Subject: [PATCH 4/4] fix: use relative asset base for subpath hosting --- README.md | 11 ++++++----- vite.config.ts | 2 +- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index cf7e123..bb44ffc 100644 --- a/README.md +++ b/README.md @@ -40,11 +40,12 @@ This project follows specific conventions and rules for code style, data validat Deploy the `dist/` output over HTTP(S). The included deploy workflow (`.github/workflows/deploy.yml`) builds with the GitHub Pages base path and publishes the result as a GitHub Pages site. A plain `pnpm build` emits -root-absolute asset URLs (`base: "/"`), so that output serves correctly from a -domain root — a GitHub Pages user site or a custom domain — or via -`pnpm preview`. For a GitHub Pages project site under a subpath -(`https://.github.io//`), rebuild with a matching base, e.g. -`pnpm build --base "//"`, before deploying `dist/`. +relative asset URLs, so that output serves correctly from a domain root, a +GitHub Pages project site subpath (`https://.github.io//`), or via +`pnpm preview`. For History API routing below the domain root, rebuild with the +site's absolute base path, e.g. `pnpm build --base "//"`, before +deploying `dist/`, so the router links and the `404.html` fallback shell +resolve against the real mount path. This template uses clean `BrowserRouter` URLs. GitHub Pages serves the SPA-bearing `404.html` for a refresh or direct visit to a client route, so React diff --git a/vite.config.ts b/vite.config.ts index e34f53b..2a81265 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -50,7 +50,7 @@ const testConfig: Config["test"] = { }; export default defineConfig({ - base: "/", + base: "./", build: { outDir: "dist", rolldownOptions: {