Skip to content

fix(build-node): preserve Bun linker for node-pty install#20364

Open
Hona wants to merge 1 commit intoanomalyco:refactor/hono-serverfrom
Hona:fix/build-node-linker-detection
Open

fix(build-node): preserve Bun linker for node-pty install#20364
Hona wants to merge 1 commit intoanomalyco:refactor/hono-serverfrom
Hona:fix/build-node-linker-detection

Conversation

@Hona
Copy link
Copy Markdown
Member

@Hona Hona commented Mar 31, 2026

Summary

  • detect whether the current Bun install layout is hoisted or isolated before the follow-up bun install
  • pass the same linker when installing @lydell/node-pty so the Windows GITHUB_ACTIONS path does not mix hoisted and isolated installs
  • keep build-node.ts aligned with the existing install method instead of falling back to the monorepo default

Testing

  • GITHUB_ACTIONS=true bun --cwd packages/opencode script/build-node.ts
  • bun turbo typecheck (via pre-push hook)

Copilot AI review requested due to automatic review settings March 31, 2026 22:44
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the packages/opencode Node build script to ensure that when it runs a follow-up bun install for @lydell/node-pty, it uses the same Bun linker mode (hoisted vs isolated) as the current workspace install layout—avoiding mixed install layouts (notably on Windows in GITHUB_ACTIONS).

Changes:

  • Add linker-mode detection by inspecting workspace/root node_modules placement (with a fallback based on bun.lock + workspace config).
  • Pass --linker=<detected> to the bun install ... @lydell/node-pty@... step in build-node.ts.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@Hona Hona added the beta label Mar 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants