diff --git a/shower.cabal b/shower.cabal
--- a/shower.cabal
+++ b/shower.cabal
@@ -1,5 +1,5 @@
 name: shower
-version: 0.2.0.2
+version: 0.2.0.3
 synopsis: Clean up the formatting of 'show' output
 -- description:
 license: BSD3
@@ -28,7 +28,7 @@
     Shower.Parser
     Shower.Class
   build-depends:
-    base >=4.10 && <4.14,
+    base >=4.10 && <4.18,
     megaparsec,
     pretty
   hs-source-dirs: lib
@@ -38,7 +38,7 @@
 executable shower
   main-is: Main.hs
   build-depends:
-    base >=4.10 && <4.14,
+    base >=4.10 && <4.18,
     shower
   hs-source-dirs: exe
   default-language: Haskell2010
@@ -50,7 +50,7 @@
     Property
   type: exitcode-stdio-1.0
   build-depends:
-    base >=4.10 && <4.14,
+    base >=4.10 && <4.18,
     aeson,
     tasty,
     tasty-golden,
diff --git a/tests/Property.hs b/tests/Property.hs
--- a/tests/Property.hs
+++ b/tests/Property.hs
@@ -1,10 +1,10 @@
+{-# LANGUAGE CPP #-}
 {-# LANGUAGE TemplateHaskell #-}
 
 module Property where
 
 import qualified Data.Text as Text
 import qualified Data.Vector as Vector
-import qualified Data.HashMap.Strict as HashMap
 import qualified Data.Aeson as Aeson
 import qualified Data.ByteString.Lazy.UTF8 as UTF8
 
@@ -12,18 +12,32 @@
 import Test.Tasty
 import Test.Tasty.QuickCheck
 
+#if MIN_VERSION_aeson(2,0,0)
+import qualified Data.Aeson.Key as Key
+import qualified Data.Aeson.KeyMap as KeyMap
+#else
+import qualified Data.HashMap.Strict as HashMap
+#endif
+
 import Shower
 
 -- | 'Aeson.Value' generator, stolen from @api-tools@.
 genJSON :: Gen Aeson.Value
 genJSON = sized $ \size -> oneof [
-    Aeson.Object . HashMap.fromList <$>
-        resize (size `div` 2) (listOf ((,) <$> (Text.pack <$> arbitrary) <*> genJSON)),
+    Aeson.Object . objectFromList <$>
+        resize (size `div` 2) (listOf ((,) <$> (keyFromText . Text.pack <$> arbitrary) <*> genJSON)),
     Aeson.Array . Vector.fromList <$> resize (size `div` 2) (listOf genJSON),
     Aeson.String . Text.pack <$> arbitrary,
     Aeson.Number . fromInteger <$> arbitrary,
     Aeson.Bool <$> arbitrary,
     pure Aeson.Null ]
+  where
+    (objectFromList, keyFromText) =
+#if MIN_VERSION_aeson(2,0,0)
+      (KeyMap.fromList, Key.fromText)
+#else
+      (HashMap.fromList, id)
+#endif
 
 -- | Test that formatting always works on JSON and never changes it.
 prop_JSON :: Property
