Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@iarna/toml

Package Overview
Dependencies
Maintainers
1
Versions
29
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@iarna/toml - npm Package Versions

23

3.0.0

Diff

iarna
published 2.2.5 •

iarna
published 2.2.4 •

Changelog

Source

2.2.4

  • Bug fix: Plain date literals (not datetime) immediately followed by another statement (no whitespace or blank line) would crash. Fixes #19 and #23, thank you @arnau and @jschaf for reporting this!
  • Bug fix: Hex literals with lowercase Es would throw errors. (Thank you @DaeCatt for this fix!) Fixed #20
  • Some minor doc tweaks
  • Added Node 12 and 13 to Travis. (Node 6 is failing there now, mysteriously. It works on my machine™, shipping anyway. 🙃)
iarna
published 2.2.3 •

Changelog

Source

2.2.3

This release just updates the spec compliance tests and benchmark data to better represent @ltd/j-toml.

iarna
published 2.2.2 •

Changelog

Source

2.2.2

Fixes

  • Support parsing and stringifying objects with __proto__ properties. (@LongTengDao)

Misc

  • Updates for spec compliance and benchmarking:
    • @sgarciac/bombadil -> 2.1.0
    • toml -> 3.0.0
  • Added spec compliance and benchmarking for:
    • @ltd/j-toml
iarna
published 2.2.1 •

Changelog

Source

2.2.1

Fixes

  • Fix bug where keys with names matching javascript Object methods would error. Thanks @LongTengDao for finding this!
  • Fix bug where a bundled version would fail if util.inspect wasn't provided. This was supposed to be guarded against, but there was a bug in the guard. Thanks @agriffis for finding and fixing this!

Misc

  • Update the version of bombadil for spec compliance and benchmarking purposes to 2.0.0

Did you know?

Node 6 and 8 are measurably slower than Node 6, 10 and 11, at least when it comes to parsing TOML!

iarna
published 2.2.0 •

Changelog

Source

2.2.0

Features

  • Typescript: Lots of improvements to our type definitions, many many to @jorgegonzalez and @momocow for working through these.

Fixes

  • Very large integers (>52bit) are stored as BigInts on runtimes that support them. BigInts are 128bits, but the TOML spec limits its integers to 64bits. We now limit our integers to 64bits as well.
  • Fix a bug in stringify where control characters were being emitted as unicode chars and not escape sequences.

Misc

  • Moved our spec tests out to an external repo
  • Improved the styling of the spec compliance comparison
iarna
published 2.1.1 •

Changelog

Source

2.1.1

Fixes

iarna
published 2.1.0 •

Changelog

Source

2.1.0

Features

  • Types for typescript support, thank you @momocow!

Fixes

  • stringify: always strip invalid dates. This fixes a bug where an invalid date in an inline array would not be removed and would instead result in an error.
  • stringify: if an invalid type is found make sure it's thrown as an error object. Previously the type name was, unhelpfully, being thrown.
  • stringify: Multiline strings ending in a quote would generate invalid TOML.
  • parse: Error if a signed integer has a leading zero, eg, -01 or +01.
  • parse: Error if _ appears at the end of the integer part of a float, eg 1_.0. _ is only valid between digits.

Fun

  • BurntSushi's comprehensive TOML 0.4.0 test suite is now used in addition to our existing test suite.
  • You can see exactly how the other JS TOML libraries stack up in testing against both BurntSushi's tests and my own in the new TOML-SPEC-SUPPORT doc.
iarna
published 2.0.0 •

Changelog

Source

2.0.0

With 2.0.0, @iarna/toml supports the TOML v0.5.0 specification. TOML 0.5.0 brings some changes:

  • Delete characters (U+007F) are not allowed in plain strings. You can include them with escaped unicode characters, eg \u007f.
  • Integers are specified as being 64bit unsigned values. These are supported using BigInts if you are using Node 10 or later.
  • Keys may be literal strings, that is, you can use single quoted strings to quote key names, so the following is now valid: 'a"b"c' = 123
  • The floating point values nan, inf and -inf are supported. The stringifier will no longer strip NaN, Infinity and -Infinity, instead serializing them as these new values..
  • Datetimes can separate the date and time with a space instead of a T, so 2017-12-01T00:00:00Z can be written as 2017-12-01 00:00:00Z.
  • Datetimes can be floating, that is, they can be represented without a timezone. These are represented in javascript as Date objects whose isFloating property is true and whose toISOString method will return a representation without a timezone.
  • Dates without times are now supported. Dates do not have timezones. Dates are represented in javascript as a Date object whose isDate property is true and whose toISOString method returns just the date.
  • Times without dates are now supported. Times do not have timezones. Times are represented in javascript as a Date object whose isTime property is true and whose toISOString method returns just the time.
  • Keys can now include dots to directly address deeper structures, so a.b = 23 is the equivalent of a = {b = 23} or [a] b = 23. These can be used both as keys to regular tables and inline tables.
  • Integers can now be specified in binary, octal and hexadecimal by prefixing the number with 0b, 0o and 0x respectively. It is now illegal to left pad a decimal value with zeros.

Some parser details were also fixed:

  • Negative zero (-0.0) and positive zero (0.0) are distinct floating point values.
  • Negative integer zero (-0) is not distinguished from positive zero (0).
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc