refactor: bun run fmt

This commit is contained in:
orion kindel
2026-01-28 10:13:53 -06:00
parent e492162253
commit dd518a10eb
11 changed files with 81 additions and 75 deletions

View File

@@ -74,7 +74,8 @@ instance
( MonadAff m
, MonadSession (SessionT m)
, MonadCursor (CursorT t (SessionT m)) t
) => MonadPostgres
) =>
MonadPostgres
(PostgresT m)
(SessionT m)
(CursorT ct (SessionT m))
@@ -117,6 +118,7 @@ runPostgres cfg m =
let
acq :: RE Unit m Pool
acq = liftEffect $ Pool.make @r @missing @trash cfg
rel :: _ -> Pool -> RE Unit m Unit
rel _ p = RE.liftExcept $ hoist liftAff $ Pool.end p
in

View File

@@ -8,15 +8,16 @@ export const isInstanceOfBuffer = a => a instanceof Buffer
/** @type {(a: unknown) => boolean} */
export const isInstanceOfInterval = a => {
return typeof a === 'object'
&& a !== null
&& ('years' in a
|| 'months' in a
|| 'days' in a
|| 'hours' in a
|| 'minutes' in a
|| 'seconds' in a
|| 'milliseconds' in a
return (
typeof a === 'object' &&
a !== null &&
('years' in a ||
'months' in a ||
'days' in a ||
'hours' in a ||
'minutes' in a ||
'seconds' in a ||
'milliseconds' in a)
)
}

View File

@@ -225,6 +225,7 @@ spec =
let
durationFromGenInterval :: forall d. Semigroup d => Duration d => Newtype d Number => GenIntervalSubMonth -> d
durationFromGenInterval = fromMaybe (wrap 0.0) <<< Interval.toDuration <<< unwrap
durationEq :: forall d. Duration d => Newtype d Number => d -> d -> Boolean
durationEq a b = Number.abs (unwrap a - unwrap b) <= 0.001
check @Milliseconds @GenIntervalSubMonth { purs: "Milliseconds", sql: "interval", fromArb: durationFromGenInterval, isEq: durationEq }

View File

@@ -121,7 +121,8 @@ spec =
either <-
flip RE.toEither unit
$ parSequence
$ [ liftAff $ throwError $ Exn.error "a"
$
[ liftAff $ throwError $ Exn.error "a"
, pure "a"
]
isLeft either `shouldEqual` true
@@ -129,7 +130,8 @@ spec =
either <-
flip RE.toEither unit
$ parOneOf
$ [ liftAff $ throwError $ Exn.error "a"
$
[ liftAff $ throwError $ Exn.error "a"
, liftAff $ throwError $ Exn.error "b"
]
isLeft either `shouldEqual` true