Skip to content

Latest commit

 

History

History
138 lines (101 loc) · 4.49 KB

CHANGELOG.md

File metadata and controls

138 lines (101 loc) · 4.49 KB

Changelog

A less opitionated Dart formatter based on the official Dart dart_style formatter.

Upstream changelog: dart_style changelog

Breaking changes

  • Refactored CodeStyle in FormatterOptions to expose more formatting options on the user side, replaced the use of masks with boolean flags.

Fixes

  • [Expanded Style] Fixes empty switch statement formatting. (#2)

Upstream fixes

  • Preserve ? on nullable empty record types.

0.10.7 - 19/5/2023

Breaking changes

  • Removed dart_style command (was used for testing beta builds internally)

Upstream fixes

  • Don't force split on a line comment before a switch expression case
  • Don't split before . following a record literal.
  • Don't indent parameters that have metadata annotations. Instead, align them with the metadata and other parameters.
  • Allow metadata annotations on parameters to split independently of annotations on other parameters.
  • Require package:analyzer ^5.12.0.

Notes

  • Refactor Code to mirror upstream repo and use it for commit history merges from now on.
  • Some performance improvement in parsing parameters.

0.9.5 - 17/5/2023

Upstream fixes

  • Apply patches up to released dart_style v2.3.1
  • Finally (from upstream) they decided to abandon that abomination of SwitchExpressionCase formatting. How they doesn't see how bad it looks before coding it.. i don't know, and then making dynamic format based on case size, worse. still, ExpandedStyle didn't suffer from that, i deleted that heresy as soon as i saw it incoming on commits.
  • Hide --fix and related options in --help. More info from v2.3.1 upstream.

Fixes

  • ExpandedStyle: Now formats SwitchExpression blocks and empty SwitchStatement, comments are also handled correctly now.
  • ExpandedStyle: Additional brackets fixes on nested SwitchExpression. (i will make issues for better ilustration in the future)
  • Benchmark now uses the updated code formatting changes for comparisons and it should not fail anymore.

0.9.4 - 12/5/2023

New

  • Ability to export library to Node.js dart-polisher npm package.
    Library created using Dart js compiler.
    Typings for use in typescript.
    Compile with grinder: dart run grinder node (use --help for more info).
    Additional grinder node tools: grinder benchmark (10x times slower on avg using Dart 2.18).
    Import it using npm: dart-polisher, or file: dist/node/dart-polisher-*.tgz.

Upstream fixes

  • Format unnamed libraries.
  • Sync updates from upstream (records, patterns, class modifiers, switch cases)
  • Keep using the old switch case style in Expanded Style.

Fixes

  • Grinder build task now accepts relative paths (builds are still relative to ./build dir)

0.9.2 - 10/10/2022

  • DartFormatter constructor argument: FormatterOptions argument its now optional.
  • Updated analyzer lib.
  • Ported tests.
  • Javascript build target. dart run grinder node
  • Build task. dart run grinder build --output=filename

0.9.1 - 27/9/2022

  • Option to use Spaces or Tabs when formatting (vscode extension should automatically support it based on editor settings)

Changed

  • Small versioning changes.
  • Fix try statements on Expanded Style

Changed

  • Fix outer brace style. Its almost set.
  • Small code refactoring, many more to fine-tune before release.

[0.8.8]

Added

  • New tab size indent options
  • New code style option to select a style from a list of predetermined profiles.
  • New CLI format options.

Changed

  • Polished protocol error messages.
  • Code refactoring to mirror upstream repo in preparation for 1.0.

[0.0.5]

  • Some refactoring

[0.0.2]

Added

  • Custom Indents.

Changed

Removed


[0.0.1]

  • Initial version.