fix: pin @protobufjs/inquire to 1.1.0 to fix Turbopack incompatibility#1208
Conversation
@protobufjs/inquire@1.1.1 replaced its eval-based dynamic require with a
plain require(moduleName) call. Turbopack rewrites that into a throwing
IIFE, so inquire("fs") returns null and protobufjs's loadSync blows up
on null.readFileSync when reading .proto files. See
protobufjs/protobuf.js#2214.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
@brendan-kellam your pull request is missing a changelog! |
WalkthroughA Yarn ChangesDependency Resolution Pinning
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
package.json (1)
33-33: ⚡ Quick winConsider adding an inline comment to document the pin.
The exact version pin for
@protobufjs/inquireaddresses a specific Turbopack compatibility issue introduced in 1.1.1. Adding a brief inline comment would help future maintainers understand why this version is pinned and when it can be safely removed (e.g., when the upstream issue protobufjs/protobuf.js#2214 is resolved).📝 Suggested documentation comment
"resolutions": { + // Pin to 1.1.0 until protobufjs/protobuf.js#2214 is fixed (1.1.1 breaks Turbopack) "`@protobufjs/inquire`": "1.1.0", "prettier": "3.5.3",🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@package.json` at line 33, Add a short JSON-valid note documenting why the dependency "`@protobufjs/inquire`": "1.1.0" is pinned (Turbopack compatibility regression introduced in 1.1.1) by adding a top-level metadata key (e.g., "_notes" or "_metadata") in package.json that maps "`@protobufjs/inquire`" to a brief explanation and the upstream issue link (protobufjs/protobuf.js#2214) and include a note about the condition for removal (when that issue is resolved).
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@package.json`:
- Line 33: Add a short JSON-valid note documenting why the dependency
"`@protobufjs/inquire`": "1.1.0" is pinned (Turbopack compatibility regression
introduced in 1.1.1) by adding a top-level metadata key (e.g., "_notes" or
"_metadata") in package.json that maps "`@protobufjs/inquire`" to a brief
explanation and the upstream issue link (protobufjs/protobuf.js#2214) and
include a note about the condition for removal (when that issue is resolved).
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 5ad4e23c-d98d-423f-afcb-6f1f3f59847b
⛔ Files ignored due to path filters (1)
yarn.lockis excluded by!**/yarn.lock,!**/*.lock
📒 Files selected for processing (1)
package.json
License Audit
Weak Copyleft Packages (informational)
Resolved Packages (11)
|
Summary
@protobufjs/inquire@1.1.1replaced itseval-based dynamic require with a plainrequire(moduleName)call. Turbopack rewrites that into a throwing IIFE, soinquire("fs")returnsnullandprotobufjs'sloadSynccrashes withCannot read properties of null (reading 'readFileSync')when loading.protofiles (e.g. the zoekt webserver proto used by search).@protobufjs/inquireto1.1.0via a rootresolutionsoverride until upstream ships a real fix (tracked in protobufjs/protobuf.js#2214; maintainer is planning to backport #2237 to 7.x).chore: update protobufjs deps), which bumpedprotobufjsto 7.5.8 and pulled in the newinquiretransitively.Test plan
yarn installruns cleanly@protobufjs/inquire@1.1.0is installed (no nested 1.1.1 underprotobufjs/node_modules)/api/stream_searchshould return 200 instead of crashing onnull.readFileSync🤖 Generated with Claude Code
Summary by CodeRabbit