mirror of
https://github.com/Comfy-Org/Comfy-PR.git
synced 2026-11-04 23:37:33 +00:00
[PR #188] [MERGED] fix: resolve MetaCollection initialization error and add CI typecheck #187
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Comfy-Org/Comfy-PR#187
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/Comfy-Org/Comfy-PR/pull/188
Author: @snomiao
Created: 4/3/2026
Status: ✅ Merged
Merged: 4/3/2026
Merged by: @snomiao
Base:
main← Head:sno-fix-gh-tasks📝 Commits (4)
1bfd6c9fix: resolve MetaCollection initialization error and add CI lint/typecheck60bd101Update .husky/pre-commitd8210b0Update src/db/TaskMeta.ts36c5cf4fix: resolve pre-existing oxlint no-explicit-any errors📊 Changes
6 files changed (+41 additions, -22 deletions)
View changed files
📝
.github/workflows/test.yaml(+2 -0)📝
.husky/pre-commit(+3 -3)📝
app/tasks/gh-design/gh-design.ts(+13 -11)📝
app/tasks/gh-design/slackPendingLock.spec.ts(+3 -2)📝
scripts/cleanup-slack-dupes.ts(+5 -5)📝
src/db/TaskMeta.ts(+15 -1)📄 Description
Problem
bun app/tasks/run-gh-tasks.tscrashes with:Root Cause
src/db/TaskMeta.tshad a top-levelawait _TaskMeta.createIndex(...)that blocked module initialization. Whengh-bugcop.tsximportsMetaCollection, the export is still in the temporal dead zone because the top-level await hasn't resolved yet.Fix
src/db/TaskMeta.ts: Replace top-levelawait createIndex()with lazy initialization — the index is created on first $upsert/save call instead of at import time.app/tasks/gh-design/gh-design.ts: Fix pre-existing type error (task._idon union type).Prevention
.husky/pre-commit: Fix shebang (shinstead ofbun) and runbun run typecheck(tsgo) before every commit..github/workflows/test.yaml: Addbun run check(tsgo + oxlint + oxfmt) step to CI so PRs are checked.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.