Skip to content

format 4.0.0

Choose a tag to compare

@vi-k vi-k released this 15 Aug 14:28
· 13 commits to main since this release

Format 4.0.0 follows 3.0.0 by a day and changes one thing in the public API:
the extension predicates.

Breaking for code written against 3.0.0:

  • canFormat, canLookup, and canRepresent now receive the extension's T.
    The engine checks the runtime type before invoking user code, and each
    predicate accepts every T by default. Remove an override that only returned
    value is T; rewrite an additional filter from Object? to T.

Code written against the published 1.6.0 is unaffected by this step — see
Migration from 1.6.0.

Also in this release:

  • {:c} and %c no longer convert ordinary int values to BigInt while
    validating Unicode scalars. In a local dart2js A/B on arm64, cached {:c}
    fell from 133 ns to 56 ns and %c from 108 ns to 29 ns; real BigInt values
    keep the same validation path.
  • The README gained a "Key differences from 1.6.0" section, including measured
    ratios against 1.6.0 on the Dart VM, dart2js, and dart2wasm.

Packages:

See CHANGELOG.md
for the complete list.