Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@prettier/plugin-ruby

Package Overview
Dependencies
Maintainers
9
Versions
78
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@prettier/plugin-ruby - npm Package Versions

1
8

1.2.3

Diff

Changelog

Source

[1.2.3] - 2021-01-02

Changed

  • lukyth, kddnewton - Ensure if a ternary breaks into an if..else..end within a command_call node that parentheses are added.
  • AlanFoster, kddnewton - Ensure you consume the optional do keyword on while and until loops so that it doesn't confuse the parser.
  • AlanFoster, kddnewton - Ensure key-value pairs split on line when the key has a comment attached within a hash.
  • AlanFoster, kddnewton - Fix for for loops that have multiple index variables.
  • AlanFoster, kddnewton - Fix parsing very large files by reducing the size of the JSON output from the parser.
  • AlanFoster, kddnewton - Ensure you don't skip parentheses if you're returning a value with the not unary operator.
kddeisz
published 1.2.2 •

Changelog

Source

[1.2.2] - 2021-01-01

Changed

  • nathan-beam - Gem does not work with CMD/Powershell.
  • blampe, kddnewton - Comments inside keyword parameters in method declarations are not printed.
  • blampe, kddnewton - command_call nodes with unary operators incorrectly parse their operator.
  • blampe, kddnewton - Returning multiple values where the first has parentheses was incorrectly removing the remaining values.
  • johncsnyder, kddnewton - Call chains whose left-most receiver is a no-indent expression should not indent their entire chain.
kddeisz
published 1.2.1 •

Changelog

Source

[1.2.1] - 2020-12-27

Changed

  • kddnewton - Handle single-line method definitions with parameters.
  • kddnewton - Handle hash and array patterns nested within find patterns.
  • kddnewton - Handle rightward assignment.
  • kddnewton - Handle find patterns with named boundaries.
  • kddnewton - Handle rightward assignment in conditionals.
kddeisz
published 1.2.0 •

Changelog

Source

[1.2.0] - 2020-12-26

Added

  • kddnewton - Support for the fndptn node for Ruby 3.0 pattern matching.
  • kddnewton - Support for Ruby 3.0+ single-line method definitions.
kddeisz
published 1.1.0 •

Changelog

Source

[1.1.0] - 2020-12-20

Added

  • kddnewton - Now that the comments are all fixed up, we can support # prettier-ignore comments.

Changed

  • rindek, kddnewton - Do not remove parentheses when receiver looks like a constant.
  • rindek, kddnewton - Do not remove parentheses when using the special call syntax with no arguments.
  • ykpythemind - Do not change regexp bounds if the body has certain content.
  • karanmandal, kddnewton - Correctly print for loops.
  • rafbm, kddnewton - If there are method chains with arguments only at the end, we should group the method chain and the method args.
kddeisz
published 1.0.1 •

Changelog

Source

[1.0.1] - 2020-12-12

Changed

  • steobrien, kddnewton - Ensure leading comments in empty array and hash literals do not duplicate.
kddeisz
published 1.0.0 •

Changelog

Source

[1.0.0] - 2020-12-11

Changed

  • kddnewton - Do not unescape double quotes in a single quote string.
  • kddnewton - Only force braces on regexp for spaces and equals if it's inside a command or command_call.
  • kddnewton - Leave Sorbet type annotations in place.
  • kddnewton - Don't group hash contents, just allow them to break with their parent node.
  • kddnewton - Honor the UTF-8 lang passed in through ENV vars.
kddeisz
published 1.0.0-rc2 •

Changelog

Source

[1.0.0-rc2] - 2020-12-10

Changed

  • kddnewton - Print hashes with consistent keys (e.g., if one key cannot be a hash label, use all hash rockets).
  • kddnewton - Respect using o or not using o for octal numbers.
  • kddnewton - Ensure when clauses with multiple predicates that can be split into multiple lines are split correctly.
  • kddnewton - Ensure hash literal is split correctly when only its contents would fit on one line.
  • kddnewton - Simplify toProc checks by not calling if the option is disabled.
  • johncsnyder, kddnewton - Add method_add_block to the potential like of method calls that can be chained.
  • kddnewton - Add the rubyArrayLiteral option for disabling automatically turning into array literals.
kddeisz
published 1.0.0-rc1 •

Changelog

Source

[1.0.0-rc1] - 2020-12-09

Changed

  • kddnewton - Rename options to prep for v1.0 release.
    • addTrailingCommas -> trailingComma, "es5" means true
    • inlineConditionals and inlineLoops -> rubyModifier
    • preferHashLabels -> rubyHashLabel
    • preferSingleQuotes -> rubySingleQuote
    • toProcTransform -> rubyToProc
  • andyw8, kddnewton - Fix for Ruby 2.5.1 dyna_symbols. Turns out they were previously incorrectly reported as xstring nodes.
  • andyw8, kddnewton - Fix for plain rescue nodes with only comments in the body.
  • andyw8, kddnewton - Move declaration-type comments up to the line in the original source, as in:
def foo # :nodoc:
  bar
end

The comment in the above example should stay in place.

  • janklimo - Respect special call syntax, e.g., a.(1, 2, 3) should remain the same.
  • kddnewton - Fix up a bug with ensure being used in a bodystmt and not a begin.
  • kddnewton - Fix up a bug with negative ranges, e.g., -4..-3.
  • kddnewton - Fix up a bug with operator aliases, e.g., alias << push.
  • kddnewton - Fix up a bug with calls and unary nodes, e.g., !!foo&.bar.
  • kddnewton - Fix up a bug with multiple rescue clauses and comments, e.g.,
begin
rescue Foo, Bar
  # comment
end
  • kddnewton - Handle string literals that start with %Q.
  • kddnewton - Handle question method methods in the predicate of an if with a comment in the body.
  • kddnewton - Fix bare break with comments immediately after.
  • kddnewton - Fix for heredocs with comments immediately after the declaration.
  • kddnewton - Fix for comments when you're defining a method whose name overlaps with a keyword.
  • kddnewton - Don't automatically indent inside interpolated expressions from within a heredoc.
  • kddnewton - Don't convert into string literal arrays if the elements have brackets.
  • kddnewton - Ensure you break the parent when there is an assignment in the predicate of a loop.
  • kddnewton - Fix up a bug with keyword aliases, e.g., alias in within.
  • kddnewton - Force using braces for regex if a regex starts with a blank space.
  • kddnewton - Force using braces for regex if a regex starts with an equals sign.
  • kddnewton - Fix up a bug with constant aliases, e.g., alias in IN.
  • andyw8, kddnewton - Ensure rescue comments stay on the same line as their declaration.
kddeisz
published 0.22.0 •

Changelog

Source

[0.22.0] - 2020-12-08

Changed

  • flyerhzm - Print method chains by one indentation.
  • mmcnl, kddnewton - Handle heredocs and blocks being passed to the same method.
  • johncsnyder, kddnewton - Ensure correct formatting when breaking up conditionals with inlineConditionals: false.
  • Rsullivan00 - Ensure that when ternaries as command arguments get broken into multiple lines we add the necessary parentheses.
  • jbielick - Maintain parse order during if/unless modifier expressions
  • flyerhzm - Slight prettifying of wrapped args if doc length is under a certain value.
  • github0013, kddnewton - Ensure not keeps parentheses if they are being used.
  • jbielick - Print heredocs consistently.
  • kddnewton - Completely revamp the way we handle comments.
  • kddnewton - Support hshptn and the remaining missing pattern matching syntax.
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc