Skip to content

Latest commit

 

History

History
309 lines (277 loc) · 15.2 KB

CHANGELOG.md

File metadata and controls

309 lines (277 loc) · 15.2 KB

0.4.1 (April 12, 2019)

A bugfix release removing unused Xcode project scheme to improve build time for Carthage users.

Notable changes

0.4.0 (April 8, 2019)

This is a release with plenty of new features that allow you to parse many more XML variations than previously. Compatibility with Xcode 10.2 and Swift 5.0 is also improved. A huge thank you to @JoeMatt and @regexident for their contributions, to @hodovani for maintaining the project, and to @Inukinator, @qmoya, @Ma-He, @khoogheem and @thecb4 for reporting issues during development!

Notable changes

  • Ordered encoding: this was one of the most requested changes and it's finally here! 🎉 Now both keyed and unkeyed elements are encoded in the exactly same order that was used in original containers. This is applicable to both compiler-generated encoding implementations (just reorder properties or cases in your CodingKeys enum if you have it) and manually implemented func encode(to: Encoder).
  • Stripping namespace prefix: now if your coding key string values contain an XML namespace prefix (e.g. prefix h in <h:td>Apples</h:td>), you can set shouldProcessNamespaces property to true on your XMLDecoder instance for the prefix to be stripped before decoding keys in your Decodable types.
  • Previously it was possible to customize encoding with NodeEncodingStrategy, but no such type existed for decoding. A corresponding NodeDecodingStrategy type was added with nodeDecodingStrategy property on XMLDecoder.
  • Thanks to the previous change, XMLCoder now provides two helper protocols that allow you to easily customize whether nodes are encoded and decoded as attributes or elements for conforming types: DynamicNodeEncoding and DynamicNodeDecoding.
  • Previously if you needed to decode or encode an XML element with both attributes and values, this was impossible to do with XMLCoder. Now with the addition of coding key value intrinsic, this is as easy as adding one coding key with a specific string raw value ("value" or empty string "" if you already have an XML attribute named "value").

Closed issues

  • Crash: Range invalid bounds in XMLStackParser.swift #83
  • Document DynamicNodeEncoding and attributed intrinsic #80
  • Fix nested attributed intrinsic #78
  • nodeEncodingStrategy #49
  • XmlEncoder: ordering of elements #17
  • Can’t reach an XML value #12

Merged pull requests

0.3.1 (February 6, 2019)

A bugfix release that adds missing CFBundleVersion in generated framework's Info.plist (#72 reported by @stonedauwg).

Changes

0.3.0 (January 22, 2019)

A maintenance release focused on fixing bugs, improving error reporting and overall internal architecture of the library. For this release we've started tracking test coverage and were able to increase it from 11.8% to 75.6%. 🎉 Thanks to @hodovani and @regexident for their work on improving test coverage in this release.

Additions

You can now set errorContextLength: UInt property on XMLDecoder instance, which will make it add a snippet of XML of at most this length from parser state when a parsing error occurs. This change was provided by @hodovani and can greatly help with attempts to parse invalid XML, where previously only a line and column number were reported.

Deprecations

NodeEncodingStrategies was renamed to NodeEncodingStrategy for consistency. NodeEncodingStrategies is still available as a deprecated typealias, which will be removed in future versions. Thanks to @regexident for cleaning this up and providing many more changes in this release that make XMLCoder better and easier to use.

Changes

0.2.1 (November 18, 2018)

  • watchOS deployment target set to 2.0 for Carthage (@MaxDesiatov)

0.2.0 (November 18, 2018)

0.1.1 (November 18, 2018)

0.1.0 (November 8, 2018)

  • Add support for decoupled, type-dependent node-encoding strategies (@regexident)
  • Add missing visibility declarations (@regexident)
  • Improve .gitignore and remove tracked *.xcuserdata files (@regexident)
  • Make XMLEncoder.OutputFormatting.prettyPrinted actually do something (@regexident)
  • Add tvOS deployment target to podspec (@edc1591)
  • Fix Carthage command (@salavert)
  • Set deployment versions to allow older SDKs (@Lutzifer)
  • Add Info.plist to allow Framework use in App Store Connect via Carthage (@Lutzifer)
  • Set CURRENT_PROJECT_VERSION (@Lutzifer)
  • Add convertFromCapitalized strategy, simple test (@MaxDesiatov)
  • Allow older iOS/tvOS deployment targets in podspec (@MaxDesiatov)