fix(hocuspocus): sync bun lockfile for v4 dependencies#795
Conversation
Made-with: Cursor
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughRefactors server initialization to use Changes
Sequence Diagram(s)sequenceDiagram
participant Client
participant HocuspocusServer
participant HTTPServer
participant PostgresPool
Client->>HocuspocusServer: Connects (HTTP upgrade / WS)
HocuspocusServer->>HTTPServer: Accepts request / handles health routes
HocuspocusServer->>Client: Upgrades to WebSocket (internal)
Note right of HocuspocusServer: Runs application logic, persists to DB
HocuspocusServer->>PostgresPool: Acquire / release connections
alt Shutdown (SIGTERM/SIGINT)
HocuspocusServer->>HocuspocusServer: destroy()
HocuspocusServer->>PostgresPool: teardown()
HocuspocusServer->>Client: Close connections
end
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Poem
🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Review rate limit: 4/5 reviews remaining, refill in 12 minutes. Comment |
There was a problem hiding this comment.
Code Review
This pull request updates the Hocuspocus dependencies, specifically upgrading @hocuspocus/extension-redis and @hocuspocus/server to version 4.0.0. These updates result in the addition of crossws and the removal of async-lock and lodash.debounce from the dependency tree. Feedback was provided regarding a version mismatch for ioredis, where the root package and the extension resolve to different versions; aligning these versions is recommended to deduplicate the dependency and potentially resolve type casting issues in the codebase.
| "@hocuspocus/extension-redis": "^4.0.0", | ||
| "@hocuspocus/server": "^4.0.0", | ||
| "aws-jwt-verify": "^5.1.1", | ||
| "ioredis": "^5.9.3", |
There was a problem hiding this comment.
ioredis のバージョンが重複してインストールされています。
ルートの package.json では ^5.9.3(5.10.0 に解決)が指定されていますが、@hocuspocus/extension-redis v4.0.0 は ~5.6.1(5.6.1 に解決)を要求しているため、別個にインストールされています(323行目参照)。
server/hocuspocus/src/index.ts で ioredis を直接使用していないのであれば、ルートの package.json から ioredis を削除するか、バージョンを ~5.6.1 に合わせることで、依存関係を整理しインストール容量を削減できます。また、index.ts 内の as never キャストも、この型定義の不一致が解消されれば不要になる可能性があります。
There was a problem hiding this comment.
指摘どおり、server/hocuspocus では ioredis を直接 import していなかったため direct dependency から削除しました。lockfile も再生成し、extension 側の ioredis だけに整理しています。
Made-with: Cursor
|
レビューコメントへの対応をコミットしました(be59e02)。最新の変更に対する再レビューをお願いします。 @coderabbitai review |
|
🧠 Learnings used✅ Actions performedReview triggered.
|
Server.listen() in @hocuspocus/server v4 returns a Promise that can reject when the port is already in use or the onListen hook throws. Previously the result was discarded with `void`, so failures were silently swallowed and the process kept running in a broken state. Chain a `.catch` handler that logs the error and exits with status 1 so the supervisor (Railway) restarts the service and surfaces the problem in logs. Refs: PR #795 review by coderabbitai Made-with: Cursor
|
@coderabbitai 指摘いただいた起動失敗の握り潰し問題を edd56f0 で修正しました。再レビューをお願いします。 The unhandled |
|
🧠 Learnings used✅ Actions performedReview triggered.
|
概要
server/hocuspocusのpackage.jsonで@hocuspocus/*が v4 に更新済みだった一方、bun.lockが v3 のままだったため、Railway のbun install --frozen-lockfileが失敗していました。hocuspocus サービスの lockfile を再生成し、依存関係を v4 に同期します。変更点
server/hocuspocus/bun.lockを@hocuspocus/server/@hocuspocus/extension-redisv4.0.0 に同期bun install --frozen-lockfileが hocuspocus サービスで通ることを確認変更の種類
テスト方法
cd server/hocuspocus && bun install --frozen-lockfilecd server/hocuspocus && bun run testbun run lintbun run test:run補足:
bun run format:checkは現在のdevelop上の多数ファイルで既存の整形差分を検出して失敗します。今回の変更ファイルはbun.lockのみで、Prettier はbun.lockの parser を推定できないため個別チェック対象外です。チェックリスト
スクリーンショット(UI 変更がある場合)
UI 変更なし。
関連 Issue
Related to #793
Made with Cursor
Summary by CodeRabbit
Chores
Refactor