Skip to main content
🧙‍♂️ Kris Kowal 🐘 🐙 🧛 📌 📬 Book Store

YAY 1.1.1

Release notes, October 25, 2026

binyay 2.0.0 followed on October 29: yay --canonical is now yay --check -t yay. See the 2.0.0 release notes. The libraries stay at 1.1.1.

These notes cover everything that changed since 1.0.0. YAY 1.1.1 fixes how every port reads block strings, quoted keys and list items that hold objects, and adds a canonical form for block strings. binyay, the yay command, reads and writes Markdown with YAY front matter, reads JSON strings as written, and installs from npm. For the format itself, see Yet Another YAML.

Each example below shows a command and what 1.0.0 and 1.1.1 print for it, pasted from a run of the two releases’ own binaries. (1.0.1 is the same code as 1.0.0, and reads and writes alike.)

Install

brew install kriskowal/yippee/yay   # Homebrew (via tap): 1.1.1

Or download yay for your platform from the v1.1.1 release on GitHub:

Packages: 1.1.1 is published on npm, crates.io and PyPI, with every change in these notes: the binyay and libyay packages on npm, the binyay and libyay crates on crates.io, and the libyay package on PyPI.

npm install -g binyay   # the yay command, from npm
cargo install binyay    # the yay command, from crates.io
npm install libyay      # JavaScript / TypeScript
cargo add libyay        # Rust
pip install libyay      # Python

The format

Block strings are literal

Inside a block string, a line that looks like a list item, a key or a comment is text, in every port.

notes: `
  - not a list item
  key: not a key
  # not a comment

1.0.0

$ yay -t json notes.yay
notes.yay: Empty block string not allowed (use "" or "\n" explicitly)

1.1.1

$ yay -t json notes.yay
{
  "notes": "- not a list item\nkey: not a key\n# not a comment\n"
}

Runs of blank lines are kept

A run of blank lines inside a block string is content. Only the trailing blank lines are dropped.

poem: `
  Roses are red.


  Violets are blue.

1.0.0

$ yay -t json poem.yay
{
  "poem": "Roses are red.\n\nViolets are blue.\n"
}

1.1.1

$ yay -t json poem.yay
{
  "poem": "Roses are red.\n\n\nViolets are blue.\n"
}

A block string in a list item ends at its key

In - key: `, the block string ends at the key’s column, not the dash’s, so the item’s next key is a key.

- name: `
    Ada
    Lovelace
  role: "mathematician"

1.0.0

$ yay -t json authors.yay
authors.yay: Unexpected extra content

1.1.1

$ yay -t json authors.yay
[
  {
    "name": "Ada\nLovelace\n",
    "role": "mathematician"
  }
]

A canonical blank line after each block string

In canonical YAY, a block string is followed by exactly one blank line, unless it ends the document. No value changes: readers accept a block string with or without the blank line. yay now writes it, and the new yay --canonical refuses a document that is not already in the form yay would write, naming the first line that differs.

summary: `
  First paragraph.
author: "Ada Lovelace"

1.0.0

$ yay summary.yay
summary: `
  First paragraph.
author: "Ada Lovelace"

$ yay --canonical summary.yay
Error: Unknown option: --canonical

1.1.1

