toml 0.16.0 toml: ^0.16.0 copied to clipboard
Parser and encoder for TOML v1.0.0 (Tom's Obvious, Minimal Language) configuration files.
Changelog #
0.16.0 #
- Parsing an invalid local date, local time, local date-time or offset date-time now throws a
TomlInvalidDateTimeException
instead of anArgumentError
. - Upgraded dependencies.
0.15.0 #
- Dart 3.2 is now required.
- Upgraded dependencies.
0.14.0 #
- Dart 2.18 is now required.
- Upgraded dependencies.
- Added
TomlDocument.loadSync
to load TOML documents synchronously. This new method is not supported on the web.
0.13.1 #
- Downgraded
meta
dependency from^1.8.0
to^1.7.0
for compatibility with Flutter3.0.1
.
0.13.0 #
- Dart 2.17 is now required.
- Upgraded dependencies.
- Removed dependency on
package:quiver
in favor ofpackage:collection
and Dart 2.14'sObject.hash
andObject.hashAll
methods.
0.12.0 #
- Dart 2.13 is now required.
- Upgraded dependencies.
- Added support for 1.0.0 compliant version of
toml-test
test suite. - Fixed parsing of multi-line literal and multi-line basic strings with up to two (unescaped) double quotes or single quotes before the closing delimiter.
- Fixed immutability of AST.
The AST is intended to be immutable, but
List
properties of the AST were only ungrowable not unmodifiable.
0.11.0 #
- Disallowed non-scalar Unicode values when encoding (multiline) basic strings.
- Added
TomlBasicString.canEncode
andTomlMultilineBasicString.canEncode
. - The constructors of
TomlBasicString
andTomlMultilineBasicString
methods throw anArgumentError
if a string cannot be encoded. - The
TomlBasicString.escape
andTomlMultilineBasicString.escape
methods throw aTomlInvalidEscapeSequenceException
if a string cannot be encoded.
- Added
- Fixed
hashCode
andoperator ==
of some AST nodes.- Two
TomlDocument
s with equal expressions now have the same hash codes. - Two
TomlPartialTime
s with equal fractional seconds now have the same hash code. - Two
TomlFloat
s that both represent anan
value are now considered equal.
- Two
- Added
TomlSimpleKey.from
factory method. - Allowed leading and trailing whitespace in
TomlKey.parse
. - Fixed
TomlKey.parentKey
forTomlKey.topLevel
. - Removed unused getter
TomlArray.itemTypes
. - Removed redundant
TomlKeyVisitor
interface. - Improved error messages.
- Upgraded dependencies.
0.10.0 #
- Added support for null-safety.
- Dart 2.12 is now required.
0.9.1 #
- Fixed pretty-printing of Windows line endings in multiline basic strings.
The
\r
in a\r\n
sequence is not escaped anymore. A carriage return that is not followed by a line feed is still escaped. - Fixed parsing of multiline basic strings with Windows newlines.
A
\r\n
sequence caused a runtime type error in previous releases because it was represented as aList
instead of aString
internally.
0.9.0 #
- Updated to v1.0.0 of the TOML specification.
- Allowed leading zeros in exponent part.
- Allowed heterogeneous arrays.
- Disallowed tables created by dotted key/value pairs to be redefined in
[table]
form and vice versa.
0.8.0 #
- Updated to v0.5.0 of the TOML specification.
- Added binary, octal and hexadecimal integer notation.
- Added special floating point values
inf
andnan
. - Added offset date-times, local date-times, local dates and local times.
- The decoder produces
TomlOffsetDateTime
,TomlLocalDateTime
,TomlLocalDate
orTomlLocalTime
values. There are methods to mapTomlOffsetDateTime
to aDateTime
. To convert the other values toDateTime
s, missing information such as date, time or offset has to be provided by the application. - UTC and local
DateTime
s are now encoded as offset date-times.
- The decoder produces
- Added support for
BigInt
s.
0.7.0 #
This is a major update that does not only bring along many changes to the internal architecture of the library but also to its public interface.
- Removed the
TomlParser
class. UseTomlDocument.parse
andTomlDocument.toMap
instead. - In preparation to support TOML v0.5.0 in an upcoming version of the library, the parser is now based on TOML's official ABNF.
- Removed the
TomlEncoder
class. UseTomlDocument.fromMap
andTomlDocument.toString
instead. - Removed the
toml.decoder
andtoml.encoder
libraries. You should always use thetoml
library instead. - Removed the
toml.loader
library as well as thetoml.loader.*
libraries. UseTomlDocument.load
instead. In order to implement a custom loading mechanism, useTomlDocument.parse
instead. - Removed the
yaml
dependency. JSON and YAML documents cannot be loaded with this package anymore. - Renamed
TomlEncodable
toTomlEncodableValue
andtoToml
totoTomlValue
. - Added
TomlEncodableKey
interface. Objects that implement this interface are allowed to be used as keys in hash maps instead of strings. TheirtoTomlKey
method must return aTomlEncodeableKey
itself or a string that can be used as a TOML key. By defaulttoTomlKey
is implemented viatoTomlValue
.
0.6.1 #
- Upgraded dependencies.
0.6.0 #
- Upgraded to Dart 2.
0.5.1 #
- Upgraded dependencies.
0.5.0 #
- Removed deprecated
use*ConfigLoader
functions. - Improved testing and added support for BurntSushi's
toml-test
suite.
0.4.0 #
- Removed deprecated
toml.browser
andtoml.server
libraries. - Dropped support for
dart_config
. There is now a customConfigLoader
interface with two default implementations. - The
use*ConfigLoader
functions are still available for backward compatibility, but are deprecated and will be removed in the next release. Each of theConfigLoader
implementations has a staticuse
method which you should use instead.
0.3.0 #
- Introduced new
toml.loader
library. - The
toml.browser
andtoml.server
libraries are now deprecated and will be removed in the next release. Use the newtoml.loader
library instead.
0.2.0 #
- Updated to v0.4.0 of the TOML specification.
- Added bare/quoted keys.
- Added inline table syntax.
- Allowed underscores in numbers.
- Removed forward slash as an escapable character.
0.1.1 #
- Fixed links and markdown.