GeezerVison is showing github.com — fix: patch arborist to get around bun bug (#23460) · HashNuke/opencode@e539efe
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: bun.lock +4Lines changed: 4 additions & 0 deletions Collapse file Copy file name to clipboardExpand all lines: package.json +1Lines changed: 1 addition & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
| 127 | 127 | "@types/node": "catalog:" | 128 | 128 | }, | 129 | 129 | "patchedDependencies": { | | 130 | + | 130 | 131 | | 131 | 132 | | 132 | 133 | } | |
Collapse file Copy file name to clipboardExpand all lines: packages/opencode/package.json +1Lines changed: 1 addition & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
| 110 | 110 | "@lydell/node-pty": "catalog:", | 111 | 111 | "@modelcontextprotocol/sdk": "1.27.1", | 112 | 112 | "@npmcli/arborist": "9.4.0", | | 113 | + "@npmcli/config": "10.8.1", | 113 | 114 | "@octokit/graphql": "9.0.2", | 114 | 115 | "@octokit/rest": "catalog:", | 115 | 116 | "@openauthjs/openauth": "catalog:", | |
Collapse file Copy file name to clipboardExpand all lines: packages/opencode/src/npm/config.ts Collapse file Copy file name to clipboard +43Lines changed: 43 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
| | 1 | +declare module "@npmcli/config" { | | 2 | + type Data = Record<string, unknown> | | 3 | + type Where = "default" | "builtin" | "global" | "user" | "project" | "env" | "cli" | | 4 | + | | 5 | + namespace Config { | | 6 | + interface Options { | | 7 | + definitions: Data | | 8 | + shorthands: Record<string, string | string[]> | | 9 | + npmPath: string | | 10 | + flatten?: (input: Data, flat?: Data) => Data | | 11 | + nerfDarts?: string[] | | 12 | + argv?: string[] | | 13 | + cwd?: string | | 14 | + env?: NodeJS.ProcessEnv | | 15 | + execPath?: string | | 16 | + platform?: NodeJS.Platform | | 17 | + warn?: boolean | | 18 | + } | | 19 | + } | | 20 | + | | 21 | + class Config { | | 22 | + constructor(input: Config.Options) | | 23 | + | | 24 | + readonly data: Map<Where, { source: string | null }> | | 25 | + readonly flat: Data | | 26 | + | | 27 | + load(): Promise<void> | | 28 | + } | | 29 | + | | 30 | + export = Config | | 31 | +} | | 32 | + | | 33 | +declare module "@npmcli/config/lib/definitions" { | | 34 | + export const definitions: Record<string, unknown> | | 35 | + export const shorthands: Record<string, string | string[]> | | 36 | + export const flatten: (input: Record<string, unknown>, flat?: Record<string, unknown>) => Record<string, unknown> | | 37 | + export const nerfDarts: string[] | | 38 | + export const proxyEnv: string[] | | 39 | +} | | 40 | + | | 41 | +declare module "@npmcli/config/lib/definitions/index.js" { | | 42 | + export * from "@npmcli/config/lib/definitions" | | 43 | +} |
Collapse file Copy file name to clipboardExpand all lines: packages/shared/src/types.d.ts +2Lines changed: 2 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -5,6 +5,7 @@ declare module "@npmcli/arborist" { | 5 | 5 | progress?: boolean | 6 | 6 | savePrefix?: string | 7 | 7 | ignoreScripts?: boolean | | 8 | + [key: string]: unknown | 8 | 9 | } | 9 | 10 |
| 10 | 11 | export interface ArboristNode { | @@ -24,6 +25,7 @@ declare module "@npmcli/arborist" { | 24 | 25 | add?: string[] | 25 | 26 | save?: boolean | 26 | 27 | saveType?: "prod" | "dev" | "optional" | "peer" | | 28 | + [key: string]: unknown | 27 | 29 | } | 28 | 30 |
| 29 | 31 | export class Arborist { | |
Collapse file Copy file name to clipboard +13Lines changed: 13 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
| | 1 | +diff --git a/lib/agents.js b/lib/agents.js | | 2 | +index 45ec59c4c13757379095131c4f0a5ea6f7284f45..0763b031e355a755ec6a26f98461aa3f63b8339b 100644 | | 3 | +--- a/lib/agents.js | | 4 | ++++ b/lib/agents.js | | 5 | +@@ -32,7 +32,7 @@ module.exports = class Agent extends AgentBase { | | 6 | + } | | 7 | + | | 8 | + get proxy () { | | 9 | +- return this.#proxy ? { url: this.#proxy } : {} | | 10 | ++ return this.#proxy ? { url: this.#proxy.toString() } : {} | | 11 | + } | | 12 | + | | 13 | + #getProxy (options) { |
|