Skip to content

Latest commit

 

History

History
369 lines (247 loc) · 10.7 KB

CHANGELOG.md

File metadata and controls

369 lines (247 loc) · 10.7 KB

Changelog

All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog and this project adheres to Semantic Versioning.

[Unreleased]

Fixed

  • Fix error when formatting pattern matching syntax (#325)

Changed

Added

[0.18.0] - 2024-05-30

Fixed

  • Fix error when formatting ERB (#323)

Changed

  • Dropped support for Ruby 2.7 as it is end of life.

Added

[0.17.1] - 2024-02-03

Fixed

  • Fix incorrect indentation methods call with splat (#320)

Changed

  • Remove unused internal methods from Rufo::Formatter (#321)
    • This change may affect behavior with versions of Ruby not currently supported by Rufo (< 2.7)

Added

[0.17.0] - 2024-01-06

Fixed

Changed

Added

  • Add Ruby 3.3 to test runs on CI. (#314)
  • Add mixed option for quote_style setting. (#315)

[0.16.3] - 2023-11-09

Fixed

  • Fix Bug: Support hash literal pattern with quoted key (#312)

Changed

Added

[0.16.2] - 2023-07-29

Fixed

  • Fix Bug: Unexpected EOF with blocks in .html.erb (#297)

Changed

Added

[0.16.1] - 2023-05-04

Fixed

  • Fix Bug: raises error while formatting pattern matching syntax (#304)
  • Fix Bug: avoid inserting a unnecessary comma to end of heredoc which in array with method call (#303)

Changed

Added

[0.16.0] - 2023-04-02

Fixed

  • Formats ERB files with configuration (#275)

Changed

Added

  • Support for pattern matching syntax

[0.15.1] - 2023-02-08

Fixed

  • Fix Bug: raises error while formatting anonymous block argument forwarding

Changed

Added

[0.15.0] - 2023-02-08

Fixed

Changed

Added

  • Support for anonymous block argument forwarding
  • Support for valueless hash literals and keyword arguments
  • Support for anonymous rest and rest keyword arguments forwarding

[0.14.0] - 2023-01-25

Fixed

  • Correctly interpret erb scriptlets with more than one control-flow/block statement

Changed

  • Dropped support for Ruby 2.6 as it is end of life.

Added

  • Support for partial argument forwarding. (#268)
  • Support for endless method. (#271)
  • Add Ruby 3.2.0 to test runs on CI.

[0.13.0] - 2021-05-07

Fixed

  • Properly format comma when a heredoc is passed as a call argument
  • Correctly interpret case statements with multiple when clauses in ERB files

Changed

  • Dropped support for Ruby 2.4 and 2.5 as they are end of life.

Added

  • Add Ruby 3.0.1 to test runs on CI.

[0.12.0] - 2020-03-08

Fixed

  • File.read default encode UTF-8
  • Handle case where the code is invalid but ripper does not raise an error.
  • Removed implicit dependency on rake.
  • Error when semicolon and then used in a case statement #230.

Changed

Added

  • Code coverage tracking with codecov.io
  • node_modules folders are now ignored.

[0.11.0] - 2020-02-09

Fixed

  • Documentation for trailing_commas
  • Handle empty string symbol for key in hash.

Added

  • Support for escaped ERB template tags. For example <%%%%= format :name %>.

[0.10.0] - 2020-01-16

Fixed

  • Squiggly heredoc closing tag indentation.
  • Formatting .erb files from stdin.

Changed

  • Method parameters are now no longer aligned with the method parenthesis. For example:
    • def foo(
              param
             )
      end
      
      # Becomes:
      
      def foo(
        param
      )
      end
  • Multiline assignments are no longer aligned with variable indentation.
    • a = if true
            b
          end
      
      # Becomes:
      
      a = if true
          b
        end

Added

[0.9.0] - 2020-01-11

Added

  • Support for trim style erb templates ending with -%>.
  • Support for rails raw mode erb templates starting with <%==.
  • Support for ruby 2.7 features. This includes beginless ranges ..10, method argument forwarding def forward(...); to(...); end and keyword args not being allowed def foo(*args, **nil).

[0.8.1] - 2020-01-02

Fixed

  • Formatting a folder. For example rufo lib was not working.

Changed

Added

  • Documentation for includes and excludes configuration options.

[0.8.0] - 2020-01-02

Fixed

  • Handle endless ranges in ruby 2.6
  • Handle empty string hash keys

Changed

  • Output detailed description of Syntax Error to log
  • Removed newlines from start of files.

Added

  • Support for rackup files
  • Settings for 'quote_style' to settings.md
  • Add support for ERB files
  • Add Ruby 2.7.0 to test runs on CI
  • includes and excludes configuration options

[0.7.0] - 2019-04-28

Fixed

  • Argument align with splat (#123)

Changed

Added

  • Support jbuilder files (#173)

[0.6.1] - 2019-04-27

Fixed

  • Fix bug: symbol literal like :"foo" in ruby 2.6.3 (#168)

[0.6.0] - 2019-03-04

Fixed

  • Fix odd indentation of nested one liner "if" statements (#128)

Added

  • Ignore vendor directories from files to be checked. This allows rufo to be run without any arguments against a directory both locally and on common CI tools without needing any configuration.
  • Allow logging level to be configured with --loglevel[=LEVEL].

Changed

  • Dropped support for ruby 2.3 as it is end of life.
  • Remove space before paren for short lambda syntax -> () {} becomes ->() {}.

[0.5.1] - 2019-02-13

Fixed

  • Fix bug: Rufo crashes on nested empty hash literal (#152)
  • Handle case where rufo would change formatting if run multiple times for hashes in some cases.

[0.5.0] - 2019-02-09

Added

[0.4.2] - 2019-01-22

Fixed

  • Fix bug: Rufo indents squiggly HEREDOC incorrectly causing bad formating (#136)

Added

  • Chore: Added ruby 2.6.0 to CI test runs.

[0.4.1] - 2018-10-27

Fixed

  • Fix bug for double colon operator in method definition (#120)

[0.4.0] - 2018-08-09

Fixed

  • Fix Bug: Rufo breaks HEREDOC syntax. (#88). This fixes heredoc within parens formatting causing bad formatting and subsequent syntax error.
  • Fix Bug: formatter.rb:3700:in block in adjust_other_alignments': undefined method []' for nil:NilClass (NoMethodError) (#87). Check alignment target exists.
  • Fix Bug: Rufo keeps switching formatting on same file every time it runs (#86). Avoids re-indenting nested literal indents.

Added

  • Allow for simpler else_body node to suit new Ripper style in 2.6.0
  • Allow new Ripper node :excessed_comma in block parsing
  • Allow :bodystmt in lambda nodes to suit Ripper format in 2.6.0
  • Drop support for ruby 2.2
  • Set minimum required ruby version. As rufo is not tested on unsupported versions it may (and is known to) break code.

[0.3.1] - 2018-04-12

Fixed

  • Fix quote_style config not being respected (#95).

[0.3.0] - 2018-03-24

Added

  • Added Idempotency check to source_specs/ tester.
  • Normalize string quotes according to quote_style, which defaults to :double.

Fixed

  • Fix printing of extraneous trailing semicolons from inline classes, modules, methods (#59)
  • Fix unhandled white space between array getter/setters x[0] [0] (#62)
  • Fix comma printing for heredocs when inside a hash (#61)
  • Fix array literals against changes to Ruby 2.5.0

[0.2.0] - 2017-11-13

Changed

Config parsing and handling:

  • No longer using eval to parse config files
  • Warnings have been added for invalid config keys and values

The default for the following options has changed:

  • parens_in_def: :dynamic > :yes
  • trailing_commas: :dynamic > true

Valid options for:

  • trailing_commas: [:always, :never] > [true, false]

Removed

The following configuration options have been removed, and replaced with non-configurable sane defaults, per discussion:

  • align_assignments
  • align_comments
  • align_hash_keys
  • indent_size
  • spaces_after_comma
  • spaces_after_lambda_arrow
  • spaces_around_block_brace
  • spaces_around_dot
  • spaces_around_equal
  • spaces_around_hash_arrow
  • spaces_around_unary
  • spaces_around_when
  • spaces_in_commands
  • spaces_in_suffix
  • spaces_in_ternary
  • spaces_inside_array_bracket
  • spaces_inside_hash_brace
  • visibility_indent
  • double_newline_inside_type
  • spaces_around_binary

Fixed

  • Fix crash in Ruby <= 2.3.4, <= 2.4.1 in the presence of certain squiggly doc (<<~) with multiple embedded expressions. The real fix here is to upgrade Ruby to >= 2.3.5 / >= 2.4.2
  • Fix dedent bug and bad formatting caused by comments within chained calls (#49)
  • Fix formatting bug for for i, in [[1, 2]] ; x ; end (#45)

[0.1.0] - 2017-10-08

Beginning of logging changes!