GeezerVison is showing github.com — fix(win32): scripts/turbo commands would not run (#14829) · cyrilmhansen/opencode@34495a7
File treeExpand file treeCollapse file tree Open diff view settings Expand file treeCollapse file tree Open diff view settings Collapse file Copy file name to clipboardExpand all lines: packages/plugin/script/publish.ts +2-1Lines changed: 2 additions & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
| 1 | 1 | #!/usr/bin/env bun | 2 | 2 | import { Script } from "@opencode-ai/script" | 3 | 3 | import { $ } from "bun" | | 4 | +import { fileURLToPath } from "url" | 4 | 5 |
| 5 | | -const dir = new URL("..", import.meta.url).pathname | | 6 | +const dir = fileURLToPath(new URL("..", import.meta.url)) | 6 | 7 | process.chdir(dir) | 7 | 8 |
| 8 | 9 | await $`bun tsc` | |
Collapse file Copy file name to clipboardExpand all lines: packages/sdk/js/package.json +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
| 6 | 6 | "license": "MIT", | 7 | 7 | "scripts": { | 8 | 8 | "typecheck": "tsgo --noEmit", | 9 | | - "build": "./script/build.ts" | | 9 | + "build": "bun ./script/build.ts" | 10 | 10 | }, | 11 | 11 | "exports": { | 12 | 12 | ".": "./src/index.ts", | |
Collapse file Copy file name to clipboardExpand all lines: packages/sdk/js/script/build.ts +2-1Lines changed: 2 additions & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
| 1 | 1 | #!/usr/bin/env bun | | 2 | +import { fileURLToPath } from "url" | 2 | 3 |
| 3 | | -const dir = new URL("..", import.meta.url).pathname | | 4 | +const dir = fileURLToPath(new URL("..", import.meta.url)) | 4 | 5 | process.chdir(dir) | 5 | 6 |
| 6 | 7 | import { $ } from "bun" | |
Collapse file Copy file name to clipboardExpand all lines: packages/sdk/js/script/publish.ts +2-1Lines changed: 2 additions & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
| 2 | 2 |
| 3 | 3 | import { Script } from "@opencode-ai/script" | 4 | 4 | import { $ } from "bun" | | 5 | +import { fileURLToPath } from "url" | 5 | 6 |
| 6 | | -const dir = new URL("..", import.meta.url).pathname | | 7 | +const dir = fileURLToPath(new URL("..", import.meta.url)) | 7 | 8 | process.chdir(dir) | 8 | 9 |
| 9 | 10 | const pkg = (await import("../package.json").then((m) => m.default)) as { | |
Collapse file Copy file name to clipboardExpand all lines: script/publish.ts +3-2Lines changed: 3 additions & 2 deletions | Original file line number | Diff line number | Diff line change |
|---|
| 2 | 2 |
| 3 | 3 | import { $ } from "bun" | 4 | 4 | import { Script } from "@opencode-ai/script" | | 5 | +import { fileURLToPath } from "url" | 5 | 6 |
| 6 | 7 | const highlightsTemplate = ` | 7 | 8 | <!-- | @@ -46,7 +47,7 @@ for (const file of pkgjsons) { | 46 | 47 | await Bun.file(file).write(pkg) | 47 | 48 | } | 48 | 49 |
| 49 | | -const extensionToml = new URL("../packages/extensions/zed/extension.toml", import.meta.url).pathname | | 50 | +const extensionToml = fileURLToPath(new URL("../packages/extensions/zed/extension.toml", import.meta.url)) | 50 | 51 | let toml = await Bun.file(extensionToml).text() | 51 | 52 | toml = toml.replace(/^version = "[^"]+"/m, `version = "${Script.version}"`) | 52 | 53 | toml = toml.replaceAll(/releases\/download\/v[^/]+\//g, `releases/download/v${Script.version}/`) | @@ -78,5 +79,5 @@ await import(`../packages/sdk/js/script/publish.ts`) | 78 | 79 | console.log("\n=== plugin ===\n") | 79 | 80 | await import(`../packages/plugin/script/publish.ts`) | 80 | 81 |
| 81 | | -const dir = new URL("..", import.meta.url).pathname | | 82 | +const dir = fileURLToPath(new URL("..", import.meta.url)) | 82 | 83 | process.chdir(dir) |
|