packages feed

aeson-yaml 1.0.1.0 → 1.0.2.0

raw patch · 4 files changed

+18/−18 lines, 4 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

CHANGELOG.md view
@@ -1,5 +1,13 @@ # Changelog +## 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`.+ ## 1.0.1.0 - 2019-10-15  ### Added
aeson-yaml.cabal view
@@ -1,7 +1,7 @@ cabal-version: 1.12  name:           aeson-yaml-version:        1.0.1.0+version:        1.0.2.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
@@ -121,21 +121,15 @@   where     unquotable =       s /= "" &&-      (not $ isSpecial s) &&+      not isSpecial &&       isSafeAscii (Text.head s) &&       not (Text.all isNumberRelated s) && Text.all isAllowed s-    isSpecial s'+    isSpecial       | Text.length s > 5 = False       | otherwise =-        case Text.toLower s' of+        case Text.toLower s of           "true" -> True           "false" -> True-          "on" -> True-          "off" -> True-          "y" -> True-          "yes" -> True-          "n" -> True-          "no" -> True           _ -> False     isSafeAscii c =       (c >= 'a' && c <= 'z') ||
test/Test/Data/Aeson/Yaml.hs view
@@ -40,12 +40,11 @@    "isFalse": false,    "numberString": "12345",    "quoted ! key": true,-   "ON": "ON",-   "off": "off",+   "boolString": "true",    "piString": "3.14",    "expString": "1e3",    "multiLine": "The first line is followed by the\nsecond line\n",-   "multiLineWithSpaces": "  This has\nextra spaces at the beginning\n",+   "multiLineWithSpaces": "         This has extra\n     spaces at the beginning\n",    "notMultiline": "This won't be\nmulti-lined",    "apiVersion": "apps/v1",    "kind": "Deployment",@@ -102,8 +101,8 @@ } |]       , tcOutput =-          [s|"ON": "ON"-apiVersion: apps/v1+          [s|apiVersion: apps/v1+boolString: "true" expString: "1e3" isFalse: false isTrue: true@@ -116,12 +115,11 @@   The first line is followed by the   second line multiLineWithSpaces: |2-    This has-  extra spaces at the beginning+           This has extra+       spaces at the beginning notMultiline: "This won't be\nmulti-lined" nullValue: null numberString: "12345"-"off": "off" piString: "3.14" "quoted ! key": true spec: