diff --git a/ChangeLog.md b/ChangeLog.md
new file mode 100644
--- /dev/null
+++ b/ChangeLog.md
@@ -0,0 +1,10 @@
+# 0.1.7
+- support aeson-2.0 (#1)
+
+# 0.1.6.1
+- allow newer base
+
+----
+
+# 0.1.6 and earlier
+releases done by the original author, Chris Done
diff --git a/sourcemap.cabal b/sourcemap.cabal
--- a/sourcemap.cabal
+++ b/sourcemap.cabal
@@ -1,5 +1,5 @@
 name:                sourcemap
-version:             0.1.6.1
+version:             0.1.7
 synopsis:            Implementation of source maps as proposed by Google and Mozilla.
 description:         Implementation of source maps, revision 3, proposed by Google and Mozilla here
                      <https://wiki.mozilla.org/DevTools/Features/SourceMap> and here
@@ -13,7 +13,8 @@
 copyright:           2012 Chris Done
 category:            Development
 build-type:          Simple
-cabal-version:       >=1.10
+cabal-version:       1.18
+extra-doc-files:     ChangeLog.md
 
 source-repository head
     type:     git
@@ -26,7 +27,7 @@
   other-modules:       VLQ
   hs-source-dirs:      src
   build-depends:       base >= 4.5 && < 5,
-                       bytestring >= 0.10.2 && < 0.11,
+                       bytestring >= 0.10.2,
                        aeson,
                        unordered-containers,
                        attoparsec,
diff --git a/src/SourceMap.hs b/src/SourceMap.hs
--- a/src/SourceMap.hs
+++ b/src/SourceMap.hs
@@ -12,18 +12,21 @@
 import           Control.Monad hiding (forM_)
 import           Control.Monad.ST
 import           Data.Aeson hiding ((.=))
+#if MIN_VERSION_aeson(2,0,0)
+import qualified Data.Aeson.KeyMap as Map
+#else
+import qualified Data.HashMap.Lazy as Map
+#endif
 import           Data.ByteString.Lazy (ByteString)
-import qualified Data.ByteString.Lazy as Bytes
-import           Data.ByteString.Lazy.UTF8 (fromString)
+import qualified Data.ByteString.Lazy as B
+import qualified Data.ByteString.Lazy.UTF8 as U
 import           Data.ByteString.Builder (Builder(), lazyByteString, toLazyByteString)
 import           Data.Foldable (forM_)
-import qualified Data.HashMap.Lazy as Map
 #if !MIN_VERSION_base(4,11,0)
 import Data.Monoid ((<>))
 #endif
 import           Data.List
 import           Data.Maybe
-import           Data.Ord
 import           Data.STRef
 import           Data.Text (Text)
 import           Data.Text.Lazy.Encoding (decodeUtf8)
@@ -43,7 +46,7 @@
 
 -- | Encode the mappings to the source map format.
 encodeMappings :: [FilePath] -> [Text] -> [Mapping] -> ByteString
-encodeMappings sources names = go . sortBy (comparing mapGenerated) where
+encodeMappings sources names = go . sortOn mapGenerated where
   go mappings = runST $ do
     -- State.
     prevGenCol   <- newSTRef 0
@@ -60,11 +63,11 @@
       updating prevGenLine $ \previousGeneratedLine ->
         if posLine mapGenerated /= previousGeneratedLine
            then do prevGenCol .= 0
-                   result += Bytes.replicate (fromIntegral (posLine mapGenerated - previousGeneratedLine))
+                   result += B.replicate (fromIntegral (posLine mapGenerated - previousGeneratedLine))
                                              (fromIntegral (fromEnum ';'))
                    return (posLine mapGenerated)
            else do when (i > 0)
-                        (result += fromString ",")
+                        (result += U.fromString ",")
                    return previousGeneratedLine
       -- Original generated column (also offsetted from previous entries).
       updating prevGenCol $ \previousGeneratedColumn -> do
diff --git a/src/VLQ.hs b/src/VLQ.hs
--- a/src/VLQ.hs
+++ b/src/VLQ.hs
@@ -102,8 +102,8 @@
 
 -- | Encode the given base 64 character to a number.
 decodeBase64 :: Word8 -> Word8
-decodeBase64 i = fromMaybe (error "Not a valid base 65 digit.")
-                 (lookup i (zip base64Chars [0..]))
+decodeBase64 i = maybe (error "Not a valid base 65 digit.") toEnum
+                 (elemIndex i base64Chars)
 
 -- | Makes the code more familiar to read. Shift-left.
 (<<) :: Int32 -> Int -> Int32
diff --git a/test/Node.hs b/test/Node.hs
--- a/test/Node.hs
+++ b/test/Node.hs
@@ -53,8 +53,8 @@
           ["var s = require('source-map');"
           ,""
           ,"var generator = new s.SourceMapGenerator({"] ++
-          [intercalate "," (["file: " ++ show smFile] ++
-                           ["sourceRoot: " ++ show root | Just root <- [smSourceRoot]])] ++
+          [intercalate "," (("file: " ++ show smFile) :
+                             ["sourceRoot: " ++ show root | Just root <- [smSourceRoot]])] ++
           ["});"
           ,""] ++
           map addMapping smMappings ++
