Prefactor: extract Validation Core from CalendarCore
還沒有人認領這個 Issue。
評估
- 難度
- 4/5
- 預估耗時
- 3-5 天
- 新手友好度
- 45/100
- Issue 類型
- 重構
- 描述清晰度
- 基本清楚
- 活躍度
- 冷清
- 技術堆疊
- typescript
- 領域
- backend
研究方向
Start by reading CalendarCore and tracing its availability, dependency-constraint, and recurrence validation logic, along with the existing tests. Identify how each can operate on plain event objects and config without store, viewport, DOM, database, or Temporal dependencies. Done means CalendarCore delegates to independently tested pure functions and all existing tests pass unchanged.
由索引模型根據 Issue 內容生成。
描述
Parent
https://github.com/TanStack/time/issues/25
What to build
Extract the availability, dependency-propagation, and recurrence validation logic currently fused into `CalendarCore` into pure, isomorphic functions with the signature `validate(write, events, config) → conflicts`. These functions must have zero dependencies on the store, viewport, DOM, or any database.
This is the mandatory first step before any modularization can happen. It is a pure refactor — no new behavior, no public API changes. The existing `CalendarCore` continues to call these functions internally; callers see no difference.
The extraction creates the seam that makes the following possible:
- the module-stage pipeline (both client and server can run the same stages)
- the `loadEvents` adapter in the server package
- the client/server Data Strategy
Acceptance criteria
- Availability conflict detection, dependency-constraint checking (FS/SS/FF/SF), and recurrence validation each exist as standalone pure functions importable independently of `CalendarCore`
- Each function accepts plain event objects and config; returns a conflicts/errors array; has no side effects
- `CalendarCore` delegates to these functions internally — all existing tests continue to pass unchanged
- No `Temporal` objects, store references, or DOM references appear in the extracted functions' signatures
- Unit tests cover the extracted functions directly (not through `CalendarCore`)
Blocked by
None — can start immediately.
- 主要語言
- TypeScript
- 星號
- 620
- 分支
- 6
- PR 合併指標
- 30 天內沒有已合併 PR
環境準備
- 沒有 Dockerfile 或 Docker Compose 檔案
- 有 Pull Request 範本
- 閱讀貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
TanStack/time 的其他 Issue
-
難度 5/5 一週以上 新手友好度 5/100
-
enhancement
難度 5/5 一週以上 新手友好度 25/100
-
enhancement
難度 5/5 一週以上 新手友好度 32/100
-
enhancement
難度 4/5 3-5 天 新手友好度 35/100
-
enhancement
難度 5/5 一週以上 新手友好度 35/100
相似的 Issue
-
check:passed streams:add
難度 2/5 1-3 小時 新手友好度 64/100
維護者通常 1 天內回覆
-
bug implicit-state
難度 2/5 1-3 小時 新手友好度 76/100
-
book-layout.spec fails when the similar-books rail holds other projects' books可能已有人在做 @praetorianer777 今天認領。 未關閉
難度 2/5 1-3 小時 新手友好度 78/100
praetorianer777/GoTome#373 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 75/100
Tencent/tdesign-react#4465 · 1 則留言 ·
維護者通常 1 天內回覆
-
area:cards enhancement ready-for-agent
難度 2/5 1-3 小時 新手友好度 66/100
fil-donadoni/tolaria#8883 ·
維護者通常 1 天內回覆