Skip to content

Toml.parse: support TOML 1.1 #10179

Closed

Description

@jayhemnani9910

TOML 1.1.0 is out (toml.io/en/v1.1.0). Toml.parse rejects the documents it adds:

point = {
  x = 1,   # inline tables may span lines, with comments and a trailing comma
  y = 2,
}
escape = "\e[0m \x41"   # \e and \xHH
time = 13:37            # seconds are optional

Invalid escape '\x', Expected a key, Invalid value '13:37'. In the toml-test 1.1.0 suite, 12 valid documents are rejected today (the one left after the change is integer/long.toml, int64 max, which the suite marks optional).

I have a change in encoding/Toml.ts that adds these: inline tables skip newlines and comments like arrays do and accept a trailing comma, \e and \xHH join the escapes, and a time without seconds is read as :00 (local times come back as "13:37:00", offset ones as the same Date). With it, toml-test 1.1.0 rejects 1 valid document instead of 12 and accepts no invalid one that it rejected before. Under the 1.0.0 suite it now accepts 9 documents that 1.0 calls invalid, all of them the 1.1 additions.

Would you take it? It's a minor changeset with a test in Toml.test.ts.

Activity

  1. self-assigned this
    on Oct 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions