Skip to content

fix(win32): scripts/turbo commands would not run - #14829

Merged
Hona merged 1 commit into
anomalyco:devfrom
Hona:fix/cross-platform-scripts
Feb 23, 2026
Merged

fix(win32): scripts/turbo commands would not run#14829
Hona merged 1 commit into
anomalyco:devfrom
Hona:fix/cross-platform-scripts

Conversation

@Hona

@HonaHona commented Feb 23, 2026

Copy link
Copy Markdown
Member

Summary

  • Replace new URL(...).pathname with fileURLToPath(new URL(...)) across all build/publish scripts — .pathname produces /C:/... on Windows which breaks path resolution entirely
  • Add explicit bun prefix to SDK build script in package.json so turbo can invoke it on Windows (bare ./script/build.ts isn't executable there)

Files changed:

  • packages/plugin/script/publish.ts
  • packages/sdk/js/script/build.ts
  • packages/sdk/js/script/publish.ts
  • packages/sdk/js/package.json
  • script/publish.ts

Split out from #14742.

CopilotAI review requested due to automatic review settings February 23, 2026 23:09
@HonaHona changed the title fix(win32): use fileURLToPath for cross-platform script pathsfix(win32): scripts/turbo commands would not runFeb 23, 2026
@Hona
Hona enabled auto-merge (squash) February 23, 2026 23:10

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

This pull request fixes Windows compatibility issues in build and publish scripts by replacing new URL(...).pathname with fileURLToPath(new URL(...)), which properly handles Windows path formats. The .pathname property produces invalid paths like /C:/... on Windows, breaking path resolution.

Changes:

  • Replaced .pathname with fileURLToPath() in all build/publish scripts across 4 packages
  • Added explicit bun prefix to SDK build script invocation in package.json for Windows compatibility

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.

Show a summary per file
FileDescription
script/publish.tsAdded fileURLToPath import and replaced two .pathname usages for directory path resolution
packages/sdk/js/script/publish.tsAdded fileURLToPath import and replaced .pathname usage for directory path resolution
packages/sdk/js/script/build.tsAdded fileURLToPath import and replaced .pathname usage for directory path resolution
packages/sdk/js/package.jsonChanged build script from ./script/build.ts to bun ./script/build.ts for Windows executability
packages/plugin/script/publish.tsAdded fileURLToPath import and replaced .pathname usage for directory path resolution

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

@Hona
Hona disabled auto-merge February 23, 2026 23:15
@Hona
Hona merged commit 34495a7 into anomalyco:devFeb 23, 2026
15 of 17 checks passed
sergiu-svinarciuc pushed a commit to sergiu-svinarciuc/opencode that referenced this pull request Feb 24, 2026
* dev: (356 commits)
app: wait for loadFile before opening file tab
upgrade to bun 1.3.10 canary and force baseline builds always (anomalyco#14843)
ci: use bun baseline build to avoid segfaults (anomalyco#14839)
ci: add Windows to unit test matrix (anomalyco#14836)
fix(win32): e2e sometimes fails because windows is weird and sometimes ipv6 (anomalyco#14833)
zen: display BYOK cost
fix(win32): scripts/turbo commands would not run (anomalyco#14829)
fix(cicd): flakey typecheck (anomalyco#14828)
fix: update workflows for better automation (anomalyco#14809)
fix(app): duplicate markdown
fix(app): duplicate markdown
fix(app): correct inverted chevron direction in todo list (anomalyco#14628)
Revert "fix(app): terminal issues"
chore: generate
wip: zen lite
zen: display session in usage
zen: track session in usage
fix(win32): normalize paths at permission boundaries (anomalyco#14738)
fix: Windows path support and canonicalization (anomalyco#13671)
chore: update nix node_modules hashes
...
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
Rwanbt pushed a commit to Rwanbt/unifia that referenced this pull request May 5, 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
Rwanbt pushed a commit to Rwanbt/unifia that referenced this pull request Jun 14, 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