Skip to content

v0.2.0

Choose a tag to compare

@wolfeidau wolfeidau released this 21 Oct 19:05
· 7 commits to main since this release
9f1fdb3

v0.2.0

Aligns Parse with the spec rev 0.4 Limits rule and makes rejections diagnosable.

Breaking changes

  • Parse returns (Report, error) instead of (Report, bool). Replace ok with err == nil. Errors wrap ErrNoState, ErrUnknownState, ErrLimit, ErrInvalidID or ErrInvalidText (test with errors.Is) and name the failing field, e.g. osc7501: limit exceeded: app is 33 bytes, max 32.
  • Reports breaking a limit are discarded whole. Previously accepted, now rejected:
    • keys over 16 bytes
    • app over 32 bytes
    • an invalid or oversized id, app, title or msg followed by a valid duplicate
    • bodies that cannot fit in a 4096-byte sequence

Unchanged

  • Scanner.OnReport fires only for accepted reports; rejected reports are dropped silently.
  • An app with invalid characters (within 32 bytes) is still treated as absent.

Thanks to @dannymidnight for the report in buildkite/terminal-to-html#289.