packages feed

relay-pagination-hasql 0.1.1.1 → 0.1.1.2

raw patch · 4 files changed

+37/−7 lines, 4 filesdep +directorydep +unixdep ~ephemeral-pgdep ~relay-paginationPVP ok

version bump matches the API change (PVP)

Dependencies added: directory, unix

Dependency ranges changed: ephemeral-pg, relay-pagination

API changes (from Hackage documentation)

Files

CHANGELOG.md view
@@ -2,6 +2,12 @@  Versioning follows the [Haskell Package Versioning Policy](https://pvp.haskell.org/). +## 0.1.1.2 — 2026-10-06++### Fixed++- Use released ephemeral-pg >=0.3.1 && <0.4 and one stable effective-uid temporary root shared by database fixtures and the example service, preserving startup stale-instance sweeping.+ ## 0.1.1.1 — 2026-10-05  ### Other Changes
relay-pagination-hasql.cabal view
@@ -1,6 +1,6 @@ cabal-version:   3.0 name:            relay-pagination-hasql-version:         0.1.1.1+version:         0.1.1.2 synopsis:   Keyset-pagination engine producing Relay connections from hasql queries @@ -52,7 +52,7 @@     , bytestring                >=0.11     && <0.13     , hasql                     >=1.10     && <1.11     , hasql-dynamic-statements  >=0.5.1    && <0.6-    , relay-pagination          ^>=0.1.1.1+    , relay-pagination          ^>=0.1.1.2     , text                      >=2.0      && <2.2     , time                      >=1.12     && <1.15     , uuid                      >=1.3      && <1.4@@ -60,9 +60,10 @@ test-suite relay-pagination-hasql-tests   import:         lang   type:           exitcode-stdio-1.0-  hs-source-dirs: test+  hs-source-dirs: test test-support   main-is:        Main.hs   other-modules:+    Relay.Pagination.Test.Postgres     Test.Codec     Test.Connection     Test.Fingerprint@@ -72,10 +73,11 @@   build-depends:     , base     , bytestring-    , ephemeral-pg+    , directory+    , ephemeral-pg              >=0.3.1    && <0.4     , hasql     , hasql-dynamic-statements-    , relay-pagination          ^>=0.1.1.1+    , relay-pagination          ^>=0.1.1.2     , relay-pagination-hasql     , tasty     , tasty-golden@@ -83,4 +85,5 @@     , tasty-quickcheck     , text     , time+    , unix     , uuid
+ test-support/Relay/Pagination/Test/Postgres.hs view
@@ -0,0 +1,18 @@+{-# LANGUAGE ImportQualifiedPost #-}++-- | PostgreSQL configuration shared by Relay tests and the example service.+-- A stable short effective-uid root lets subsequent runs sweep abandoned+-- clusters across shell sessions. Default startup sweeping stays enabled.+module Relay.Pagination.Test.Postgres (ephemeralPgConfig) where++import Data.Monoid (Last (..))+import EphemeralPg qualified as Pg+import System.Directory (createDirectoryIfMissing)+import System.Posix.User (getEffectiveUserID)++ephemeralPgConfig :: IO Pg.Config+ephemeralPgConfig = do+  uid <- getEffectiveUserID+  let root = "/tmp/ephpg-relay-" <> show uid+  createDirectoryIfMissing True root+  pure Pg.defaultConfig {Pg.temporaryRoot = Last (Just root)}
test/Test/Integration.hs view
@@ -43,6 +43,7 @@     timestamptzKey,   ) import Relay.Pagination.Hasql.KeyCodec (microsToUtcTime)+import Relay.Pagination.Test.Postgres (ephemeralPgConfig) import Test.Tasty import Test.Tasty.HUnit @@ -186,9 +187,10 @@  acquire :: IO (Pg.Database, Connection.Connection) acquire = do+  config <- ephemeralPgConfig   db <-     either (fail . Text.unpack . Pg.renderStartError) pure-      =<< Pg.startCached Pg.defaultConfig Pg.defaultCacheConfig+      =<< Pg.startCached config Pg.defaultCacheConfig   conn <- either (fail . show) pure =<< Connection.acquire (Pg.connectionSettings db)   run conn createSchema   run conn (mapM_ insertRow seedRows)@@ -229,7 +231,8 @@ -- section for the expected transcript. demo :: IO () demo = do-  result <- Pg.with \db -> do+  config <- ephemeralPgConfig+  result <- Pg.withConfig config \db -> do     conn <- either (fail . show) pure =<< Connection.acquire (Pg.connectionSettings db)     run conn createSchema     run conn (mapM_ insertRow seedRows)