Skip to content

fix(test): replace structuredClone with spread for process.env - #14908

Merged
Hona merged 1 commit into
anomalyco:devfrom
Hona:fix/ide-test-structuredclone
Feb 24, 2026
Merged

fix(test): replace structuredClone with spread for process.env#14908
Hona merged 1 commit into
anomalyco:devfrom
Hona:fix/ide-test-structuredclone

Conversation

@Hona

@HonaHona commented Feb 24, 2026

Copy link
Copy Markdown
Member

Summary

  • structuredClone(process.env) throws DataCloneError on Windows in Bun. Use object spread instead.

Split out from #14742.

CopilotAI review requested due to automatic review settings February 24, 2026 13:09

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Updates a Bun test helper pattern to avoid a Windows-specific DataCloneError when cloning process.env, improving cross-platform test stability in packages/opencode.

Changes:

  • Replaces structuredClone(process.env) with a shallow snapshot using object spread.

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

@Hona
Hona merged commit 3241777 into anomalyco:devFeb 24, 2026
14 of 15 checks passed
lanej pushed a commit to lanej/opencode that referenced this pull request Feb 24, 2026
kcelia pushed a commit to concrete-security/private-opencode that referenced this pull request Feb 25, 2026
jonathanmiddleton pushed a commit to jonathanmiddleton/opencode that referenced this pull request Mar 10, 2026
xywsxp pushed a commit to xywsxp/opencode that referenced this pull request Apr 24, 2026
AIALRA-0 pushed a commit to AIALRA-0/opencode-turn-engine that referenced this pull request Jun 10, 2026
AIALRA-0 pushed a commit to AIALRA-0/opencode-turn-engine that referenced this pull request Jun 10, 2026
avion23 pushed a commit to avion23/opencode that referenced this pull request Jun 10, 2026
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@Hona