packages feed

dotenv 0.3.4.0 → 0.4.0.0

raw patch · 4 files changed

+36/−20 lines, 4 filesdep +voiddep ~basedep ~dotenvdep ~hspec-megaparsecPVP ok

version bump matches the API change (PVP)

Dependencies added: void

Dependency ranges changed: base, dotenv, hspec-megaparsec, megaparsec

API changes (from Hackage documentation)

Files

CHANGELOG.md view
@@ -1,5 +1,10 @@ ## MASTER +## Dotenv 0.4.0.0++* Use Megaparsec 6.0+* Dropped support for GHC 7.6+ ## Dotenv 0.3.4.0  * Allow optparse-applicative 0.14
dotenv.cabal view
@@ -1,5 +1,5 @@ name:                dotenv-version:             0.3.4.0+version:             0.4.0.0 synopsis:            Loads environment variables from dotenv files homepage:            https://github.com/stackbuilders/dotenv-hs description:@@ -51,11 +51,11 @@  executable dotenv   main-is:             Main.hs-  build-depends:         base >=4.6 && <5.0+  build-depends:         base >=4.7 && <5.0                        , base-compat >= 0.4-                       , dotenv >= 0.3.1.0+                       , dotenv                        , optparse-applicative >=0.11 && < 0.15-                       , megaparsec >= 5.0 && < 6.0+                       , megaparsec >= 6.0 && < 7.0                        , process                        , text                        , transformers >=0.4 && < 0.6@@ -73,13 +73,16 @@                       , Configuration.Dotenv.ParsedVariable                       , Configuration.Dotenv.Text -  build-depends:         base >=4.6 && <5.0+  build-depends:         base >=4.7 && <5.0                        , base-compat >= 0.4-                       , megaparsec >= 5.0 && < 6.0+                       , megaparsec >= 6.0 && < 7.0                        , text                        , transformers >=0.4 && < 0.6                        , exceptions >= 0.8 && < 0.9 +  if !impl(ghc >= 7.10)+    build-depends:      void         == 0.7.*+   hs-source-dirs:      src   ghc-options:         -Wall   if flag(dev)@@ -100,15 +103,18 @@                        , Configuration.Dotenv.Parse                        , Configuration.Dotenv.ParsedVariable -  build-depends:       base >=4.6 && <5.0+  build-depends:       base >=4.7 && <5.0                      , base-compat >= 0.4-                     , dotenv >= 0.3.1.0-                     , megaparsec >= 5.0 && < 6.0+                     , dotenv+                     , megaparsec >= 6.0 && < 7.0                      , hspec                      , text                      , transformers >=0.4 && < 0.6                      , exceptions >= 0.8 && < 0.9-                     , hspec-megaparsec >= 0.2 && < 0.4+                     , hspec-megaparsec >= 1.0 && < 2.0++  if !impl(ghc >= 7.10)+    build-depends:      void         == 0.7.*    if flag(dev)     ghc-options:      -Wall -Werror
spec/Configuration/Dotenv/ParseSpec.hs view
@@ -6,9 +6,10 @@ import Configuration.Dotenv.ParsedVariable (ParsedVariable(..),                                             VarValue(..),                                             VarFragment(..))+import Data.Void (Void)                                             import Test.Hspec (it, describe, Spec, hspec) import Test.Hspec.Megaparsec (shouldParse, shouldFailOn)-import Text.Megaparsec (ParseError, Dec, parse)+import Text.Megaparsec (ParseError, parse)  main :: IO () main = hspec spec@@ -141,5 +142,5 @@   it "doesn't allow more configuration options after a quoted value" $     parseConfig `shouldFailOn` "foo='bar'baz='buz'" -parseConfig :: String -> Either (ParseError Char Dec) [ParsedVariable]+parseConfig :: String -> Either (ParseError Char Void) [ParsedVariable] parseConfig = parse configParser ""
src/Configuration/Dotenv/Parse.hs view
@@ -12,17 +12,21 @@ -- information on the dotenv format can be found in the project README and the -- test suite. -{-# LANGUAGE CPP #-}+{-# LANGUAGE CPP               #-}+{-# LANGUAGE OverloadedStrings #-}  module Configuration.Dotenv.Parse (configParser) where -import Configuration.Dotenv.ParsedVariable-import Control.Applicative-import Control.Monad-import Text.Megaparsec-import Text.Megaparsec.String (Parser)-import qualified Text.Megaparsec.Lexer as L+import           Configuration.Dotenv.ParsedVariable+import           Control.Applicative+import           Control.Monad+import           Data.Void                           (Void)+import           Text.Megaparsec+import           Text.Megaparsec.Char+import qualified Text.Megaparsec.Char.Lexer          as L +type Parser = Parsec Void String+ data QuoteType = SingleQuote | DoubleQuote  -- | Returns a parser for a Dotenv configuration file. Accepts key and value@@ -92,7 +96,7 @@  -- | Just like 'spaceChar', but does not consume newlines. spaceChar' :: Parser Char-spaceChar' = oneOf " \t"+spaceChar' = oneOf (" \t" :: String) {-# INLINE spaceChar' #-}  -- | Skip line comment and stop before newline character without consuming