packages feed

aeson-yaml 1.0.2.0 → 1.0.3.0

raw patch · 4 files changed

+23/−6 lines, 4 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

CHANGELOG.md view
@@ -1,12 +1,18 @@ # Changelog +## 1.0.3.0 - 2019-11-03++### Fixed++  - Encode empty lists as "[]" rather than "\n -"+ ## 1.0.2.0 - 2019-10-15  ### Changed    - Only quote YAML 1.2 boolean strings "true" and "false" (upper or     lowercase), not "on", "off", "yes", "y", "no", "n" (if you want to quote-    these strings, use `encodeQuoted`.+    these strings, use `encodeQuoted`).  ## 1.0.1.0 - 2019-10-15 
aeson-yaml.cabal view
@@ -1,7 +1,7 @@ cabal-version: 1.12  name:           aeson-yaml-version:        1.0.2.0+version:        1.0.3.0 homepage:       https://github.com/clovyr/aeson-yaml bug-reports:    https://github.com/clovyr/aeson-yaml/issues author:         Patrick Nielsen
src/Data/Aeson/Yaml.hs view
@@ -90,10 +90,14 @@       intersperse prefix $ map (keyValue level) (sortOn fst $ HashMap.toList hm)       where prefix = bs "\n" <> indent level     Array vec ->-      mconcat $-      (prefix :) $-      intersperse prefix $-      map (encodeBuilder alwaysQuote False (level + 1)) (Vector.toList vec)+      if Vector.null vec+        then bs " []"+        else mconcat $+             (prefix :) $+             intersperse prefix $+             map+               (encodeBuilder alwaysQuote False (level + 1))+               (Vector.toList vec)       where prefix = bs "\n" <> indent level <> bs "- "     String s -> encodeText True alwaysQuote level s     Number n -> bl (Data.Aeson.encode n)
test/Test/Data/Aeson/Yaml.hs view
@@ -46,6 +46,8 @@    "multiLine": "The first line is followed by the\nsecond line\n",    "multiLineWithSpaces": "         This has extra\n     spaces at the beginning\n",    "notMultiline": "This won't be\nmulti-lined",+   "list": ["foo", "bar", "baz"],+   "listEmpty": [],    "apiVersion": "apps/v1",    "kind": "Deployment",    "metadata": {@@ -107,6 +109,11 @@ isFalse: false isTrue: true kind: Deployment+list:+  - foo+  - bar+  - baz+listEmpty: [] metadata:   labels:     app: foo