Skip to content

Commit d2d5d84

Browse files
chore: generate
1 parent 847f1d9 commit d2d5d84

File tree

3 files changed

+16
-6
lines changed

3 files changed

+16
-6
lines changed

packages/opencode/src/file/ripgrep.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -328,9 +328,9 @@ export namespace Ripgrep {
328328
}
329329
}
330330

331-
return spawner.streamLines(
332-
ChildProcess.make(args[0], args.slice(1), { cwd: input.cwd }),
333-
).pipe(Stream.filter((line: string) => line.length > 0))
331+
return spawner
332+
.streamLines(ChildProcess.make(args[0], args.slice(1), { cwd: input.cwd }))
333+
.pipe(Stream.filter((line: string) => line.length > 0))
334334
})
335335

336336
return Service.of({

packages/opencode/src/tool/glob.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,11 @@ export const GlobTool = Tool.defineEffect(
5151
Effect.gen(function* () {
5252
const full = path.resolve(search, file)
5353
const info = yield* fs.stat(full).pipe(Effect.catch(() => Effect.succeed(undefined)))
54-
const mtime = info?.mtime.pipe(Option.map((d) => d.getTime()), Option.getOrElse(() => 0)) ?? 0
54+
const mtime =
55+
info?.mtime.pipe(
56+
Option.map((d) => d.getTime()),
57+
Option.getOrElse(() => 0),
58+
) ?? 0
5559
return { path: full, mtime }
5660
}),
5761
),

packages/opencode/test/file/ripgrep.test.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,10 @@ describe("Ripgrep.Service", () => {
6666

6767
const files = await Effect.gen(function* () {
6868
const rg = yield* Ripgrep.Service
69-
return yield* rg.files({ cwd: tmp.path }).pipe(Stream.runCollect, Effect.map((chunk) => [...chunk].sort()))
69+
return yield* rg.files({ cwd: tmp.path }).pipe(
70+
Stream.runCollect,
71+
Effect.map((chunk) => [...chunk].sort()),
72+
)
7073
}).pipe(Effect.provide(Ripgrep.defaultLayer), Effect.runPromise)
7174

7275
expect(files).toEqual(["a.txt", "b.txt"])
@@ -82,7 +85,10 @@ describe("Ripgrep.Service", () => {
8285

8386
const files = await Effect.gen(function* () {
8487
const rg = yield* Ripgrep.Service
85-
return yield* rg.files({ cwd: tmp.path, glob: ["*.ts"] }).pipe(Stream.runCollect, Effect.map((chunk) => [...chunk]))
88+
return yield* rg.files({ cwd: tmp.path, glob: ["*.ts"] }).pipe(
89+
Stream.runCollect,
90+
Effect.map((chunk) => [...chunk]),
91+
)
8692
}).pipe(Effect.provide(Ripgrep.defaultLayer), Effect.runPromise)
8793

8894
expect(files).toEqual(["keep.ts"])

0 commit comments

Comments
 (0)