From 82af7d05bec492bf40c3c6e0c046446041529ac0 Mon Sep 17 00:00:00 2001 From: Siz Long Date: Sun, 2 Nov 2025 15:34:25 +0800 Subject: [PATCH 1/3] =?UTF-8?q?feat:=20=E6=B7=BB=E5=8A=A0zod=E4=BD=9C?= =?UTF-8?q?=E4=B8=BA=E8=84=9A=E6=9C=AC=E9=AA=8C=E8=AF=81=EF=BC=8C=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0unit=20test?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/content-check.yml | 4 + .husky/pre-commit | 5 +- app/components/ActivityTicker.tsx | 18 +- app/types/event.ts | 62 ++- package.json | 5 +- pnpm-lock.yaml | 683 ++++++++++++++++++++++++++-- tests/activity-events.test.ts | 11 + vitest.config.mts | 13 + 8 files changed, 739 insertions(+), 62 deletions(-) create mode 100644 tests/activity-events.test.ts create mode 100644 vitest.config.mts diff --git a/.github/workflows/content-check.yml b/.github/workflows/content-check.yml index 219795d4..74f7e3dc 100644 --- a/.github/workflows/content-check.yml +++ b/.github/workflows/content-check.yml @@ -7,6 +7,8 @@ on: - "**/*.mdx" - "source.config.ts" - "app/docs/**" + - "data/**" + - "tests/**" - "lib/source.ts" - "mdx-components.tsx" - "package.json" @@ -35,6 +37,8 @@ jobs: cache: "pnpm" - run: pnpm install --frozen-lockfile + - name: Run tests + run: pnpm test # Non-blocking image migration + lint (visibility only) - name: Migrate images next to MDX (check only) run: pnpm migrate:images || echo "[warn] migrate:images failed (non-blocking)" diff --git a/.husky/pre-commit b/.husky/pre-commit index a2aca1f7..56a93d67 100644 --- a/.husky/pre-commit +++ b/.husky/pre-commit @@ -7,5 +7,8 @@ git add -A # 2) 校验图片路径与命名(不合规则阻止提交) pnpm lint:images || exit 1 -# 3) 其余按 lint-staged 处理(如 Prettier) +# 3) 运行 Vitest,确保配置校验通过 +pnpm test || exit 1 + +# 4) 其余按 lint-staged 处理(如 Prettier) pnpm exec lint-staged diff --git a/app/components/ActivityTicker.tsx b/app/components/ActivityTicker.tsx index acb26ef2..567dd7c2 100644 --- a/app/components/ActivityTicker.tsx +++ b/app/components/ActivityTicker.tsx @@ -4,17 +4,19 @@ import Image from "next/image"; import Link from "next/link"; import { useCallback, useEffect, useMemo, useState } from "react"; import { ChevronLeft, ChevronRight } from "lucide-react"; -import eventsData from "@/data/event.json"; -import type { ActivityEvent, ActivityEventsConfig } from "@/app/types/event"; +import { + activityEventsConfig, + type ActivityEvent, + type ActivityTickerSettings, +} from "@/app/types/event"; import { cn } from "@/lib/utils"; +const { events: rawEvents, settings } = activityEventsConfig; + const { - events: rawEvents, - settings: { - maxItems: configuredMaxItems = 3, - rotationIntervalMs: configuredRotationIntervalMs = 8000, - }, -} = eventsData as ActivityEventsConfig; + maxItems: configuredMaxItems = 3, + rotationIntervalMs: configuredRotationIntervalMs = 8000, +}: ActivityTickerSettings = settings; // 默认配置,从data/event.json中读取配置 const MAX_ITEMS = configuredMaxItems; diff --git a/app/types/event.ts b/app/types/event.ts index ef2a48c6..fb18ec48 100644 --- a/app/types/event.ts +++ b/app/types/event.ts @@ -1,34 +1,48 @@ -/** - * @description: 活动横幅所需要的类型 - * @param name 活动名称 - * @param discord discord活动链接 - * @param playback 回放链接 - * @param coverUrl 封面地址 - * @param deprecated 是否已经结束 - */ -export interface ActivityEvent { +import { z } from "zod"; +import eventsJson from "@/data/event.json"; + +export const ActivityEventSchema = z.object({ /** 活动名称,用于轮播标题 */ - name: string; + name: z.string().min(1, "name 不能为空"), /** Discord 活动入口链接 */ - discord: string; + discord: z.string().min(1, "discord 入口不能为空"), /** 活动回放链接,deprecated 为 true 时展示 */ - playback?: string; + playback: z.string().min(1, "playback 链接不能为空").optional(), /** 活动封面,可以是静态资源相对路径或完整 URL */ - coverUrl: string; + coverUrl: z.string().min(1, "coverUrl 不能为空"), /** 是否为已结束活动,true 时展示 Playback 按钮 */ - deprecated: boolean; -} + deprecated: z.boolean(), +}); -/** 活动轮播可配置参数 */ -export interface ActivityTickerSettings { +export const ActivityTickerSettingsSchema = z.object({ /** 首屏最多展示的活动数量 */ - maxItems: number; + maxItems: z.number().int().positive("maxItems 需要为正整数"), /** 自动轮播的间隔时间(毫秒) */ - rotationIntervalMs: number; -} + rotationIntervalMs: z + .number() + .int() + .positive("rotationIntervalMs 需要为正整数"), +}); + +export const ActivityEventsConfigSchema = z.object({ + settings: ActivityTickerSettingsSchema, + events: z.array(ActivityEventSchema), +}); -/** event.json 的整体结构 */ -export interface ActivityEventsConfig { - settings: ActivityTickerSettings; - events: ActivityEvent[]; +type ActivityEvent = z.infer; +type ActivityTickerSettings = z.infer; +type ActivityEventsConfig = z.infer; + +const parsedEventsConfig = ActivityEventsConfigSchema.safeParse(eventsJson); + +if (!parsedEventsConfig.success) { + const issueMessages = parsedEventsConfig.error.issues + .map((issue) => `- ${issue.path.join(".") || "(root)"}: ${issue.message}`) + .join("\n"); + throw new Error(`event.json 配置不合法:\n${issueMessages}`); } + +export const activityEventsConfig: ActivityEventsConfig = + parsedEventsConfig.data; + +export type { ActivityEvent, ActivityEventsConfig, ActivityTickerSettings }; diff --git a/package.json b/package.json index 82da4099..a6bf93d2 100644 --- a/package.json +++ b/package.json @@ -7,6 +7,8 @@ "prebuild": "node scripts/escape-angles.mjs", "build": "next build", "start": "next start -p 3000", + "test": "vitest run", + "test:watch": "vitest", "postinstall": "fumadocs-mdx", "prepare": "husky", "lint:images": "node scripts/check-images.mjs", @@ -90,7 +92,8 @@ "tw-animate-css": "^1.3.8", "typescript": "^5.9.2", "typescript-eslint": "^8.46.2", - "vercel": "^48.1.0" + "vercel": "^48.1.0", + "vitest": "^4.0.6" }, "lint-staged": { "**/*": "prettier --write --ignore-unknown" diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index b63bccec..fed30c1c 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -99,7 +99,7 @@ importers: version: 15.7.13(@types/react@19.1.13)(next@15.5.3(@babel/core@7.28.5)(@opentelemetry/api@1.9.0)(react-dom@19.1.1(react@19.1.1))(react@19.1.1))(react-dom@19.1.1(react@19.1.1))(react@19.1.1) fumadocs-mdx: specifier: ^11.10.1 - version: 11.10.1(fumadocs-core@15.7.13(@types/react@19.1.13)(next@15.5.3(@babel/core@7.28.5)(@opentelemetry/api@1.9.0)(react-dom@19.1.1(react@19.1.1))(react@19.1.1))(react-dom@19.1.1(react@19.1.1))(react@19.1.1))(next@15.5.3(@babel/core@7.28.5)(@opentelemetry/api@1.9.0)(react-dom@19.1.1(react@19.1.1))(react@19.1.1))(react@19.1.1) + version: 11.10.1(fumadocs-core@15.7.13(@types/react@19.1.13)(next@15.5.3(@babel/core@7.28.5)(@opentelemetry/api@1.9.0)(react-dom@19.1.1(react@19.1.1))(react@19.1.1))(react-dom@19.1.1(react@19.1.1))(react@19.1.1))(next@15.5.3(@babel/core@7.28.5)(@opentelemetry/api@1.9.0)(react-dom@19.1.1(react@19.1.1))(react@19.1.1))(react@19.1.1)(vite@7.1.12(@types/node@24.5.2)(jiti@2.5.1)(lightningcss@1.30.1)(yaml@2.8.1)) fumadocs-ui: specifier: ^15.7.13 version: 15.7.13(@types/react-dom@19.1.9(@types/react@19.1.13))(@types/react@19.1.13)(next@15.5.3(@babel/core@7.28.5)(@opentelemetry/api@1.9.0)(react-dom@19.1.1(react@19.1.1))(react@19.1.1))(react-dom@19.1.1(react@19.1.1))(react@19.1.1)(tailwindcss@4.1.13) @@ -220,7 +220,10 @@ importers: version: 8.46.2(eslint@9.36.0(jiti@2.5.1))(typescript@5.9.2) vercel: specifier: ^48.1.0 - version: 48.1.0 + version: 48.1.0(rollup@4.52.5) + vitest: + specifier: ^4.0.6 + version: 4.0.6(@edge-runtime/vm@3.2.0)(@types/debug@4.1.12)(@types/node@24.5.2)(jiti@2.5.1)(lightningcss@1.30.1)(yaml@2.8.1) packages: "@ai-sdk/gateway@1.0.25": @@ -2174,6 +2177,182 @@ packages: rollup: optional: true + "@rollup/rollup-android-arm-eabi@4.52.5": + resolution: + { + integrity: sha512-8c1vW4ocv3UOMp9K+gToY5zL2XiiVw3k7f1ksf4yO1FlDFQ1C2u72iACFnSOceJFsWskc2WZNqeRhFRPzv+wtQ==, + } + cpu: [arm] + os: [android] + + "@rollup/rollup-android-arm64@4.52.5": + resolution: + { + integrity: sha512-mQGfsIEFcu21mvqkEKKu2dYmtuSZOBMmAl5CFlPGLY94Vlcm+zWApK7F/eocsNzp8tKmbeBP8yXyAbx0XHsFNA==, + } + cpu: [arm64] + os: [android] + + "@rollup/rollup-darwin-arm64@4.52.5": + resolution: + { + integrity: sha512-takF3CR71mCAGA+v794QUZ0b6ZSrgJkArC+gUiG6LB6TQty9T0Mqh3m2ImRBOxS2IeYBo4lKWIieSvnEk2OQWA==, + } + cpu: [arm64] + os: [darwin] + + "@rollup/rollup-darwin-x64@4.52.5": + resolution: + { + integrity: sha512-W901Pla8Ya95WpxDn//VF9K9u2JbocwV/v75TE0YIHNTbhqUTv9w4VuQ9MaWlNOkkEfFwkdNhXgcLqPSmHy0fA==, + } + cpu: [x64] + os: [darwin] + + "@rollup/rollup-freebsd-arm64@4.52.5": + resolution: + { + integrity: sha512-QofO7i7JycsYOWxe0GFqhLmF6l1TqBswJMvICnRUjqCx8b47MTo46W8AoeQwiokAx3zVryVnxtBMcGcnX12LvA==, + } + cpu: [arm64] + os: [freebsd] + + "@rollup/rollup-freebsd-x64@4.52.5": + resolution: + { + integrity: sha512-jr21b/99ew8ujZubPo9skbrItHEIE50WdV86cdSoRkKtmWa+DDr6fu2c/xyRT0F/WazZpam6kk7IHBerSL7LDQ==, + } + cpu: [x64] + os: [freebsd] + + "@rollup/rollup-linux-arm-gnueabihf@4.52.5": + resolution: + { + integrity: sha512-PsNAbcyv9CcecAUagQefwX8fQn9LQ4nZkpDboBOttmyffnInRy8R8dSg6hxxl2Re5QhHBf6FYIDhIj5v982ATQ==, + } + cpu: [arm] + os: [linux] + + "@rollup/rollup-linux-arm-musleabihf@4.52.5": + resolution: + { + integrity: sha512-Fw4tysRutyQc/wwkmcyoqFtJhh0u31K+Q6jYjeicsGJJ7bbEq8LwPWV/w0cnzOqR2m694/Af6hpFayLJZkG2VQ==, + } + cpu: [arm] + os: [linux] + + "@rollup/rollup-linux-arm64-gnu@4.52.5": + resolution: + { + integrity: sha512-a+3wVnAYdQClOTlyapKmyI6BLPAFYs0JM8HRpgYZQO02rMR09ZcV9LbQB+NL6sljzG38869YqThrRnfPMCDtZg==, + } + cpu: [arm64] + os: [linux] + + "@rollup/rollup-linux-arm64-musl@4.52.5": + resolution: + { + integrity: sha512-AvttBOMwO9Pcuuf7m9PkC1PUIKsfaAJ4AYhy944qeTJgQOqJYJ9oVl2nYgY7Rk0mkbsuOpCAYSs6wLYB2Xiw0Q==, + } + cpu: [arm64] + os: [linux] + + "@rollup/rollup-linux-loong64-gnu@4.52.5": + resolution: + { + integrity: sha512-DkDk8pmXQV2wVrF6oq5tONK6UHLz/XcEVow4JTTerdeV1uqPeHxwcg7aFsfnSm9L+OO8WJsWotKM2JJPMWrQtA==, + } + cpu: [loong64] + os: [linux] + + "@rollup/rollup-linux-ppc64-gnu@4.52.5": + resolution: + { + integrity: sha512-W/b9ZN/U9+hPQVvlGwjzi+Wy4xdoH2I8EjaCkMvzpI7wJUs8sWJ03Rq96jRnHkSrcHTpQe8h5Tg3ZzUPGauvAw==, + } + cpu: [ppc64] + os: [linux] + + "@rollup/rollup-linux-riscv64-gnu@4.52.5": + resolution: + { + integrity: sha512-sjQLr9BW7R/ZiXnQiWPkErNfLMkkWIoCz7YMn27HldKsADEKa5WYdobaa1hmN6slu9oWQbB6/jFpJ+P2IkVrmw==, + } + cpu: [riscv64] + os: [linux] + + "@rollup/rollup-linux-riscv64-musl@4.52.5": + resolution: + { + integrity: sha512-hq3jU/kGyjXWTvAh2awn8oHroCbrPm8JqM7RUpKjalIRWWXE01CQOf/tUNWNHjmbMHg/hmNCwc/Pz3k1T/j/Lg==, + } + cpu: [riscv64] + os: [linux] + + "@rollup/rollup-linux-s390x-gnu@4.52.5": + resolution: + { + integrity: sha512-gn8kHOrku8D4NGHMK1Y7NA7INQTRdVOntt1OCYypZPRt6skGbddska44K8iocdpxHTMMNui5oH4elPH4QOLrFQ==, + } + cpu: [s390x] + os: [linux] + + "@rollup/rollup-linux-x64-gnu@4.52.5": + resolution: + { + integrity: sha512-hXGLYpdhiNElzN770+H2nlx+jRog8TyynpTVzdlc6bndktjKWyZyiCsuDAlpd+j+W+WNqfcyAWz9HxxIGfZm1Q==, + } + cpu: [x64] + os: [linux] + + "@rollup/rollup-linux-x64-musl@4.52.5": + resolution: + { + integrity: sha512-arCGIcuNKjBoKAXD+y7XomR9gY6Mw7HnFBv5Rw7wQRvwYLR7gBAgV7Mb2QTyjXfTveBNFAtPt46/36vV9STLNg==, + } + cpu: [x64] + os: [linux] + + "@rollup/rollup-openharmony-arm64@4.52.5": + resolution: + { + integrity: sha512-QoFqB6+/9Rly/RiPjaomPLmR/13cgkIGfA40LHly9zcH1S0bN2HVFYk3a1eAyHQyjs3ZJYlXvIGtcCs5tko9Cw==, + } + cpu: [arm64] + os: [openharmony] + + "@rollup/rollup-win32-arm64-msvc@4.52.5": + resolution: + { + integrity: sha512-w0cDWVR6MlTstla1cIfOGyl8+qb93FlAVutcor14Gf5Md5ap5ySfQ7R9S/NjNaMLSFdUnKGEasmVnu3lCMqB7w==, + } + cpu: [arm64] + os: [win32] + + "@rollup/rollup-win32-ia32-msvc@4.52.5": + resolution: + { + integrity: sha512-Aufdpzp7DpOTULJCuvzqcItSGDH73pF3ko/f+ckJhxQyHtp67rHw3HMNxoIdDMUITJESNE6a8uh4Lo4SLouOUg==, + } + cpu: [ia32] + os: [win32] + + "@rollup/rollup-win32-x64-gnu@4.52.5": + resolution: + { + integrity: sha512-UGBUGPFp1vkj6p8wCRraqNhqwX/4kNQPS57BCFc8wYh0g94iVIW33wJtQAx3G7vrjjNtRaxiMUylM0ktp/TRSQ==, + } + cpu: [x64] + os: [win32] + + "@rollup/rollup-win32-x64-msvc@4.52.5": + resolution: + { + integrity: sha512-TAcgQh2sSkykPRWLrdyy2AiceMckNf5loITqXxFI5VuQjS5tSuw3WlwdN8qv8vzjLAUTvYaH/mVjSFpbkFbpTg==, + } + cpu: [x64] + os: [win32] + "@rtsao/scc@1.1.0": resolution: { @@ -2440,12 +2619,24 @@ packages: integrity: sha512-9tTaPJLSiejZKx+Bmog4uSubteqTvFrVrURwkmHixBo0G4seD0zUxp98E1DzUBJxLQ3NPwXrGKDiVjwx/DpPsg==, } + "@types/chai@5.2.3": + resolution: + { + integrity: sha512-Mw558oeA9fFbv65/y4mHtXDs9bPnFMZAL/jxdPFUpOHHIXX91mcgEHbS5Lahr+pwZFR8A7GQleRWeI6cGFC2UA==, + } + "@types/debug@4.1.12": resolution: { integrity: sha512-vIChWdVG3LG1SMxEvI/AK+FWJthlrqlTu7fbrlywTkkaONwk/UAGaULXRlf8vkzFBLVm0zkMdCquhL5aOjhXPQ==, } + "@types/deep-eql@4.0.2": + resolution: + { + integrity: sha512-c9h9dVVMigMPc4bwTvC5dxqtqJZwQPePsWjPlpSOnojbor6pGqdk541lfA7AqFQr5pB1BRdq0juY9db81BwyFw==, + } + "@types/estree-jsx@1.0.5": resolution: { @@ -3054,6 +3245,56 @@ packages: integrity: sha512-2d+TXr6K30w86a+WbMbGm2W91O0UzO5VeemZYBBUJbCjk/5FLLGIi8aV6RS2+WmaRvtcqNTn2pUA7nCOK3bGcQ==, } + "@vitest/expect@4.0.6": + resolution: + { + integrity: sha512-5j8UUlBVhOjhj4lR2Nt9sEV8b4WtbcYh8vnfhTNA2Kn5+smtevzjNq+xlBuVhnFGXiyPPNzGrOVvmyHWkS5QGg==, + } + + "@vitest/mocker@4.0.6": + resolution: + { + integrity: sha512-3COEIew5HqdzBFEYN9+u0dT3i/NCwppLnO1HkjGfAP1Vs3vti1Hxm/MvcbC4DAn3Szo1M7M3otiAaT83jvqIjA==, + } + peerDependencies: + msw: ^2.4.9 + vite: ^6.0.0 || ^7.0.0-0 + peerDependenciesMeta: + msw: + optional: true + vite: + optional: true + + "@vitest/pretty-format@4.0.6": + resolution: + { + integrity: sha512-4vptgNkLIA1W1Nn5X4x8rLJBzPiJwnPc+awKtfBE5hNMVsoAl/JCCPPzNrbf+L4NKgklsis5Yp2gYa+XAS442g==, + } + + "@vitest/runner@4.0.6": + resolution: + { + integrity: sha512-trPk5qpd7Jj+AiLZbV/e+KiiaGXZ8ECsRxtnPnCrJr9OW2mLB72Cb824IXgxVz/mVU3Aj4VebY+tDTPn++j1Og==, + } + + "@vitest/snapshot@4.0.6": + resolution: + { + integrity: sha512-PaYLt7n2YzuvxhulDDu6c9EosiRuIE+FI2ECKs6yvHyhoga+2TBWI8dwBjs+IeuQaMtZTfioa9tj3uZb7nev1g==, + } + + "@vitest/spy@4.0.6": + resolution: + { + integrity: sha512-g9jTUYPV1LtRPRCQfhbMintW7BTQz1n6WXYQYRQ25qkyffA4bjVXjkROokZnv7t07OqfaFKw1lPzqKGk1hmNuQ==, + } + + "@vitest/utils@4.0.6": + resolution: + { + integrity: sha512-bG43VS3iYKrMIZXBo+y8Pti0O7uNju3KvNn6DrQWhQQKcLavMB+0NZfO1/QBAEbq0MaQ3QjNsnnXlGQvsh0Z6A==, + } + abbrev@3.0.1: resolution: { @@ -3264,6 +3505,13 @@ packages: } engines: { node: ">= 0.4" } + assertion-error@2.0.1: + resolution: + { + integrity: sha512-Izi8RQcffqCeNVgFigKli1ssklIbpHnCYc6AknXGYoB6grJqyeby7jv12JUQgmTAnIDnbck1uxksT4dzN3PWBA==, + } + engines: { node: ">=12" } + assistant-cloud@0.1.1: resolution: { @@ -3475,6 +3723,13 @@ packages: integrity: sha512-eyrF0jiFpY+3drT6383f1qhkbGsLSifNAjA61IUjZjmLCWjItY6LB9ft9YhoDgwfmclB2zhu51Lc7+95b8NRAg==, } + chai@6.2.0: + resolution: + { + integrity: sha512-aUTnJc/JipRzJrNADXVvpVqi6CO0dn3nx4EVPxijri+fj3LUUDyZQOgVeW54Ob3Y1Xh9Iz8f+CgaCl8v0mn9bA==, + } + engines: { node: ">=18" } + chalk@4.1.2: resolution: { @@ -4029,6 +4284,12 @@ packages: integrity: sha512-cXLGjP0c4T3flZJKQSuziYoq7MlT+rnvfZjfp7h+I7K9BNX54kP9nyWvdbwjQ4u1iWbOL4u96fgeZLToQlZC7w==, } + es-module-lexer@1.7.0: + resolution: + { + integrity: sha512-jEQoCwk8hyb2AZziIOLhDqpm5+2ww5uIE6lkO/6jcOCusfk6LhMHpXXfBLXTZ7Ydyt0j4VoUQv6uGNYbdW+kBA==, + } + es-object-atoms@1.1.1: resolution: { @@ -4562,6 +4823,13 @@ packages: } engines: { node: ">=18.0.0" } + expect-type@1.2.2: + resolution: + { + integrity: sha512-JhFGDVJ7tmDJItKhYgJCGLOWjuK9vPxiXoUFLwLDc99NlmklilbiQJwoctZtt13+xMw91MCk/REan6MWHqDjyA==, + } + engines: { node: ">=12.0.0" } + exsolve@1.0.7: resolution: { @@ -4735,6 +5003,14 @@ packages: } engines: { node: ">= 8" } + fsevents@2.3.3: + resolution: + { + integrity: sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==, + } + engines: { node: ^8.16.0 || ^10.6.0 || >=11.0.0 } + os: [darwin] + fumadocs-core@15.7.13: resolution: { @@ -7723,6 +7999,14 @@ packages: integrity: sha512-q1b3N5QkRUWUl7iyylaaj3kOpIT0N2i9MqIEQXP73GVsN9cw3fdx8X63cEmWhJGi2PPCF23Ijp7ktmd39rawIA==, } + rollup@4.52.5: + resolution: + { + integrity: sha512-3GuObel8h7Kqdjt0gxkEzaifHTqLVW56Y/bjN7PSQtkKr0w3V/QYSdt6QWYtd7A1xUtYQigtdUfgj1RvWVtorw==, + } + engines: { node: ">=18.0.0", npm: ">=8.0.0" } + hasBin: true + run-parallel@1.2.0: resolution: { @@ -7886,6 +8170,12 @@ packages: } engines: { node: ">= 0.4" } + siginfo@2.0.0: + resolution: + { + integrity: sha512-ybx0WO1/8bSBLEWXZvEd7gMW3Sn3JFlW3TvX1nREbDLRNQNaeNN8WK0meBwPdAaOI7TtRRRJn/Es1zhrrCHu7g==, + } + signal-exit@4.0.2: resolution: { @@ -7939,6 +8229,12 @@ packages: integrity: sha512-+L3ccpzibovGXFK+Ap/f8LOS0ahMrHTf3xu7mMLSpEGU0EO9ucaysSylKo9eRDFNhWve/y275iPmIZ4z39a9iA==, } + stackback@0.0.2: + resolution: + { + integrity: sha512-1XMJE5fQo1jGH6Y/7ebnwPOBEkIEnT4QF32d5R1+VXdXveM0IBMJt8zfaxX1P3QhVwrYe+576+jkANtSS2mBbw==, + } + stat-mode@0.3.0: resolution: { @@ -7952,6 +8248,12 @@ packages: } engines: { node: ">= 0.6" } + std-env@3.10.0: + resolution: + { + integrity: sha512-5GS12FdOZNliM5mAOxFRg7Ir0pWz8MdpYm6AY6VPkGpbA7ZzmbzNcBJQ0GPvvyWgcY7QAhCgf9Uy89I03faLkg==, + } + stop-iteration-iterator@1.1.0: resolution: { @@ -8204,6 +8506,12 @@ packages: } engines: { node: ">=10" } + tinybench@2.9.0: + resolution: + { + integrity: sha512-0+DUvqWMValLmha6lr4kD8iAMK1HzV0/aKnCtWb9v9641TnP/MFb7Pc2bxoxQjTXAErryXVgUOfv2YqNllqGeg==, + } + tinyexec@0.3.2: resolution: { @@ -8223,6 +8531,13 @@ packages: } engines: { node: ">=12.0.0" } + tinyrainbow@3.0.3: + resolution: + { + integrity: sha512-PSkbLUoxOFRzJYjjxHJt9xro7D+iilgMX/C9lawzVuYiIdcihh9DXmVibBe8lmcFrRi/VzlPjBxbN7rH24q8/Q==, + } + engines: { node: ">=14.0.0" } + to-regex-range@5.0.1: resolution: { @@ -8629,6 +8944,86 @@ packages: integrity: sha512-KzIbH/9tXat2u30jf+smMwFCsno4wHVdNmzFyL+T/L3UGqqk6JKfVqOFOZEpZSHADH1k40ab6NUIXZq422ov3Q==, } + vite@7.1.12: + resolution: + { + integrity: sha512-ZWyE8YXEXqJrrSLvYgrRP7p62OziLW7xI5HYGWFzOvupfAlrLvURSzv/FyGyy0eidogEM3ujU+kUG1zuHgb6Ug==, + } + engines: { node: ^20.19.0 || >=22.12.0 } + hasBin: true + peerDependencies: + "@types/node": ^20.19.0 || >=22.12.0 + jiti: ">=1.21.0" + less: ^4.0.0 + lightningcss: ^1.21.0 + sass: ^1.70.0 + sass-embedded: ^1.70.0 + stylus: ">=0.54.8" + sugarss: ^5.0.0 + terser: ^5.16.0 + tsx: ^4.8.1 + yaml: ^2.4.2 + peerDependenciesMeta: + "@types/node": + optional: true + jiti: + optional: true + less: + optional: true + lightningcss: + optional: true + sass: + optional: true + sass-embedded: + optional: true + stylus: + optional: true + sugarss: + optional: true + terser: + optional: true + tsx: + optional: true + yaml: + optional: true + + vitest@4.0.6: + resolution: + { + integrity: sha512-gR7INfiVRwnEOkCk47faros/9McCZMp5LM+OMNWGLaDBSvJxIzwjgNFufkuePBNaesGRnLmNfW+ddbUJRZn0nQ==, + } + engines: { node: ^20.0.0 || ^22.0.0 || >=24.0.0 } + hasBin: true + peerDependencies: + "@edge-runtime/vm": "*" + "@types/debug": ^4.1.12 + "@types/node": ^20.0.0 || ^22.0.0 || >=24.0.0 + "@vitest/browser-playwright": 4.0.6 + "@vitest/browser-preview": 4.0.6 + "@vitest/browser-webdriverio": 4.0.6 + "@vitest/ui": 4.0.6 + happy-dom: "*" + jsdom: "*" + peerDependenciesMeta: + "@edge-runtime/vm": + optional: true + "@types/debug": + optional: true + "@types/node": + optional: true + "@vitest/browser-playwright": + optional: true + "@vitest/browser-preview": + optional: true + "@vitest/browser-webdriverio": + optional: true + "@vitest/ui": + optional: true + happy-dom: + optional: true + jsdom: + optional: true + web-namespaces@2.0.1: resolution: { @@ -8689,6 +9084,14 @@ packages: engines: { node: ">= 8" } hasBin: true + why-is-node-running@2.3.0: + resolution: + { + integrity: sha512-hUrmaWBdVDcxvYqnyh09zunKzROWjbZTiNy8dBEjkS7ehEDQibXJ7XvlmtbwuTclUiIyN+CyXQD4Vmko8fNm8w==, + } + engines: { node: ">=8" } + hasBin: true + word-wrap@1.2.5: resolution: { @@ -10138,11 +10541,79 @@ snapshots: react: 19.1.1 react-dom: 19.1.1(react@19.1.1) - "@rollup/pluginutils@5.3.0": + "@rollup/pluginutils@5.3.0(rollup@4.52.5)": dependencies: "@types/estree": 1.0.8 estree-walker: 2.0.2 picomatch: 4.0.3 + optionalDependencies: + rollup: 4.52.5 + + "@rollup/rollup-android-arm-eabi@4.52.5": + optional: true + + "@rollup/rollup-android-arm64@4.52.5": + optional: true + + "@rollup/rollup-darwin-arm64@4.52.5": + optional: true + + "@rollup/rollup-darwin-x64@4.52.5": + optional: true + + "@rollup/rollup-freebsd-arm64@4.52.5": + optional: true + + "@rollup/rollup-freebsd-x64@4.52.5": + optional: true + + "@rollup/rollup-linux-arm-gnueabihf@4.52.5": + optional: true + + "@rollup/rollup-linux-arm-musleabihf@4.52.5": + optional: true + + "@rollup/rollup-linux-arm64-gnu@4.52.5": + optional: true + + "@rollup/rollup-linux-arm64-musl@4.52.5": + optional: true + + "@rollup/rollup-linux-loong64-gnu@4.52.5": + optional: true + + "@rollup/rollup-linux-ppc64-gnu@4.52.5": + optional: true + + "@rollup/rollup-linux-riscv64-gnu@4.52.5": + optional: true + + "@rollup/rollup-linux-riscv64-musl@4.52.5": + optional: true + + "@rollup/rollup-linux-s390x-gnu@4.52.5": + optional: true + + "@rollup/rollup-linux-x64-gnu@4.52.5": + optional: true + + "@rollup/rollup-linux-x64-musl@4.52.5": + optional: true + + "@rollup/rollup-openharmony-arm64@4.52.5": + optional: true + + "@rollup/rollup-win32-arm64-msvc@4.52.5": + optional: true + + "@rollup/rollup-win32-ia32-msvc@4.52.5": + optional: true + + "@rollup/rollup-win32-x64-gnu@4.52.5": + optional: true + + "@rollup/rollup-win32-x64-msvc@4.52.5": + optional: true "@rtsao/scc@1.1.0": {} @@ -10299,10 +10770,17 @@ snapshots: tslib: 2.8.1 optional: true + "@types/chai@5.2.3": + dependencies: + "@types/deep-eql": 4.0.2 + assertion-error: 2.0.1 + "@types/debug@4.1.12": dependencies: "@types/ms": 2.1.0 + "@types/deep-eql@4.0.2": {} + "@types/estree-jsx@1.0.5": dependencies: "@types/estree": 1.0.8 @@ -10624,9 +11102,9 @@ snapshots: "@vercel/error-utils@2.0.3": {} - "@vercel/express@0.0.17": + "@vercel/express@0.0.17(rollup@4.52.5)": dependencies: - "@vercel/node": 5.3.23 + "@vercel/node": 5.3.23(rollup@4.52.5) "@vercel/static-config": 3.1.2 ts-morph: 12.0.0 transitivePeerDependencies: @@ -10674,9 +11152,9 @@ snapshots: "@vercel/go@3.2.3": {} - "@vercel/h3@0.1.1": + "@vercel/h3@0.1.1(rollup@4.52.5)": dependencies: - "@vercel/node": 5.3.23 + "@vercel/node": 5.3.23(rollup@4.52.5) "@vercel/static-config": 3.1.2 transitivePeerDependencies: - "@swc/core" @@ -10685,9 +11163,9 @@ snapshots: - rollup - supports-color - "@vercel/hono@0.1.1": + "@vercel/hono@0.1.1(rollup@4.52.5)": dependencies: - "@vercel/node": 5.3.23 + "@vercel/node": 5.3.23(rollup@4.52.5) "@vercel/static-config": 3.1.2 ts-morph: 12.0.0 transitivePeerDependencies: @@ -10702,18 +11180,18 @@ snapshots: "@vercel/static-config": 3.1.2 ts-morph: 12.0.0 - "@vercel/next@4.12.6": + "@vercel/next@4.12.6(rollup@4.52.5)": dependencies: - "@vercel/nft": 0.30.1 + "@vercel/nft": 0.30.1(rollup@4.52.5) transitivePeerDependencies: - encoding - rollup - supports-color - "@vercel/nft@0.30.1": + "@vercel/nft@0.30.1(rollup@4.52.5)": dependencies: "@mapbox/node-pre-gyp": 2.0.0 - "@rollup/pluginutils": 5.3.0 + "@rollup/pluginutils": 5.3.0(rollup@4.52.5) acorn: 8.15.0 acorn-import-attributes: 1.9.5(acorn@8.15.0) async-sema: 3.1.1 @@ -10729,7 +11207,7 @@ snapshots: - rollup - supports-color - "@vercel/node@5.3.23": + "@vercel/node@5.3.23(rollup@4.52.5)": dependencies: "@edge-runtime/node-utils": 2.3.0 "@edge-runtime/primitives": 4.1.0 @@ -10737,7 +11215,7 @@ snapshots: "@types/node": 16.18.11 "@vercel/build-utils": 12.1.0 "@vercel/error-utils": 2.0.3 - "@vercel/nft": 0.30.1 + "@vercel/nft": 0.30.1(rollup@4.52.5) "@vercel/static-config": 3.1.2 async-listen: 3.0.0 cjs-module-lexer: 1.2.3 @@ -10762,9 +11240,9 @@ snapshots: "@vercel/python@5.0.5": {} - "@vercel/redwood@2.3.6": + "@vercel/redwood@2.3.6(rollup@4.52.5)": dependencies: - "@vercel/nft": 0.30.1 + "@vercel/nft": 0.30.1(rollup@4.52.5) "@vercel/static-config": 3.1.2 semver: 6.3.1 ts-morph: 12.0.0 @@ -10773,10 +11251,10 @@ snapshots: - rollup - supports-color - "@vercel/remix-builder@5.4.12": + "@vercel/remix-builder@5.4.12(rollup@4.52.5)": dependencies: "@vercel/error-utils": 2.0.3 - "@vercel/nft": 0.30.1 + "@vercel/nft": 0.30.1(rollup@4.52.5) "@vercel/static-config": 3.1.2 path-to-regexp: 6.1.0 path-to-regexp-updated: path-to-regexp@6.3.0 @@ -10806,6 +11284,45 @@ snapshots: json-schema-to-ts: 1.6.4 ts-morph: 12.0.0 + "@vitest/expect@4.0.6": + dependencies: + "@standard-schema/spec": 1.0.0 + "@types/chai": 5.2.3 + "@vitest/spy": 4.0.6 + "@vitest/utils": 4.0.6 + chai: 6.2.0 + tinyrainbow: 3.0.3 + + "@vitest/mocker@4.0.6(vite@7.1.12(@types/node@24.5.2)(jiti@2.5.1)(lightningcss@1.30.1)(yaml@2.8.1))": + dependencies: + "@vitest/spy": 4.0.6 + estree-walker: 3.0.3 + magic-string: 0.30.19 + optionalDependencies: + vite: 7.1.12(@types/node@24.5.2)(jiti@2.5.1)(lightningcss@1.30.1)(yaml@2.8.1) + + "@vitest/pretty-format@4.0.6": + dependencies: + tinyrainbow: 3.0.3 + + "@vitest/runner@4.0.6": + dependencies: + "@vitest/utils": 4.0.6 + pathe: 2.0.3 + + "@vitest/snapshot@4.0.6": + dependencies: + "@vitest/pretty-format": 4.0.6 + magic-string: 0.30.19 + pathe: 2.0.3 + + "@vitest/spy@4.0.6": {} + + "@vitest/utils@4.0.6": + dependencies: + "@vitest/pretty-format": 4.0.6 + tinyrainbow: 3.0.3 + abbrev@3.0.1: {} acorn-import-attributes@1.9.5(acorn@8.15.0): @@ -11003,6 +11520,8 @@ snapshots: get-intrinsic: 1.3.0 is-array-buffer: 3.0.5 + assertion-error@2.0.1: {} + assistant-cloud@0.1.1: dependencies: assistant-stream: 0.2.28 @@ -11122,6 +11641,8 @@ snapshots: ccount@2.0.1: {} + chai@6.2.0: {} + chalk@4.1.2: dependencies: ansi-styles: 4.3.0 @@ -11446,6 +11967,8 @@ snapshots: es-module-lexer@1.4.1: {} + es-module-lexer@1.7.0: {} + es-object-atoms@1.1.1: dependencies: es-errors: 1.3.0 @@ -11861,6 +12384,8 @@ snapshots: eventsource-parser@3.0.6: {} + expect-type@1.2.2: {} + exsolve@1.0.7: {} extend-shallow@2.0.1: @@ -11959,6 +12484,9 @@ snapshots: dependencies: minipass: 3.3.6 + fsevents@2.3.3: + optional: true + fumadocs-core@15.7.13(@types/react@19.1.13)(next@15.5.3(@babel/core@7.28.5)(@opentelemetry/api@1.9.0)(react-dom@19.1.1(react@19.1.1))(react@19.1.1))(react-dom@19.1.1(react@19.1.1))(react@19.1.1): dependencies: "@formatjs/intl-localematcher": 0.6.1 @@ -11986,7 +12514,7 @@ snapshots: transitivePeerDependencies: - supports-color - fumadocs-mdx@11.10.1(fumadocs-core@15.7.13(@types/react@19.1.13)(next@15.5.3(@babel/core@7.28.5)(@opentelemetry/api@1.9.0)(react-dom@19.1.1(react@19.1.1))(react@19.1.1))(react-dom@19.1.1(react@19.1.1))(react@19.1.1))(next@15.5.3(@babel/core@7.28.5)(@opentelemetry/api@1.9.0)(react-dom@19.1.1(react@19.1.1))(react@19.1.1))(react@19.1.1): + fumadocs-mdx@11.10.1(fumadocs-core@15.7.13(@types/react@19.1.13)(next@15.5.3(@babel/core@7.28.5)(@opentelemetry/api@1.9.0)(react-dom@19.1.1(react@19.1.1))(react@19.1.1))(react-dom@19.1.1(react@19.1.1))(react@19.1.1))(next@15.5.3(@babel/core@7.28.5)(@opentelemetry/api@1.9.0)(react-dom@19.1.1(react@19.1.1))(react@19.1.1))(react@19.1.1)(vite@7.1.12(@types/node@24.5.2)(jiti@2.5.1)(lightningcss@1.30.1)(yaml@2.8.1)): dependencies: "@mdx-js/mdx": 3.1.1 "@standard-schema/spec": 1.0.0 @@ -12007,6 +12535,7 @@ snapshots: optionalDependencies: next: 15.5.3(@babel/core@7.28.5)(@opentelemetry/api@1.9.0)(react-dom@19.1.1(react@19.1.1))(react@19.1.1) react: 19.1.1 + vite: 7.1.12(@types/node@24.5.2)(jiti@2.5.1)(lightningcss@1.30.1)(yaml@2.8.1) transitivePeerDependencies: - supports-color @@ -14200,6 +14729,34 @@ snapshots: rfdc@1.4.1: {} + rollup@4.52.5: + dependencies: + "@types/estree": 1.0.8 + optionalDependencies: + "@rollup/rollup-android-arm-eabi": 4.52.5 + "@rollup/rollup-android-arm64": 4.52.5 + "@rollup/rollup-darwin-arm64": 4.52.5 + "@rollup/rollup-darwin-x64": 4.52.5 + "@rollup/rollup-freebsd-arm64": 4.52.5 + "@rollup/rollup-freebsd-x64": 4.52.5 + "@rollup/rollup-linux-arm-gnueabihf": 4.52.5 + "@rollup/rollup-linux-arm-musleabihf": 4.52.5 + "@rollup/rollup-linux-arm64-gnu": 4.52.5 + "@rollup/rollup-linux-arm64-musl": 4.52.5 + "@rollup/rollup-linux-loong64-gnu": 4.52.5 + "@rollup/rollup-linux-ppc64-gnu": 4.52.5 + "@rollup/rollup-linux-riscv64-gnu": 4.52.5 + "@rollup/rollup-linux-riscv64-musl": 4.52.5 + "@rollup/rollup-linux-s390x-gnu": 4.52.5 + "@rollup/rollup-linux-x64-gnu": 4.52.5 + "@rollup/rollup-linux-x64-musl": 4.52.5 + "@rollup/rollup-openharmony-arm64": 4.52.5 + "@rollup/rollup-win32-arm64-msvc": 4.52.5 + "@rollup/rollup-win32-ia32-msvc": 4.52.5 + "@rollup/rollup-win32-x64-gnu": 4.52.5 + "@rollup/rollup-win32-x64-msvc": 4.52.5 + fsevents: 2.3.3 + run-parallel@1.2.0: dependencies: queue-microtask: 1.2.3 @@ -14345,6 +14902,8 @@ snapshots: side-channel-map: 1.0.1 side-channel-weakmap: 1.0.2 + siginfo@2.0.0: {} + signal-exit@4.0.2: {} signal-exit@4.1.0: {} @@ -14364,10 +14923,14 @@ snapshots: stable-hash@0.0.5: {} + stackback@0.0.2: {} + stat-mode@0.3.0: {} statuses@1.5.0: {} + std-env@3.10.0: {} + stop-iteration-iterator@1.1.0: dependencies: es-errors: 1.3.0 @@ -14540,6 +15103,8 @@ snapshots: dependencies: convert-hrtime: 3.0.0 + tinybench@2.9.0: {} + tinyexec@0.3.2: {} tinyexec@1.0.1: {} @@ -14549,6 +15114,8 @@ snapshots: fdir: 6.5.0(picomatch@4.0.3) picomatch: 4.0.3 + tinyrainbow@3.0.3: {} + to-regex-range@5.0.1: dependencies: is-number: 7.0.0 @@ -14812,22 +15379,22 @@ snapshots: v8-compile-cache-lib@3.0.1: {} - vercel@48.1.0: + vercel@48.1.0(rollup@4.52.5): dependencies: "@vercel/blob": 1.0.2 "@vercel/build-utils": 12.1.0 "@vercel/detect-agent": 0.2.0 - "@vercel/express": 0.0.17 + "@vercel/express": 0.0.17(rollup@4.52.5) "@vercel/fun": 1.1.6 "@vercel/go": 3.2.3 - "@vercel/h3": 0.1.1 - "@vercel/hono": 0.1.1 + "@vercel/h3": 0.1.1(rollup@4.52.5) + "@vercel/hono": 0.1.1(rollup@4.52.5) "@vercel/hydrogen": 1.2.4 - "@vercel/next": 4.12.6 - "@vercel/node": 5.3.23 + "@vercel/next": 4.12.6(rollup@4.52.5) + "@vercel/node": 5.3.23(rollup@4.52.5) "@vercel/python": 5.0.5 - "@vercel/redwood": 2.3.6 - "@vercel/remix-builder": 5.4.12 + "@vercel/redwood": 2.3.6(rollup@4.52.5) + "@vercel/remix-builder": 5.4.12(rollup@4.52.5) "@vercel/ruby": 2.2.1 "@vercel/static-build": 2.7.23 chokidar: 4.0.0 @@ -14854,6 +15421,61 @@ snapshots: "@types/unist": 3.0.3 vfile-message: 4.0.3 + vite@7.1.12(@types/node@24.5.2)(jiti@2.5.1)(lightningcss@1.30.1)(yaml@2.8.1): + dependencies: + esbuild: 0.25.10 + fdir: 6.5.0(picomatch@4.0.3) + picomatch: 4.0.3 + postcss: 8.5.6 + rollup: 4.52.5 + tinyglobby: 0.2.15 + optionalDependencies: + "@types/node": 24.5.2 + fsevents: 2.3.3 + jiti: 2.5.1 + lightningcss: 1.30.1 + yaml: 2.8.1 + + vitest@4.0.6(@edge-runtime/vm@3.2.0)(@types/debug@4.1.12)(@types/node@24.5.2)(jiti@2.5.1)(lightningcss@1.30.1)(yaml@2.8.1): + dependencies: + "@vitest/expect": 4.0.6 + "@vitest/mocker": 4.0.6(vite@7.1.12(@types/node@24.5.2)(jiti@2.5.1)(lightningcss@1.30.1)(yaml@2.8.1)) + "@vitest/pretty-format": 4.0.6 + "@vitest/runner": 4.0.6 + "@vitest/snapshot": 4.0.6 + "@vitest/spy": 4.0.6 + "@vitest/utils": 4.0.6 + debug: 4.4.3 + es-module-lexer: 1.7.0 + expect-type: 1.2.2 + magic-string: 0.30.19 + pathe: 2.0.3 + picomatch: 4.0.3 + std-env: 3.10.0 + tinybench: 2.9.0 + tinyexec: 0.3.2 + tinyglobby: 0.2.15 + tinyrainbow: 3.0.3 + vite: 7.1.12(@types/node@24.5.2)(jiti@2.5.1)(lightningcss@1.30.1)(yaml@2.8.1) + why-is-node-running: 2.3.0 + optionalDependencies: + "@edge-runtime/vm": 3.2.0 + "@types/debug": 4.1.12 + "@types/node": 24.5.2 + transitivePeerDependencies: + - jiti + - less + - lightningcss + - msw + - sass + - sass-embedded + - stylus + - sugarss + - supports-color + - terser + - tsx + - yaml + web-namespaces@2.0.1: {} web-vitals@0.2.4: {} @@ -14910,6 +15532,11 @@ snapshots: dependencies: isexe: 2.0.0 + why-is-node-running@2.3.0: + dependencies: + siginfo: 2.0.0 + stackback: 0.0.2 + word-wrap@1.2.5: {} wrap-ansi@7.0.0: diff --git a/tests/activity-events.test.ts b/tests/activity-events.test.ts new file mode 100644 index 00000000..979d32c4 --- /dev/null +++ b/tests/activity-events.test.ts @@ -0,0 +1,11 @@ +import { describe, expect, it } from "vitest"; +import eventsJson from "@/data/event.json"; +import { ActivityEventsConfigSchema } from "@/app/types/event"; + +describe("activity events config", () => { + it("matches the Zod schema", () => { + const parsed = ActivityEventsConfigSchema.parse(eventsJson); + + expect(parsed.events.length).toBeGreaterThan(0); + }); +}); diff --git a/vitest.config.mts b/vitest.config.mts new file mode 100644 index 00000000..bee6a725 --- /dev/null +++ b/vitest.config.mts @@ -0,0 +1,13 @@ +import path from "node:path"; +import { defineConfig } from "vitest/config"; + +export default defineConfig({ + test: { + environment: "node", + }, + resolve: { + alias: { + "@": path.resolve(__dirname, "."), + }, + }, +}); From 3991a9413ab36e2ae2c2aada80eb36402930ca0d Mon Sep 17 00:00:00 2001 From: Siz Long Date: Sun, 2 Nov 2025 15:40:59 +0800 Subject: [PATCH 2/3] =?UTF-8?q?feat:=20=E5=86=99=E6=AD=BB=E7=89=88?= =?UTF-8?q?=E6=9C=AC=EF=BC=8C=E5=B0=B1=E4=B8=8D=E4=BC=9A=E5=AF=BC=E8=87=B4?= =?UTF-8?q?=E4=B8=80=E7=9B=B4=E6=9B=B4=E6=94=B9pnpm-lock=E7=9A=84=E5=BC=95?= =?UTF-8?q?=E5=8F=B7=E4=BA=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index a6bf93d2..6c652b11 100644 --- a/package.json +++ b/package.json @@ -97,5 +97,6 @@ }, "lint-staged": { "**/*": "prettier --write --ignore-unknown" - } + }, + "packageManager": "pnpm@10.20.0" } From 779e9a38b64c70506b396b7019e94d7baf2ee818 Mon Sep 17 00:00:00 2001 From: Siz Long Date: Sun, 2 Nov 2025 16:09:22 +0800 Subject: [PATCH 3/3] =?UTF-8?q?feat:=20=E4=BF=AE=E5=A4=8D=E7=89=88?= =?UTF-8?q?=E6=9C=AC=E9=94=99=E8=AF=AF=EF=BC=8C=E5=8F=AA=E5=9C=A8=E4=B8=80?= =?UTF-8?q?=E4=B8=AA=E5=9C=B0=E6=96=B9=E8=BF=9B=E8=A1=8C=E7=89=88=E6=9C=AC?= =?UTF-8?q?=E7=AE=A1=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/content-check.yml | 2 -- .github/workflows/deploy.yml | 2 -- .github/workflows/sync-uuid.yml | 2 -- 3 files changed, 6 deletions(-) diff --git a/.github/workflows/content-check.yml b/.github/workflows/content-check.yml index 74f7e3dc..ef4ff78e 100644 --- a/.github/workflows/content-check.yml +++ b/.github/workflows/content-check.yml @@ -28,8 +28,6 @@ jobs: - uses: actions/checkout@v4 - uses: pnpm/action-setup@v4 - with: - version: 10 - uses: actions/setup-node@v4 with: diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index b91f5d6b..5d86a577 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -17,8 +17,6 @@ jobs: - uses: actions/checkout@v4 - uses: pnpm/action-setup@v4 - with: - version: 10 - uses: actions/setup-node@v4 with: diff --git a/.github/workflows/sync-uuid.yml b/.github/workflows/sync-uuid.yml index ed8aba7b..6c08878b 100644 --- a/.github/workflows/sync-uuid.yml +++ b/.github/workflows/sync-uuid.yml @@ -37,8 +37,6 @@ jobs: - uses: actions/checkout@v4 - uses: pnpm/action-setup@v4 - with: - version: 9 - uses: actions/setup-node@v4 with: