hslua-module-path 1.0.3 → 1.1.0
raw patch · 6 files changed
+39/−24 lines, 6 filesdep ~hslua-coredep ~hslua-marshallingdep ~hslua-packagingPVP ok
version bump matches the API change (PVP)
Dependency ranges changed: hslua-core, hslua-marshalling, hslua-packaging, tasty-lua
API changes (from Hackage documentation)
Files
- CHANGELOG.md +9/−0
- LICENSE +1/−1
- hslua-module-path.cabal +10/−11
- src/HsLua/Module/Path.hs +5/−6
- test/test-hslua-module-path.hs +2/−2
- test/test-path.lua +12/−4
CHANGELOG.md view
@@ -2,6 +2,15 @@ `hslua-module-paths` uses [PVP Versioning][]. +## hslua-module-path-1.1.0++Released 2023-03-13.++- Update to hslua-2.3; this includes the addition of type+ initializers to the module and type specifiers to the fields.++- Fixed tests for `make_relative` on Windows.+ ## hslua-module-path-1.0.3 Released 2022-08-19.
LICENSE view
@@ -1,6 +1,6 @@ MIT License -Copyright © 2020-2022 Albert Krewinkel+Copyright © 2020-2023 Albert Krewinkel Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal
hslua-module-path.cabal view
@@ -1,6 +1,6 @@ cabal-version: 2.2 name: hslua-module-path-version: 1.0.3+version: 1.1.0 synopsis: Lua module to work with file paths. description: Lua module to work with file paths in a platform independent way.@@ -9,21 +9,20 @@ license: MIT license-file: LICENSE author: Albert Krewinkel-maintainer: Albert Krewinkel <albert@zeitkraut.de>-copyright: © 2020-2022 Albert Krewinkel+maintainer: Albert Krewinkel <tarleb@hslua.org>+copyright: © 2020-2023 Albert Krewinkel category: Foreign build-type: Simple extra-doc-files: README.md CHANGELOG.md extra-source-files: test/test-path.lua-tested-with: GHC == 8.0.2- , GHC == 8.2.2- , GHC == 8.4.4+tested-with: GHC == 8.4.4 , GHC == 8.6.5 , GHC == 8.8.4 , GHC == 8.10.7 , GHC == 9.0.2- , GHC == 9.2.3+ , GHC == 9.2.5+ , GHC == 9.4.4 source-repository head type: git@@ -33,9 +32,9 @@ common common-options build-depends: base >= 4.9.1 && < 5 , filepath >= 1.4 && < 1.5- , hslua-core >= 2.1 && < 2.3- , hslua-marshalling >= 2.1 && < 2.3- , hslua-packaging >= 2.1 && < 2.3+ , hslua-core >= 2.1 && < 2.4+ , hslua-marshalling >= 2.1 && < 2.4+ , hslua-packaging >= 2.3 && < 2.4 , text >= 1.2 && < 2.1 ghc-options: -Wall@@ -69,7 +68,7 @@ , hslua-module-path , tasty , tasty-hunit- , tasty-lua >= 1.0 && < 1.1+ , tasty-lua >= 1.0 && < 1.2 , text ghc-options: -threaded -rtsopts
src/HsLua/Module/Path.hs view
@@ -1,10 +1,9 @@-{-# LANGUAGE CPP #-} {-# LANGUAGE OverloadedStrings #-} {-| Module : HsLua.Module.Path-Copyright : © 2021-2022 Albert Krewinkel+Copyright : © 2021-2023 Albert Krewinkel License : MIT-Maintainer : Albert Krewinkel <albert+hslua@zeitkraut.de>+Maintainer : Albert Krewinkel <tarleb@hslua.org> Lua module to work with file paths. -}@@ -33,9 +32,6 @@ ) where -#if !MIN_VERSION_base(4,11,0)-import Data.Semigroup (Semigroup(..)) -- includes (<>)-#endif import Data.Text (Text) import Data.Version (Version, makeVersion) import HsLua.Core@@ -55,6 +51,7 @@ , moduleFields = fields , moduleFunctions = functions , moduleOperations = []+ , moduleTypeInitializers = [] } --@@ -72,6 +69,7 @@ separator :: Field e separator = Field { fieldName = "separator"+ , fieldType = "string" , fieldDescription = "The character that separates directories." , fieldPushValue = pushString [Path.pathSeparator] }@@ -80,6 +78,7 @@ search_path_separator :: Field e search_path_separator = Field { fieldName = "search_path_separator"+ , fieldType = "string" , fieldDescription = "The character that is used to separate the entries in " <> "the `PATH` environment variable." , fieldPushValue = pushString [Path.searchPathSeparator]
test/test-hslua-module-path.hs view
@@ -2,9 +2,9 @@ {-# LANGUAGE TypeApplications #-} {-| Module : Main-Copyright : © 2021-2022 Albert Krewinkel+Copyright : © 2021-2023 Albert Krewinkel License : MIT-Maintainer : Albert Krewinkel <albert+hslua@zeitkraut.de>+Maintainer : Albert Krewinkel <tarleb@hslua.org> Stability : stable Portability : Requires language extensions ForeignFunctionInterface, OverloadedStrings.
test/test-path.lua view
@@ -179,10 +179,18 @@ ) end), test('no change if base differs', function()- assert.are_equal(- path.make_relative('foo/baz/file.txt', '/foo/bar', true),- 'foo/baz/file.txt'- )+ if path.separator == '\\' then+ -- we're on windows+ assert.are_equal(+ path.make_relative('c:/foo/baz/file.txt', 'd:/foo/bar', true),+ 'c:/foo/baz/file.txt'+ )+ else+ assert.are_equal(+ path.make_relative('foo/baz/file.txt', '/foo/bar', true),+ 'foo/baz/file.txt'+ )+ end end), test('long base path ', function() assert.are_equal(