diff --git a/ginger.cabal b/ginger.cabal
--- a/ginger.cabal
+++ b/ginger.cabal
@@ -1,8 +1,6 @@
--- Initial ginger.cabal generated by cabal init.  For further
--- documentation, see http://haskell.org/cabal/users-guide/
-
+cabal-version:       2.2
 name:                ginger
-version:             0.10.5.0
+version:             0.10.5.1
 synopsis:            An implementation of the Jinja2 template language in Haskell
 description:         Ginger is Jinja, minus the most blatant pythonisms. Wants
                      to be feature complete, but isn't quite there yet.
@@ -17,14 +15,26 @@
 extra-source-files:  README.md
                   ,  CHANGELOG.md
 data-files: test/fixtures/*.json
-cabal-version:       >=1.10
 bug-reports:         https://github.com/tdammers/ginger/issues
 
 source-repository head
     type: git
     location: https://github.com/tdammers/ginger
 
+common deps
+  build-depends: base >=4.8 && <5
+               , aeson >=1.4.2.0 && <2.2
+               , bytestring >=0.10.8.2 && <0.12
+               , data-default >= 0.5 && <0.8
+               , mtl >= 2.2 && <2.3
+               , text >=1.2.3.1 && <2.1
+               , time >= 0.1.6.0 && <1.13
+               , transformers >= 0.3 && <0.6
+               , unordered-containers >= 0.2.5 && <0.3
+               , utf8-string >=1.0.1.1 && <1.1
+
 library
+  import: deps
   exposed-modules: Text.Ginger
                  , Text.Ginger.AST
                  , Text.Ginger.GVal
@@ -39,24 +49,14 @@
                  , Text.Ginger.Run.FuncUtils
   -- other-modules:
   -- other-extensions:
-  build-depends: base >=4.8 && <5
-               , aeson >=1.4.2.0 && <2.1
-               , aeson-pretty >=0.8.7 && <0.9
-               , bytestring >=0.10.8.2 && <0.12
+  build-depends: aeson-pretty >=0.8.7 && <0.9
                , containers >=0.6.4 && <0.7
-               , data-default >= 0.5
-               , filepath >= 1.3
-               , http-types >= 0.8 && (< 0.11 || >= 0.12)
-               , mtl >= 2.2
-               , parsec >= 3.0
+               , filepath >= 1.3 && <1.5
+               , http-types >= 0.8 && (< 0.11 || >= 0.12) && <0.13
+               , parsec >= 3.0 && <3.2
                , regex-tdfa >=1.2.3 && <=1.5
-               , safe >= 0.3
-               , scientific >= 0.3
-               , text >=1.2.3.1 && <2.1
-               , time >= 0.1.6.0
-               , transformers >= 0.3
-               , unordered-containers >= 0.2.5
-               , utf8-string >=1.0.1.1 && <1.1
+               , safe >= 0.3 && <0.4
+               , scientific >= 0.3 && <0.4
                , vector >=0.12.0.2 && <0.13
   if !impl(ghc >= 8.0)
     build-depends: semigroups == 0.18.*
@@ -64,43 +64,27 @@
   default-language:    Haskell2010
 
 executable ginger
+    import: deps
     if impl(ghcjs)
         buildable: False
     main-is: GingerCLI.hs
     other-modules: Options
     hs-source-dirs: cli
     default-language:    Haskell2010
-    build-depends: base >= 4.8 && <5
-                 , ginger
-                 , aeson >=1.4.2.0 && <2.1
-                 , bytestring >=0.10.8.2 && <0.12
-                 , data-default >= 0.5
+    build-depends: ginger
                  , optparse-applicative >=0.14.3.0 && <0.18
                  , process >=1.6.5.0 && <1.7
-                 , text >=1.2.3.1 && <2.1
-                 , transformers >=0.5.6.2 && <0.7
-                 , unordered-containers >= 0.2.5
-                 , utf8-string >=1.0.1.1 && <1.1
                  , yaml >=0.11.0.0 && <0.12
 
 test-suite tests
+    import: deps
     type: exitcode-stdio-1.0
     main-is: Spec.hs
     other-modules: Text.Ginger.PropertyTests
                  , Text.Ginger.SimulationTests
     hs-source-dirs: test
     default-language: Haskell2010
-    build-depends: base >=4.8 && <5
-                 , ginger
-                 , aeson >=1.4.2.0 && <2.1
-                 , bytestring >=0.10.8.2 && <0.12
-                 , data-default >=0.5
-                 , mtl >=2.2.2 && <2.4
+    build-depends: ginger
                  , tasty >=1.2 && <1.5
                  , tasty-hunit >=0.10.0.1 && <0.11
                  , tasty-quickcheck >=0.10 && <0.11
-                 , text >=1.2.3.1 && <2.1
-                 , time >= 0.1.6.0
-                 , transformers >=0.5.6.2 && <0.7
-                 , unordered-containers >= 0.2.5
-                 , utf8-string >=1.0.1.1 && <1.1
