Move service state into InstanceState, flatten service facades (#18483)

This commit is contained in:
Kit Langton
2026-03-21 00:51:35 -04:00
committed by GitHub
parent 40aeaa120d
commit 38e0dc9ccd
84 changed files with 4536 additions and 3742 deletions

View File

@@ -25,8 +25,8 @@ function withVcs(
directory,
Layer.merge(FileWatcher.layer, Vcs.layer),
async (rt) => {
await rt.runPromise(FileWatcher.Service.use(() => Effect.void))
await rt.runPromise(Vcs.Service.use(() => Effect.void))
await rt.runPromise(FileWatcher.Service.use((s) => s.init()))
await rt.runPromise(Vcs.Service.use((s) => s.init()))
await Bun.sleep(500)
await body(rt)
},
@@ -67,7 +67,9 @@ function nextBranchUpdate(directory: string, timeout = 10_000) {
// ---------------------------------------------------------------------------
describeVcs("Vcs", () => {
afterEach(() => Instance.disposeAll())
afterEach(async () => {
await Instance.disposeAll()
})
test("branch() returns current branch name", async () => {
await using tmp = await tmpdir({ git: true })