$ yay summary.yay
summary: `
  First paragraph.

author: "Ada Lovelace"

$ yay --canonical summary.yay
summary.yay: not canonical at line 3: expected a blank line (after a block string)

Quoted keys

A double-quoted key has a string’s escapes, and a quoted key may open a nested object, in every port.

"tab\tkey": "a"
"x y":
  z: "b"

1.0.0

$ yay -t json keys.yay
{
  "tab\\tkey": "a",
  "x y": {
    "z": "b"
  }
}

1.1.1

$ yay -t json keys.yay
{
  "tab\tkey": "a",
  "x y": {
    "z": "b"
  }
}

List items that hold objects

An object in a list item may open with a quoted key, or with the empty key "".

- "first name": "Ada"
  "": "empty key"
- "first name": "Grace"

1.0.0

$ yay -t json items.yay
items.yay: Unexpected extra content

1.1.1

$ yay -t json items.yay
[
  {
    "": "empty key",
    "first name": "Ada"
  },
  {
    "first name": "Grace"
  }
]

A list item holding a nested object ends where the next item begins. In 1.0.0, the Go, JavaScript and Rust ports misread the next item, and the JavaScript and Rust ones moved its keys into the enclosing object.

people:
- name: "Ada"
  address:
    city: "London"
- name: "Grace"

1.0.0

$ yay -t json people.yay
{
  "name": "Grace",
  "people": [
    {
      "address": {
        "city": "London"
      },
      "name": "Ada"
    }
  ]
}

1.1.1

$ yay -t json people.yay
{
  "people": [
    {
      "address": {
        "city": "London"
      },
      "name": "Ada"
    },
    {
      "name": "Grace"
    }
  ]
}

binyay

Markdown with YAY front matter

yay reads and writes Markdown with YAY front matter, in two flavors named for how strictly they read the front matter: Mehdown (-f md) reads it leniently, as MEH, and Yaydown (-f yd) as strict YAY. A Markdown document reads as an object, its front matter’s properties and its body as content. The blank line after the closing --- is syntax, not part of content. -t md and -t yd write the same document, its front matter canonical YAY and one blank line before the body, which is valid Mehdown and valid Yaydown alike. 1.0.0 knew neither format (Error: Unknown format: md).

---
title: Release notes
tags: [yay]
---


# YAY 1.1.1
$ yay -f md -t json post.md
{
  "content": "# YAY 1.1.1\n",
  "tags": [
    "yay"
  ],
  "title": "Release notes"
}

$ yay -f md -t md post.md
---
title: "Release notes"
tags: ["yay"]
---

# YAY 1.1.1

Yaydown refuses the bare word in the front matter, which Mehdown read. Written back with -t md as fixed.md, the document passes:

$ yay -f yd --check post.md
post.md: in front matter: Unexpected character "R" at 2:8 of <post.md>

$ yay -f yd --check fixed.md
fixed.md: ok

--canonical and --check take --from md or --from yd, and --write names its output .md for either flavor. The Markdown section of CLI.md gives the mapping in full.

JSON strings are read as written

YSON, the JSON-like form yay reads with -f yson, gives a string a type with its first character: "#12" is an integer, "*cafe" is bytes, and a leading ! marks a string that would otherwise begin with one of those, so "!x" is x. yay -f json read its input with the same reader, so a JSON string that began with one of those characters was taken for something else. A string beginning with # and a space, as a Markdown heading does, stopped the whole document.

{"title": "# Hello"}

1.0.0

$ yay -f json -t json title.json
title.json: Invalid bigint: invalid digit found in string

1.1.1

$ yay -f json -t json title.json
{
  "title": "# Hello"
}

The other three read as the wrong value, or the wrong string:

["!x", "*cafe", "#12"]

1.0.0

$ yay -f json -t yay prefixes.json
["x", <cafe>, 12]

1.1.1

$ yay -f json -t yay prefixes.json
["!x", "*cafe", "#12"]

Now -f json reads JSON, so any JSON document goes through yay -f json -t json unchanged, and Markdown written as JSON with -t json reads back with -f json. -f yson still reads the prefixes, and writing JSON was already right.

Output fixes

Converting to YAY, yay no longer escapes / in strings, and it quotes a key that begins with -, so the key reads back in a block object too.

{"url": "https://kriskowal.com/yay/", "-dash": "x"}

1.0.0

$ yay -f json -t yay slash.json
{-dash: "x", url: "https:\/\/kriskowal.com\/yay\/"}

1.1.1

$ yay -f json -t yay slash.json
{"-dash": "x", url: "https://kriskowal.com/yay/"}

It indents a block list under its key:

{"a": {"list": [{"b": "c"}, {"d": "e"}]}}

1.0.0

$ yay -f json -t yay blk.json
a:
  list:
- {b: "c"}
    - {d: "e"}

1.1.1

$ yay -f json -t yay blk.json
a:
  list:
    - {b: "c"}
    - {d: "e"}

And it reads strings with non-ASCII text in inline lists and objects, where 1.0.0 stopped:

langs: ["日本語", "café"]

1.0.0

$ yay -t json langs.yay

thread 'main' (3688007) panicked at libyay/src/parser.rs:959:31:
byte index 5 is not a char boundary; it is inside '本' (bytes 4..7) of `"日本語", "café"`
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

1.1.1

$ yay -t json langs.yay
{
  "langs": [
    "日本語",
    "café"
  ]
}

The YSON encoder also no longer cuts short a string with escapes.

The npm package installs yay

npm install -g binyay had never installed a working yay. Each 1.0.0 platform package went out without its binary, and binyay went out without the script that links it, so the install failed before yay was on the PATH. In 1.1.1 each platform package carries its binary, binyay carries its install script, and a check refuses to publish a package that does not. This installs yay on macOS (Apple silicon and Intel), Linux (x86-64 and ARM64) and Windows on x86-64:

npm install -g binyay

The ports

Each fix comes with a fixture in the shared test corpus that every port must pass. Here is what each port fixed.

  • C: block-string content lines are literal, runs of blank lines are kept, and a block string in - key: ` ends at the key’s column; an object item ends at the next key when its list sits at the key’s indent; a quoted key may open a nested object, and a double-quoted key has a string’s escapes; a list item’s object may open with the empty key "".
  • Go: block-string content lines are literal, runs of blank lines are kept, and a block string in - key: ` ends at the key’s column; a quoted key may open a nested object, and a double-quoted key has a string’s escapes; a list item’s object may open with a quoted key or ""; and an item after one holding a nested object is read as the next item.
  • Guile (Scheme): block-string content lines are literal, runs of blank lines are kept, and a block string in - key: ` ends at the key’s column; an object item ends at the next key when its list sits at the key’s indent; a quoted key may open a nested object; a list item’s object may open with a quoted key or ""; and the encoder no longer escapes /.
  • Java: block-string content lines are literal, runs of blank lines are kept, and a block string in - key: ` ends at the key’s column; a quoted key may open a nested object.
  • JavaScript: block-string content lines are literal, runs of blank lines are kept, and a block string in - key: ` ends at the key’s column; an object item ends at the next key when its list sits at the key’s indent; a quoted key may open a nested object; and an item after one holding a nested object is read as the next item, where 1.0.0 dropped the later items without an error.
  • Python: three block-string bugs are fixed, so content lines are literal; a list item’s object may open with a quoted key or "". Its tests now compare every object fixture, which they did not before.
  • Rust (libyay and binyay): the block-string, quoted-key and list-item fixes above, the canonical blank line, --canonical, Mehdown and Yaydown, the output and non-ASCII fixes under binyay, and -f json reading JSON strings as written, with parse_json in the library.

Compatibility

Most documents read the same in 1.1.1 as in 1.0.0. Here is what reads or writes differently, port by port. In every port, the forms shown above that 1.0.0 refused or misread (block-string lines that look like list items, keys or comments, block strings in - key: `, quoted keys that open a nested object, and list items that open with a quoted or empty key) now read as shown.

  • Rust (yay and libyay): a run of blank lines in a block string is kept, where 1.0.0 kept one; a double-quoted key’s escapes are read, so "tab\tkey" has a tab in it, where 1.0.0 read a backslash and a t; a list item holding a nested object ends where the next item begins, where 1.0.0 moved the next item’s keys to the enclosing object; and yay -f json reads a string that begins with #, * or ! as that string. The library gains a parse_json function for that reading. yay writes a blank line after each block string that does not end the document, / unescaped, keys that begin with - quoted, and block lists indented under their keys.
  • C: runs of blank lines are kept, double-quoted keys’ escapes are read, and an object item ends at the next key when its list sits at the key’s indent.
  • Go: runs of blank lines are kept, double-quoted keys’ escapes are read, and an item after one holding a nested object is read as the next item.
  • Guile (Scheme): runs of blank lines are kept, and an object item ends at the next key when its list sits at the key’s indent; the encoder writes / unescaped.
  • Java: runs of blank lines are kept.
  • JavaScript: runs of blank lines are kept, and an object item ends at the next key when its list sits at the key’s indent; an item after one holding a nested object is read as the next item, where 1.0.0 misread it.
  • Python: block strings already kept their runs of blank lines; only the forms above read differently.

A 1.0.0 reader reads the canonical blank line after a block string as it reads any other, so what 1.1.1 writes still reads in 1.0.0. A document formatted by 1.0.0 fails yay --canonical until yay reformats it.

YAY_WRAP is unchanged. yay wraps at 80 columns unless YAY_WRAP sets another width, and 1.0.0 and 1.1.1 wrap alike:

$ cat wrap.yay
items: ["alpha", "beta", "gamma", "delta"]

$ YAY_WRAP=30 yay wrap.yay
items:
- "alpha"
- "beta"
- "gamma"
- "delta"

What did change is the test of the YAY_WRAP=120 yay wide-file.yay example in CLI.md: it ran whatever yay was on the PATH rather than the one just built. The examples now run with the built yay first on the PATH, and all of them are checked; in 1.0.0 the script stopped at its first, and checked none.

The full list of changes is in pull requests #1 and #2.

← Yet Another YAML