GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — test(core): use direct test imports (#45683) · anomalyco/opencode@a519363

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • packages/core/test
    • database-drizzle.test.ts
    • effect
      • cross-spawn-spawner.test.ts
    • fixture
      • tmpdir.ts
    • instructions
      • builtins.test.ts
    • integration.test.ts
    • lib
      • effect.ts
      • tool.ts
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎packages/core/test/database-drizzle.test.ts‎

Copy file name to clipboardExpand all lines: packages/core/test/database-drizzle.test.ts
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { SqliteClient } from "@effect/sql-sqlite-bun"
77
import { eq, sql } from "drizzle-orm"
88
import { integer, sqliteTable, text } from "drizzle-orm/sqlite-core"
99
import { Effect, Tracer } from "effect"
10-
import type { SqlClient as SqlClientService } from "effect/unstable/sql/SqlClient"
10+
import type { SqlClient } from "effect/unstable/sql/SqlClient"
1111
import { isSqlError } from "effect/unstable/sql/SqlError"
1212
import { EffectDrizzleSqlite } from "@opencode-ai/core/database/drizzle"
1313

@@ -16,7 +16,7 @@ const users = sqliteTable("users", {
1616
name: text().notNull(),
1717
})
1818

19-
const run = <A, E>(effect: Effect.Effect<A, E, SqlClientService>) =>
19+
const run = <A, E>(effect: Effect.Effect<A, E, SqlClient>) =>
2020
Effect.runPromise(
2121
effect.pipe(Effect.provide(SqliteClient.layer({ filename: ":memory:", disableWAL: true })), Effect.scoped),
2222
)
Collapse file

‎packages/core/test/effect/cross-spawn-spawner.test.ts‎

Copy file name to clipboardExpand all lines: packages/core/test/effect/cross-spawn-spawner.test.ts
+1-2Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@ import { describe, expect } from "bun:test"
22
import fs from "node:fs/promises"
33
import os from "node:os"
44
import path from "node:path"
5-
import { Effect, Exit, Stream } from "effect"
6-
import type * as PlatformError from "effect/PlatformError"
5+
import { Effect, Exit, PlatformError, Stream } from "effect"
76
import { ChildProcess, ChildProcessSpawner } from "effect/unstable/process"
87
import { CrossSpawnSpawner } from "@opencode-ai/util/cross-spawn-spawner"
98
import { LayerNode } from "@opencode-ai/util/effect/layer-node"
Collapse file

‎packages/core/test/fixture/tmpdir.ts‎

Copy file name to clipboardExpand all lines: packages/core/test/fixture/tmpdir.ts
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
import fs from "fs/promises"
2-
import { tmpdir as osTmpdir } from "os"
2+
import os from "os"
33
import path from "path"
44
import { Effect } from "effect"
55

66
export const tmpdir = async (prefix = "opencode-core-test-") => {
7-
const dir = await fs.realpath(await fs.mkdtemp(path.join(osTmpdir(), prefix)))
7+
const dir = await fs.realpath(await fs.mkdtemp(path.join(os.tmpdir(), prefix)))
88
return {
99
path: dir,
1010
async [Symbol.asyncDispose]() {
Collapse file

‎packages/core/test/instructions/builtins.test.ts‎

Copy file name to clipboardExpand all lines: packages/core/test/instructions/builtins.test.ts
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { describe, expect } from "bun:test"
22
import os from "os"
33
import { Effect, Layer } from "effect"
4-
import * as TestClock from "effect/testing/TestClock"
4+
import { TestClock } from "effect/testing"
55
import { AppNodeBuilder } from "@opencode-ai/core/effect/app-node-builder"
66
import { Location } from "@opencode-ai/core/location"
77
import { FSUtil } from "@opencode-ai/util/fs-util"
Collapse file

‎packages/core/test/integration.test.ts‎

Copy file name to clipboardExpand all lines: packages/core/test/integration.test.ts
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { describe, expect } from "bun:test"
22
import { Cause, Clock, Duration, Effect, Exit, Fiber, Layer, Scope, Stream } from "effect"
3-
import * as TestClock from "effect/testing/TestClock"
3+
import { TestClock } from "effect/testing"
44
import { Credential } from "@opencode-ai/core/credential"
55
import { AppNodeBuilder } from "@opencode-ai/core/effect/app-node-builder"
66
import { makeGlobalNode } from "@opencode-ai/util/effect/app-node"
Collapse file

‎packages/core/test/lib/effect.ts‎

Copy file name to clipboardExpand all lines: packages/core/test/lib/effect.ts
+2-3Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import { test, type TestOptions } from "bun:test"
2-
import { Cause, Effect, Exit, Layer, Scope } from "effect"
3-
import * as TestClock from "effect/testing/TestClock"
4-
import * as TestConsole from "effect/testing/TestConsole"
2+
import { Cause, Effect, Exit, Layer, type Scope } from "effect"
3+
import { TestClock, TestConsole } from "effect/testing"
54

65
type Body<A, E, R> = Effect.Effect<A, E, R> | (() => Effect.Effect<A, E, R>)
76

Collapse file

‎packages/core/test/lib/tool.ts‎

Copy file name to clipboardExpand all lines: packages/core/test/lib/tool.ts
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { SessionMessage } from "@opencode-ai/core/session/message"
44
import { toSessionError } from "@opencode-ai/core/session/to-session-error"
55
import type { SessionError } from "@opencode-ai/schema/session-error"
66
import { Tool } from "@opencode-ai/core/tool"
7-
import type { Context as PluginContext } from "@opencode-ai/plugin/effect/plugin"
7+
import type { Context } from "@opencode-ai/plugin/effect/plugin"
88
import { Effect, type Scope } from "effect"
99
import { host } from "../plugin/host"
1010

@@ -52,7 +52,7 @@ export function waitForCodeModeTool(
5252
export const registerToolPlugin = <R>(
5353
plugin: {
5454
readonly id: string
55-
readonly effect: (context: PluginContext) => Effect.Effect<void, never, R>
55+
readonly effect: (context: Context) => Effect.Effect<void, never, R>
5656
},
5757
overrides: Parameters<typeof host>[0] = {},
5858
): Effect.Effect<void, never, R | Tool.Service | Scope.Scope> =>

0 commit comments

Comments
0 (0)
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.