packages feed

glob-imports 0.0.3.0 → 0.0.4.0

raw patch · 3 files changed

+8/−3 lines, 3 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

ChangeLog.md view
@@ -1,5 +1,10 @@ # Changelog for glob-imports +## 0.0.4.0++- [#8](https://github.com/parsonsmatt/glob-imports/pull/8)+    - Made the `glob-imports` output deterministic.+ ## 0.0.3.0  - [#7](https://github.com/parsonsmatt/glob-imports/pull/7)
glob-imports.cabal view
@@ -5,7 +5,7 @@ -- see: https://github.com/sol/hpack  name:           glob-imports-version:        0.0.3.0+version:        0.0.4.0 synopsis:       Import modules for metaprogramming description:    This package provides an executable for importing modules in a directory and splicing those in. Please see the README on GitHub at <https://github.com/parsonsmatt/glob-imports#readme> category:       Metaprogramming
src/GlobImports/Exe.hs view
@@ -160,7 +160,7 @@       simplifyPath :: String -> String       simplifyPath = (intercalate "/") . (filter (/= mempty)) . (splitOn "/") --- | Returns a list of relative paths to all files in the given directory.+-- | Returns a sorted list of relative paths to all files in the given directory. getFiles     :: FilePath     -- ^ The glob pattern to filter with.@@ -170,7 +170,7 @@ getFiles baseDir pat = do     (exitCode, out, err) <- (readProcess $ proc "find" [baseDir, "-wholename", pat]) `catch` handler     pure $ case exitCode of-        ExitSuccess -> Right . lines . Text.unpack . decodeUtf8 . LBS.toStrict $ out+        ExitSuccess -> Right . sort . lines . Text.unpack . decodeUtf8 . LBS.toStrict $ out         ExitFailure _ -> Left . Text.unpack . decodeUtf8 . LBS.toStrict $ err     where       handler :: SomeException -> IO (ExitCode, LBS.ByteString, LBS.ByteString)