Release version: masaominn.github.io
Use Node.js 24 and pnpm 11.16.0, matching the deployment workflow.
pnpm install --frozen-lockfileinstalls the recorded dependencies.pnpm typecheckchecks types with TypeScript 7.pnpm buildbuilds the static site intoout/.pnpm lintruns ESLint againstsrc/.
The homepage uses a separate Cloudflare Worker and D1 database in
workers/site-metrics. D1 counts one homepage visit per anonymous browser and
Shanghai calendar day, and stores one like per project, browser, and day.
The visit response includes Cloudflare's approximate country, region, and city
for the homepage greeting. It does not store that location or browser details.
Deploy the Worker update for location text to appear on the live site.
For local D1 development:
- Copy
.env.exampleto.env.local. - Run
pnpm metrics:migrate:localonce to create the local D1 tables. - Run
pnpm metrics:devalongsidepnpm dev.
Without the environment override, local frontend previews use the deployed Worker.
Production builds use the deployed site metrics Worker by default. Set
NEXT_PUBLIC_SITE_METRICS_API_URL only when a deployment needs to override that
endpoint.
The September 2026 dependency update uses current stable application packages.
ESLint stays on 9.39.5 because the React, import, and accessibility plugins used
by eslint-config-next do not yet declare ESLint 10 support. The newer lint
configuration reports existing source issues; upgrading dependencies does not
resolve those findings.
TypeScript uses the official side-by-side setup:
@typescript/native aliases TypeScript 7.0.2 and provides tsc, while
typescript aliases @typescript/typescript6 for tools such as typescript-eslint
that require the TypeScript 6 compiler API. Keep both aliases until those tools
support the new API.