@@ -40,7 +40,10 @@ async function rootCommit(dir: string) {
4040describe ( "ProjectV2.resolve" , ( ) => {
4141 it . live ( "returns global for non-git directory" , ( ) =>
4242 Effect . gen ( function * ( ) {
43- const tmp = yield * Effect . acquireRelease ( Effect . promise ( ( ) => tmpdir ( ) ) , ( tmp ) => Effect . promise ( ( ) => tmp [ Symbol . asyncDispose ] ( ) ) )
43+ const tmp = yield * Effect . acquireRelease (
44+ Effect . promise ( ( ) => tmpdir ( ) ) ,
45+ ( tmp ) => Effect . promise ( ( ) => tmp [ Symbol . asyncDispose ] ( ) ) ,
46+ )
4447 const project = yield * Project . Service
4548
4649 const result = yield * project . resolve ( abs ( tmp . path ) )
@@ -54,7 +57,10 @@ describe("ProjectV2.resolve", () => {
5457
5558 it . live ( "returns git global for repo with no commits and no remote" , ( ) =>
5659 Effect . gen ( function * ( ) {
57- const tmp = yield * Effect . acquireRelease ( Effect . promise ( ( ) => tmpdir ( ) ) , ( tmp ) => Effect . promise ( ( ) => tmp [ Symbol . asyncDispose ] ( ) ) )
60+ const tmp = yield * Effect . acquireRelease (
61+ Effect . promise ( ( ) => tmpdir ( ) ) ,
62+ ( tmp ) => Effect . promise ( ( ) => tmp [ Symbol . asyncDispose ] ( ) ) ,
63+ )
5864 yield * Effect . promise ( ( ) => initRepo ( tmp . path ) )
5965 const project = yield * Project . Service
6066
@@ -69,7 +75,10 @@ describe("ProjectV2.resolve", () => {
6975
7076 it . live ( "falls back to root commit when origin is missing" , ( ) =>
7177 Effect . gen ( function * ( ) {
72- const tmp = yield * Effect . acquireRelease ( Effect . promise ( ( ) => tmpdir ( ) ) , ( tmp ) => Effect . promise ( ( ) => tmp [ Symbol . asyncDispose ] ( ) ) )
78+ const tmp = yield * Effect . acquireRelease (
79+ Effect . promise ( ( ) => tmpdir ( ) ) ,
80+ ( tmp ) => Effect . promise ( ( ) => tmp [ Symbol . asyncDispose ] ( ) ) ,
81+ )
7382 yield * Effect . promise ( ( ) => initRepo ( tmp . path , { commit : true } ) )
7483 const project = yield * Project . Service
7584
@@ -84,7 +93,10 @@ describe("ProjectV2.resolve", () => {
8493
8594 it . live ( "prefers normalized origin over root commit" , ( ) =>
8695 Effect . gen ( function * ( ) {
87- const tmp = yield * Effect . acquireRelease ( Effect . promise ( ( ) => tmpdir ( ) ) , ( tmp ) => Effect . promise ( ( ) => tmp [ Symbol . asyncDispose ] ( ) ) )
96+ const tmp = yield * Effect . acquireRelease (
97+ Effect . promise ( ( ) => tmpdir ( ) ) ,
98+ ( tmp ) => Effect . promise ( ( ) => tmp [ Symbol . asyncDispose ] ( ) ) ,
99+ )
88100 yield * Effect . promise ( ( ) => initRepo ( tmp . path , { commit : true , remote : "git@github.com:Acme/App.git" } ) )
89101 const project = yield * Project . Service
90102
@@ -99,8 +111,14 @@ describe("ProjectV2.resolve", () => {
99111
100112 it . live ( "normalizes ssh and https remotes to the same id" , ( ) =>
101113 Effect . gen ( function * ( ) {
102- const ssh = yield * Effect . acquireRelease ( Effect . promise ( ( ) => tmpdir ( ) ) , ( tmp ) => Effect . promise ( ( ) => tmp [ Symbol . asyncDispose ] ( ) ) )
103- const https = yield * Effect . acquireRelease ( Effect . promise ( ( ) => tmpdir ( ) ) , ( tmp ) => Effect . promise ( ( ) => tmp [ Symbol . asyncDispose ] ( ) ) )
114+ const ssh = yield * Effect . acquireRelease (
115+ Effect . promise ( ( ) => tmpdir ( ) ) ,
116+ ( tmp ) => Effect . promise ( ( ) => tmp [ Symbol . asyncDispose ] ( ) ) ,
117+ )
118+ const https = yield * Effect . acquireRelease (
119+ Effect . promise ( ( ) => tmpdir ( ) ) ,
120+ ( tmp ) => Effect . promise ( ( ) => tmp [ Symbol . asyncDispose ] ( ) ) ,
121+ )
104122 yield * Effect . promise ( ( ) => initRepo ( ssh . path , { commit : true , remote : "git@github.com:owner/repo.git" } ) )
105123 yield * Effect . promise ( ( ) => initRepo ( https . path , { commit : true , remote : "https://github.com/owner/repo.git" } ) )
106124 const project = yield * Project . Service
@@ -115,7 +133,10 @@ describe("ProjectV2.resolve", () => {
115133
116134 it . live ( "ignores file remotes and falls back to root commit" , ( ) =>
117135 Effect . gen ( function * ( ) {
118- const tmp = yield * Effect . acquireRelease ( Effect . promise ( ( ) => tmpdir ( ) ) , ( tmp ) => Effect . promise ( ( ) => tmp [ Symbol . asyncDispose ] ( ) ) )
136+ const tmp = yield * Effect . acquireRelease (
137+ Effect . promise ( ( ) => tmpdir ( ) ) ,
138+ ( tmp ) => Effect . promise ( ( ) => tmp [ Symbol . asyncDispose ] ( ) ) ,
139+ )
119140 yield * Effect . promise ( ( ) => initRepo ( tmp . path , { commit : true , remote : `file://${ tmp . path } ` } ) )
120141 const project = yield * Project . Service
121142
@@ -127,7 +148,10 @@ describe("ProjectV2.resolve", () => {
127148
128149 it . live ( "returns previous cached id from common dir" , ( ) =>
129150 Effect . gen ( function * ( ) {
130- const tmp = yield * Effect . acquireRelease ( Effect . promise ( ( ) => tmpdir ( ) ) , ( tmp ) => Effect . promise ( ( ) => tmp [ Symbol . asyncDispose ] ( ) ) )
151+ const tmp = yield * Effect . acquireRelease (
152+ Effect . promise ( ( ) => tmpdir ( ) ) ,
153+ ( tmp ) => Effect . promise ( ( ) => tmp [ Symbol . asyncDispose ] ( ) ) ,
154+ )
131155 yield * Effect . promise ( ( ) => initRepo ( tmp . path , { commit : true , remote : "git@github.com:owner/repo.git" } ) )
132156 yield * Effect . promise ( ( ) => Bun . write ( path . join ( tmp . path , ".git" , "opencode" ) , "old-id" ) )
133157 const project = yield * Project . Service
@@ -141,7 +165,10 @@ describe("ProjectV2.resolve", () => {
141165
142166 it . live ( "does not write the cache while resolving" , ( ) =>
143167 Effect . gen ( function * ( ) {
144- const tmp = yield * Effect . acquireRelease ( Effect . promise ( ( ) => tmpdir ( ) ) , ( tmp ) => Effect . promise ( ( ) => tmp [ Symbol . asyncDispose ] ( ) ) )
168+ const tmp = yield * Effect . acquireRelease (
169+ Effect . promise ( ( ) => tmpdir ( ) ) ,
170+ ( tmp ) => Effect . promise ( ( ) => tmp [ Symbol . asyncDispose ] ( ) ) ,
171+ )
145172 yield * Effect . promise ( ( ) => initRepo ( tmp . path , { commit : true , remote : "git@github.com:owner/repo.git" } ) )
146173 const project = yield * Project . Service
147174
@@ -153,7 +180,10 @@ describe("ProjectV2.resolve", () => {
153180
154181 it . live ( "resolves from nested directories to repo root" , ( ) =>
155182 Effect . gen ( function * ( ) {
156- const tmp = yield * Effect . acquireRelease ( Effect . promise ( ( ) => tmpdir ( ) ) , ( tmp ) => Effect . promise ( ( ) => tmp [ Symbol . asyncDispose ] ( ) ) )
183+ const tmp = yield * Effect . acquireRelease (
184+ Effect . promise ( ( ) => tmpdir ( ) ) ,
185+ ( tmp ) => Effect . promise ( ( ) => tmp [ Symbol . asyncDispose ] ( ) ) ,
186+ )
157187 yield * Effect . promise ( ( ) => initRepo ( tmp . path , { commit : true } ) )
158188 yield * Effect . promise ( ( ) => fs . mkdir ( path . join ( tmp . path , "a" , "b" ) , { recursive : true } ) )
159189 const project = yield * Project . Service
@@ -166,9 +196,14 @@ describe("ProjectV2.resolve", () => {
166196
167197 it . live ( "linked worktree returns opened worktree directory and previous from common dir" , ( ) =>
168198 Effect . gen ( function * ( ) {
169- const tmp = yield * Effect . acquireRelease ( Effect . promise ( ( ) => tmpdir ( ) ) , ( tmp ) => Effect . promise ( ( ) => tmp [ Symbol . asyncDispose ] ( ) ) )
199+ const tmp = yield * Effect . acquireRelease (
200+ Effect . promise ( ( ) => tmpdir ( ) ) ,
201+ ( tmp ) => Effect . promise ( ( ) => tmp [ Symbol . asyncDispose ] ( ) ) ,
202+ )
170203 const worktree = `${ tmp . path } -worktree`
171- yield * Effect . addFinalizer ( ( ) => Effect . promise ( ( ) => $ `rm -rf ${ worktree } ` . quiet ( ) . nothrow ( ) ) . pipe ( Effect . ignore ) )
204+ yield * Effect . addFinalizer ( ( ) =>
205+ Effect . promise ( ( ) => $ `rm -rf ${ worktree } ` . quiet ( ) . nothrow ( ) ) . pipe ( Effect . ignore ) ,
206+ )
172207 yield * Effect . promise ( ( ) => initRepo ( tmp . path , { commit : true , remote : "git@github.com:owner/repo.git" } ) )
173208 yield * Effect . promise ( ( ) => Bun . write ( path . join ( tmp . path , ".git" , "opencode" ) , "old-id" ) )
174209 yield * Effect . promise ( ( ) => $ `git worktree add ${ worktree } -b test-${ Date . now ( ) } ` . cwd ( tmp . path ) . quiet ( ) )
0 commit comments