fix: dual-layer ESM fix for Node 22/24 vscode-jsonrpc resolution#474
Merged
bradygaster merged 1 commit intodevfrom Mar 22, 2026
Merged
fix: dual-layer ESM fix for Node 22/24 vscode-jsonrpc resolution#474bradygaster merged 1 commit intodevfrom
bradygaster merged 1 commit intodevfrom
Conversation
Layer 1: Inject exports field into vscode-jsonrpc@8.2.1 package.json at postinstall, matching v9.x schema. Fixes ALL subpath imports at once. Layer 2: Keep existing copilot-sdk session.js .js extension patch as defense-in-depth fallback. Layer 3 (existing): Runtime Module._resolveFilename intercept in cli-entry.ts for npx cache hits where postinstall never runs. squad doctor now detects both missing exports field and unpatched session.js imports, with actionable remediation messages. Closes #449 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
42bfd7b to
8a7d5f5
Compare
Owner
Author
|
GNC review (Node.js Runtime specialist): ESM fix correctly addresses Node 22/24 vscode-jsonrpc resolution. Key findings:
Rebased on dev (includes #483 CI timeout fix). All 8 doctor tests pass. LGTM ✅ |
chrislomonico
pushed a commit
to clomonico/squad
that referenced
this pull request
Mar 26, 2026
…dygaster#474) - typewrite() default: 30ms → 8ms/char - revealLines() default: 100ms → 30ms/line - Explicit typewrite calls: 25ms/40ms → 8ms/10ms - sleep() calls: 200ms/300ms → 50ms/80ms - NO_COLOR mode still skips animations entirely Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #449 — Node 22/24 ESM module resolution failure for \�scode-jsonrpc\ subpath imports.
Root Cause
\�scode-jsonrpc@8.2.1\ ships without an \�xports\ field. Node 22+ strict ESM rejects \import('vscode-jsonrpc/node')\ because it can't resolve the subpath without explicit exports.
What Changed
Layer 1 — \�scode-jsonrpc/package.json\ exports injection (new)
Layer 2 — copilot-sdk \session.js\ patch (preserved)
Layer 3 — Runtime \Module._resolveFilename\ intercept (existing, unchanged)
\squad doctor\ ESM checks (new)
Testing
Working as GNC (Node.js Runtime specialist)