prettier 1.2.4 → 1.5.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (51) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +351 -361
  3. data/README.md +11 -96
  4. data/node_modules/prettier/index.js +54 -54
  5. data/package.json +1 -2
  6. data/src/haml/embed.js +87 -0
  7. data/src/haml/nodes/comment.js +27 -0
  8. data/src/haml/nodes/doctype.js +34 -0
  9. data/src/haml/nodes/filter.js +16 -0
  10. data/src/haml/nodes/hamlComment.js +21 -0
  11. data/src/haml/nodes/plain.js +6 -0
  12. data/src/haml/nodes/root.js +8 -0
  13. data/src/haml/nodes/script.js +33 -0
  14. data/src/haml/nodes/silentScript.js +59 -0
  15. data/src/haml/nodes/tag.js +193 -0
  16. data/src/haml/parser.js +22 -0
  17. data/src/haml/parser.rb +138 -0
  18. data/src/haml/printer.js +28 -0
  19. data/src/parser/getLang.js +32 -0
  20. data/src/parser/getNetcat.js +50 -0
  21. data/src/parser/netcat.js +15 -0
  22. data/src/parser/parseSync.js +33 -0
  23. data/src/parser/requestParse.js +74 -0
  24. data/src/parser/server.rb +61 -0
  25. data/src/plugin.js +26 -4
  26. data/src/rbs/parser.js +39 -0
  27. data/src/rbs/parser.rb +94 -0
  28. data/src/rbs/printer.js +605 -0
  29. data/src/ruby/embed.js +54 -8
  30. data/src/ruby/nodes/args.js +20 -6
  31. data/src/ruby/nodes/arrays.js +36 -33
  32. data/src/ruby/nodes/calls.js +12 -43
  33. data/src/ruby/nodes/class.js +17 -27
  34. data/src/ruby/nodes/commands.js +8 -3
  35. data/src/ruby/nodes/conditionals.js +1 -1
  36. data/src/ruby/nodes/hashes.js +28 -14
  37. data/src/ruby/nodes/loops.js +4 -10
  38. data/src/ruby/nodes/methods.js +4 -11
  39. data/src/ruby/nodes/rescue.js +32 -25
  40. data/src/ruby/nodes/statements.js +6 -5
  41. data/src/ruby/nodes/strings.js +7 -6
  42. data/src/ruby/parser.js +2 -50
  43. data/src/ruby/parser.rb +113 -43
  44. data/src/ruby/printer.js +8 -5
  45. data/src/utils.js +1 -0
  46. data/src/utils/inlineEnsureParens.js +8 -1
  47. data/src/utils/isEmptyBodyStmt.js +7 -0
  48. data/src/utils/isEmptyStmts.js +9 -5
  49. data/src/utils/noIndent.js +1 -0
  50. data/src/utils/printEmptyCollection.js +9 -2
  51. metadata +25 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3c6028bdf8198f8cfdd43bdb8d8b577e7a3bae5aaa108af45e0ee065d0b373b3
4
- data.tar.gz: 90847afd8a74ba465b5a1bcc3dcfdc146ce57c01df77f1e3fa8c04a8b254c870
3
+ metadata.gz: 1d669fc2ab950c7a9163d2b9f63620ec0300536a72985fbe9378054cc988490d
4
+ data.tar.gz: 9a99a3897282616faa104f47094afcf0b2b1f0a748a3376ddecb1aa55bc5f7f9
5
5
  SHA512:
6
- metadata.gz: d99e6fefc109919be2317805e2462c0f38d2cfc7b005df3b200ea9b29ff2ac6f4438617580df94ae58c95a0df21717d87025b9ed6301e35c62fd1b84be63f321
7
- data.tar.gz: 97353a101ef9256d63035e8838c32435816a84f735dc9aaf40a6f62b69e699249acbb2cc51ea4075802f848368712fca11ba54d8b5203392050199b1cc1f5f13
6
+ metadata.gz: 060eb9299ef84812b305c145c87e8fe59c440028df12e16e29509caa23abb0acde2aec7e43951a43f4fd6ad2b2a6cff8d45af5b358350ac75920582e87982f58
7
+ data.tar.gz: bd1ffb84df6cc449db31bdca82f15cd3a15cb7842718e2ae1b79eb8849ac26f6d8f6d1164d9322e0b91dcdbc0a32aef2722686417f7285007424e771d8fc2ab7
@@ -6,110 +6,161 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) a
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
+ ## [1.5.1] - 2021-01-27
10
+
11
+ ### Changed
12
+
13
+ - [#799](https://github.com/prettier/plugin-ruby/issues/799) - jscheid, kddeisz - Multi-byte characters shouldn't give invalid source string bounds.
14
+ - [#801](https://github.com/prettier/plugin-ruby/issues/801) - jscheid, kddeisz - When converting a conditional to the modifier form, make sure to add parentheses if there is a chained method call.
15
+ - [#803](https://github.com/prettier/plugin-ruby/issues/803) - jscheid, kddeisz - Fix `formatWithCursor` support to match new parser format.
16
+
17
+ ## [1.5.0] - 2021-01-21
18
+
19
+ ### Added
20
+
21
+ - kddeisz - Add `.rbi` as a file type that we support.
22
+
23
+ ### Changed
24
+
25
+ - [#795](https://github.com/prettier/plugin-ruby/issues/795) djrodgerspryor, kddeisz - Trailing comments attached to empty arrays should not multiply.
26
+ - [#794](https://github.com/prettier/plugin-ruby/issues/794) djrodgerspryor, kddeisz - Fix embedded parser parsing by stripping common leading whitespace before passing on the content.
27
+ - [#793](https://github.com/prettier/plugin-ruby/issues/793) djrodgerspryor, kddeisz - Do not include trailing commas on arguments within `arg_paren` nodes if they could not be parsed with them (`command` and `command_call`).
28
+ - [#788](https://github.com/prettier/plugin-ruby/issues/788) clarkdave, kddeisz - Break child hashes within a multi-line hash regardless of whether or not they can fit on one line.
29
+ - kddeisz - Stop using `;` to separate empty class definitions, module definitions, and loops.
30
+
31
+ ## [1.4.0] - 2021-01-15
32
+
33
+ ### Added
34
+
35
+ - ianks, kddeisz - Use `netcat` to communicate to a parser server for better performance when formatting multiple files.
36
+
37
+ ### Changed
38
+
39
+ - jeffcarbs, kddeisz - Long strings with interpolated expressions should only break if the contents in the original source is broken.
40
+ - johannesluedke, kddeisz - Fix for rescues with inline comments.
41
+ - johncsnyder, kddeisz - Comments should not attach to nodes beyond a double newline.
42
+ - blampe, kddeisz - Comments inside of a broken method chain get dropped.
43
+ - clarkdave, kddeisz - Don't ignore Sorbet `sig` transformations.
44
+
45
+ ## [1.3.0] - 2021-01-05
46
+
47
+ ### Added
48
+
49
+ - kddeisz - Handling of the RBS language.
50
+ - kddeisz - Incorporate the HAML plugin.
51
+
52
+ ## [1.2.5] - 2021-01-04
53
+
54
+ ### Changed
55
+
56
+ - nruth, kddeisz - Ensure unary operators on method calls that are sending operators get the correct scanner events.
57
+ - cvoege, kddeisz - Do not add parentheses when they're not needed to non-breaking command_calls with ternary arguments.
58
+ - valscion, kddeisz - Print method chains more nicely off array and hash literals.
59
+
9
60
  ## [1.2.4] - 2021-01-03
10
61
 
11
62
  ### Added
12
63
 
13
- - [@andyw8] - Explain usage with Rubocop, as well as shipping a rubocop.yml config.
64
+ - andyw8 - Explain usage with Rubocop, as well as shipping a rubocop.yml config.
14
65
 
15
66
  ### Changed
16
67
 
17
- - [@kddeisz] - Reduce JSON size passing from Ruby process to node process by changing `char_start` -> `sc`, `char_end` -> `ec`, `start` -> `sl`, `end` -> `el`.
18
- - [@kddeisz] - Up the max buffer size between the Ruby and node processes to 15K.
68
+ - kddeisz - Reduce JSON size passing from Ruby process to node process by changing `char_start` -> `sc`, `char_end` -> `ec`, `start` -> `sl`, `end` -> `el`.
69
+ - kddeisz - Up the max buffer size between the Ruby and node processes to 15K.
19
70
 
20
71
  ## [1.2.3] - 2021-01-02
21
72
 
22
73
  ### Changed
23
74
 
24
- - [@lukyth], [@kddeisz] - Ensure if a ternary breaks into an `if..else..end` within a `command_call` node that parentheses are added.
25
- - [@AlanFoster], [@kddeisz] - Ensure you consume the optional `do` keyword on `while` and `until` loops so that it doesn't confuse the parser.
26
- - [@AlanFoster], [@kddeisz] - Ensure key-value pairs split on line when the key has a comment attached within a hash.
27
- - [@AlanFoster], [@kddeisz] - Fix for `for` loops that have multiple index variables.
28
- - [@AlanFoster], [@kddeisz] - Fix parsing very large files by reducing the size of the JSON output from the parser.
29
- - [@AlanFoster], [@kddeisz] - Ensure you don't skip parentheses if you're returning a value with the `not` unary operator.
75
+ - lukyth, kddeisz - Ensure if a ternary breaks into an `if..else..end` within a `command_call` node that parentheses are added.
76
+ - AlanFoster, kddeisz - Ensure you consume the optional `do` keyword on `while` and `until` loops so that it doesn't confuse the parser.
77
+ - AlanFoster, kddeisz - Ensure key-value pairs split on line when the key has a comment attached within a hash.
78
+ - AlanFoster, kddeisz - Fix for `for` loops that have multiple index variables.
79
+ - AlanFoster, kddeisz - Fix parsing very large files by reducing the size of the JSON output from the parser.
80
+ - AlanFoster, kddeisz - Ensure you don't skip parentheses if you're returning a value with the `not` unary operator.
30
81
 
31
82
  ## [1.2.2] - 2021-01-01
32
83
 
33
84
  ### Changed
34
85
 
35
- - [@nathan-beam] - Gem does not work with CMD/Powershell.
36
- - [@blampe], [@kddeisz] - Comments inside keyword parameters in method declarations are not printed.
37
- - [@blampe], [@kddeisz] - `command_call` nodes with unary operators incorrectly parse their operator.
38
- - [@blampe], [@kddeisz] - Returning multiple values where the first has parentheses was incorrectly removing the remaining values.
39
- - [@johncsnyder], [@kddeisz] - Call chains whose left-most receiver is a no-indent expression should not indent their entire chain.
86
+ - nathan-beam - Gem does not work with CMD/Powershell.
87
+ - blampe, kddeisz - Comments inside keyword parameters in method declarations are not printed.
88
+ - blampe, kddeisz - `command_call` nodes with unary operators incorrectly parse their operator.
89
+ - blampe, kddeisz - Returning multiple values where the first has parentheses was incorrectly removing the remaining values.
90
+ - johncsnyder, kddeisz - Call chains whose left-most receiver is a no-indent expression should not indent their entire chain.
40
91
 
41
92
  ## [1.2.1] - 2020-12-27
42
93
 
43
94
  ### Changed
44
95
 
45
- - [@kddeisz] - Handle single-line method definitions with parameters.
46
- - [@kddeisz] - Handle hash and array patterns nested within find patterns.
47
- - [@kddeisz] - Handle rightward assignment.
48
- - [@kddeisz] - Handle find patterns with named boundaries.
49
- - [@kddeisz] - Handle rightward assignment in conditionals.
96
+ - kddeisz - Handle single-line method definitions with parameters.
97
+ - kddeisz - Handle hash and array patterns nested within find patterns.
98
+ - kddeisz - Handle rightward assignment.
99
+ - kddeisz - Handle find patterns with named boundaries.
100
+ - kddeisz - Handle rightward assignment in conditionals.
50
101
 
51
102
  ## [1.2.0] - 2020-12-26
52
103
 
53
104
  ### Added
54
105
 
55
- - [@kddeisz] - Support for the `fndptn` node for Ruby 3.0 pattern matching.
56
- - [@kddeisz] - Support for Ruby 3.0+ single-line method definitions.
106
+ - kddeisz - Support for the `fndptn` node for Ruby 3.0 pattern matching.
107
+ - kddeisz - Support for Ruby 3.0+ single-line method definitions.
57
108
 
58
109
  ## [1.1.0] - 2020-12-20
59
110
 
60
111
  ### Added
61
112
 
62
- - [@kddeisz] - Now that the comments are all fixed up, we can support `# prettier-ignore` comments.
113
+ - kddeisz - Now that the comments are all fixed up, we can support `# prettier-ignore` comments.
63
114
 
64
115
  ### Changed
65
116
 
66
- - [@rindek], [@kddeisz] - Do not remove parentheses when receiver looks like a constant.
67
- - [@rindek], [@kddeisz] - Do not remove parentheses when using the special `call` syntax with no arguments.
68
- - [@ykpythemind] - Do not change regexp bounds if the body has certain content.
69
- - [@karanmandal], [@kddeisz] - Correctly print for loops.
70
- - [@rafbm], [@kddeisz] - If there are method chains with arguments only at the end, we should group the method chain and the method args.
117
+ - rindek, kddeisz - Do not remove parentheses when receiver looks like a constant.
118
+ - rindek, kddeisz - Do not remove parentheses when using the special `call` syntax with no arguments.
119
+ - ykpythemind - Do not change regexp bounds if the body has certain content.
120
+ - karanmandal, kddeisz - Correctly print for loops.
121
+ - rafbm, kddeisz - If there are method chains with arguments only at the end, we should group the method chain and the method args.
71
122
 
72
123
  ## [1.0.1] - 2020-12-12
73
124
 
74
125
  ### Changed
75
126
 
76
- - [@steobrien], [@kddeisz] - Ensure leading comments in empty array and hash literals do not duplicate.
127
+ - steobrien, kddeisz - Ensure leading comments in empty array and hash literals do not duplicate.
77
128
 
78
129
  ## [1.0.0] - 2020-12-11
79
130
 
80
131
  ### Changed
81
132
 
82
- - [@kddeisz] - Do not unescape double quotes in a single quote string.
83
- - [@kddeisz] - Only force braces on regexp for spaces and equals if it's inside a command or command_call.
84
- - [@kddeisz] - Leave Sorbet type annotations in place.
85
- - [@kddeisz] - Don't group hash contents, just allow them to break with their parent node.
86
- - [@kddeisz] - Honor the UTF-8 lang passed in through ENV vars.
133
+ - kddeisz - Do not unescape double quotes in a single quote string.
134
+ - kddeisz - Only force braces on regexp for spaces and equals if it's inside a command or command_call.
135
+ - kddeisz - Leave Sorbet type annotations in place.
136
+ - kddeisz - Don't group hash contents, just allow them to break with their parent node.
137
+ - kddeisz - Honor the UTF-8 lang passed in through ENV vars.
87
138
 
88
139
  ## [1.0.0-rc2] - 2020-12-10
89
140
 
90
141
  ### Changed
91
142
 
92
- - [@kddeisz] - Print hashes with consistent keys (e.g., if one key cannot be a hash label, use all hash rockets).
93
- - [@kddeisz] - Respect using `o` or not using `o` for octal numbers.
94
- - [@kddeisz] - Ensure `when` clauses with multiple predicates that can be split into multiple lines are split correctly.
95
- - [@kddeisz] - Ensure hash literal is split correctly when only its contents would fit on one line.
96
- - [@kddeisz] - Simplify `toProc` checks by not calling if the option is disabled.
97
- - [@johncsnyder], [@kddeisz] - Add `method_add_block` to the potential like of method calls that can be chained.
98
- - [@kddeisz] - Add the `rubyArrayLiteral` option for disabling automatically turning into array literals.
143
+ - kddeisz - Print hashes with consistent keys (e.g., if one key cannot be a hash label, use all hash rockets).
144
+ - kddeisz - Respect using `o` or not using `o` for octal numbers.
145
+ - kddeisz - Ensure `when` clauses with multiple predicates that can be split into multiple lines are split correctly.
146
+ - kddeisz - Ensure hash literal is split correctly when only its contents would fit on one line.
147
+ - kddeisz - Simplify `toProc` checks by not calling if the option is disabled.
148
+ - johncsnyder, kddeisz - Add `method_add_block` to the potential like of method calls that can be chained.
149
+ - kddeisz - Add the `rubyArrayLiteral` option for disabling automatically turning into array literals.
99
150
 
100
151
  ## [1.0.0-rc1] - 2020-12-09
101
152
 
102
153
  ### Changed
103
154
 
104
- - [@kddeisz] - Rename options to prep for v1.0 release.
155
+ - kddeisz - Rename options to prep for v1.0 release.
105
156
  - `addTrailingCommas` -> `trailingComma`, `"es5"` means `true`
106
157
  - `inlineConditionals` and `inlineLoops` -> `rubyModifier`
107
158
  - `preferHashLabels` -> `rubyHashLabel`
108
159
  - `preferSingleQuotes` -> `rubySingleQuote`
109
160
  - `toProcTransform` -> `rubyToProc`
110
- - [@andyw8], [@kddeisz] - Fix for Ruby `2.5.1` dyna_symbols. Turns out they were previously incorrectly reported as `xstring` nodes.
111
- - [@andyw8], [@kddeisz] - Fix for plain `rescue` nodes with only comments in the body.
112
- - [@andyw8], [@kddeisz] - Move declaration-type comments up to the line in the original source, as in:
161
+ - andyw8, kddeisz - Fix for Ruby `2.5.1` dyna_symbols. Turns out they were previously incorrectly reported as `xstring` nodes.
162
+ - andyw8, kddeisz - Fix for plain `rescue` nodes with only comments in the body.
163
+ - andyw8, kddeisz - Move declaration-type comments up to the line in the original source, as in:
113
164
 
114
165
  ```ruby
115
166
  def foo # :nodoc:
@@ -119,12 +170,12 @@ end
119
170
 
120
171
  The comment in the above example should stay in place.
121
172
 
122
- - [@janklimo] - Respect special call syntax, e.g., `a.(1, 2, 3)` should remain the same.
123
- - [@kddeisz] - Fix up a bug with `ensure` being used in a `bodystmt` and not a `begin`.
124
- - [@kddeisz] - Fix up a bug with negative ranges, e.g., `-4..-3`.
125
- - [@kddeisz] - Fix up a bug with operator aliases, e.g., `alias << push`.
126
- - [@kddeisz] - Fix up a bug with calls and unary nodes, e.g., `!!foo&.bar`.
127
- - [@kddeisz] - Fix up a bug with multiple rescue clauses and comments, e.g.,
173
+ - janklimo - Respect special call syntax, e.g., `a.(1, 2, 3)` should remain the same.
174
+ - kddeisz - Fix up a bug with `ensure` being used in a `bodystmt` and not a `begin`.
175
+ - kddeisz - Fix up a bug with negative ranges, e.g., `-4..-3`.
176
+ - kddeisz - Fix up a bug with operator aliases, e.g., `alias << push`.
177
+ - kddeisz - Fix up a bug with calls and unary nodes, e.g., `!!foo&.bar`.
178
+ - kddeisz - Fix up a bug with multiple rescue clauses and comments, e.g.,
128
179
 
129
180
  ```ruby
130
181
  begin
@@ -134,64 +185,64 @@ rescue Foo, Bar
134
185
  end
135
186
  ```
136
187
 
137
- - [@kddeisz] - Handle string literals that start with `%Q`.
138
- - [@kddeisz] - Handle question method methods in the predicate of an if with a comment in the body.
139
- - [@kddeisz] - Fix bare `break` with comments immediately after.
140
- - [@kddeisz] - Fix for heredocs with comments immediately after the declaration.
141
- - [@kddeisz] - Fix for comments when you're defining a method whose name overlaps with a keyword.
142
- - [@kddeisz] - Don't automatically indent inside interpolated expressions from within a heredoc.
143
- - [@kddeisz] - Don't convert into string literal arrays if the elements have brackets.
144
- - [@kddeisz] - Ensure you break the parent when there is an assignment in the predicate of a loop.
145
- - [@kddeisz] - Fix up a bug with keyword aliases, e.g., `alias in within`.
146
- - [@kddeisz] - Force using braces for regex if a regex starts with a blank space.
147
- - [@kddeisz] - Force using braces for regex if a regex starts with an equals sign.
148
- - [@kddeisz] - Fix up a bug with constant aliases, e.g., `alias in IN`.
149
- - [@andyw8], [@kddeisz] - Ensure `rescue` comments stay on the same line as their declaration.
188
+ - kddeisz - Handle string literals that start with `%Q`.
189
+ - kddeisz - Handle question method methods in the predicate of an if with a comment in the body.
190
+ - kddeisz - Fix bare `break` with comments immediately after.
191
+ - kddeisz - Fix for heredocs with comments immediately after the declaration.
192
+ - kddeisz - Fix for comments when you're defining a method whose name overlaps with a keyword.
193
+ - kddeisz - Don't automatically indent inside interpolated expressions from within a heredoc.
194
+ - kddeisz - Don't convert into string literal arrays if the elements have brackets.
195
+ - kddeisz - Ensure you break the parent when there is an assignment in the predicate of a loop.
196
+ - kddeisz - Fix up a bug with keyword aliases, e.g., `alias in within`.
197
+ - kddeisz - Force using braces for regex if a regex starts with a blank space.
198
+ - kddeisz - Force using braces for regex if a regex starts with an equals sign.
199
+ - kddeisz - Fix up a bug with constant aliases, e.g., `alias in IN`.
200
+ - andyw8, kddeisz - Ensure `rescue` comments stay on the same line as their declaration.
150
201
 
151
202
  # [0.22.0] - 2020-12-08
152
203
 
153
204
  ### Changed
154
205
 
155
- - [@flyerhzm] - Print method chains by one indentation.
156
- - [@mmcnl], [@kddeisz] - Handle heredocs and blocks being passed to the same method.
157
- - [@johncsnyder], [@kddeisz] - Ensure correct formatting when breaking up conditionals with `inlineConditionals: false`.
158
- - [@Rsullivan00] - Ensure that when ternaries as command arguments get broken into multiple lines we add the necessary parentheses.
159
- - [@jbielick] - Maintain parse order during if/unless modifier expressions
160
- - [@flyerhzm] - Slight prettifying of wrapped args if doc length is under a certain value.
161
- - [@github0013], [@kddeisz] - Ensure `not` keeps parentheses if they are being used.
162
- - [@jbielick] - Print heredocs consistently.
163
- - [@kddeisz] - Completely revamp the way we handle comments.
164
- - [@kddeisz] - Support `hshptn` and the remaining missing pattern matching syntax.
206
+ - flyerhzm - Print method chains by one indentation.
207
+ - mmcnl, kddeisz - Handle heredocs and blocks being passed to the same method.
208
+ - johncsnyder, kddeisz - Ensure correct formatting when breaking up conditionals with `inlineConditionals: false`.
209
+ - Rsullivan00 - Ensure that when ternaries as command arguments get broken into multiple lines we add the necessary parentheses.
210
+ - jbielick - Maintain parse order during if/unless modifier expressions
211
+ - flyerhzm - Slight prettifying of wrapped args if doc length is under a certain value.
212
+ - github0013, kddeisz - Ensure `not` keeps parentheses if they are being used.
213
+ - jbielick - Print heredocs consistently.
214
+ - kddeisz - Completely revamp the way we handle comments.
215
+ - kddeisz - Support `hshptn` and the remaining missing pattern matching syntax.
165
216
 
166
217
  ## [0.21.0] - 2020-12-02
167
218
 
168
219
  ### Changed
169
220
 
170
- - [@kddeisz], [@ryan-hunter-pc] - Explicitly handle `break` and `next` keyword parentheses.
171
- - [@jbielick], [@kddeisz] - Don't convert between `lambda {}` and `-> {}`. Technically it's breaking the semantics of the program. Also because lambda method call arguments can't handle everything that stabby lambda can.
172
- - [@kddeisz] - Turn off the `Symbol#to_proc` transform by default.
173
- - [@janklimo], [@kddeisz] - Properly handle trailing commas on hash arguments.
174
- - [@coiti], [@kddeisz] - Properly handle parentheses when necessary on if/unless statements and while/until loops.
175
- - [@Rsullivan00] - Prevent `command` and `command_call` nodes from being turned into ternaries.
176
- - [@kddeisz] - Better handling of the `alias` node with and without comments.
177
- - [@kddeisz] - Better handling of the `BEGIN` and `END` nodes with and without comments.
178
- - [@kddeisz] - Much better handling of heredocs where now there is a consistent `heredoc` node instead of multiple.
221
+ - kddeisz, ryan-hunter-pc - Explicitly handle `break` and `next` keyword parentheses.
222
+ - jbielick, kddeisz - Don't convert between `lambda {}` and `-> {}`. Technically it's breaking the semantics of the program. Also because lambda method call arguments can't handle everything that stabby lambda can.
223
+ - kddeisz - Turn off the `Symbol#to_proc` transform by default.
224
+ - janklimo, kddeisz - Properly handle trailing commas on hash arguments.
225
+ - coiti, kddeisz - Properly handle parentheses when necessary on if/unless statements and while/until loops.
226
+ - Rsullivan00 - Prevent `command` and `command_call` nodes from being turned into ternaries.
227
+ - kddeisz - Better handling of the `alias` node with and without comments.
228
+ - kddeisz - Better handling of the `BEGIN` and `END` nodes with and without comments.
229
+ - kddeisz - Much better handling of heredocs where now there is a consistent `heredoc` node instead of multiple.
179
230
 
180
231
  ## [0.20.1] - 2020-09-04
181
232
 
182
233
  ### Changed
183
234
 
184
- - [@ftes], [@kddeisz] - Properly escape HAML plain text statements that start with special HAML characters.
235
+ - ftes, kddeisz - Properly escape HAML plain text statements that start with special HAML characters.
185
236
 
186
237
  ### Removed
187
238
 
188
- - [@kddeisz] - I'm stripping out the HAML plugin and putting it into its own package (`@prettier/plugin-haml`). It's become too difficult to maintain within this repo, and it's confusing for contributors because there are some things that work with Ruby and some things that don't. This is going to simplify maintenance. This should probably be a major version bump but since we're still pre `1.0` I'm going to leave it as a patch.
239
+ - kddeisz - I'm stripping out the HAML plugin and putting it into its own package (`@prettier/plugin-haml`). It's become too difficult to maintain within this repo, and it's confusing for contributors because there are some things that work with Ruby and some things that don't. This is going to simplify maintenance. This should probably be a major version bump but since we're still pre `1.0` I'm going to leave it as a patch.
189
240
 
190
241
  ## [0.20.0] - 2020-08-28
191
242
 
192
243
  ### Added
193
244
 
194
- - [@kddeisz] - Allow embedded formatting on heredocs by the name placed at the start. For example,
245
+ - kddeisz - Allow embedded formatting on heredocs by the name placed at the start. For example,
195
246
 
196
247
  <!-- prettier-ignore -->
197
248
  ```ruby
@@ -204,37 +255,37 @@ JAVASCRIPT
204
255
 
205
256
  ### Changed
206
257
 
207
- - [@mmainz] - Fix the encoding setting such that we're not overwriting the entire set of environment variables.
258
+ - mmainz - Fix the encoding setting such that we're not overwriting the entire set of environment variables.
208
259
 
209
260
  ## [0.19.1] - 2020-08-21
210
261
 
211
262
  ### Changed
212
263
 
213
- - [@Rsullivan00] - Do not tranform word-literal arrays when there is an escape sequence.
214
- - [@steobrien], [@kddeisz] - Do not indent heredocs with calls more than they should be.
215
- - [@jpickwell] - Include .simplecov in filenames
216
- - [@github0013], [@kddeisz] - Ensure we're parsing ruby files using UTF-8 regardless of the system encoding.
264
+ - Rsullivan00 - Do not tranform word-literal arrays when there is an escape sequence.
265
+ - steobrien, kddeisz - Do not indent heredocs with calls more than they should be.
266
+ - jpickwell - Include .simplecov in filenames
267
+ - github0013, kddeisz - Ensure we're parsing ruby files using UTF-8 regardless of the system encoding.
217
268
 
218
269
  ## [0.19.0] - 2020-07-03
219
270
 
220
271
  ### Added
221
272
 
222
- - [@ryan-hunter-pc] - Add the option to disable the `Symbol#to_proc` transform.
223
- - [@ryan-hunter-pc], [@SViccari], [@kddeisz] - Disable `Symbol#to_proc` transform when used as a key inside of a hash where the key is either `:if` or `:unless`.
273
+ - ryan-hunter-pc - Add the option to disable the `Symbol#to_proc` transform.
274
+ - ryan-hunter-pc], [@SViccari, kddeisz - Disable `Symbol#to_proc` transform when used as a key inside of a hash where the key is either `:if` or `:unless`.
224
275
 
225
276
  ## [0.18.2] - 2020-05-01
226
277
 
227
278
  ### Changed
228
279
 
229
- - [@alse] - Support `vscodeLanguageIds` for HAML.
230
- - [@ShayDavidson], [@kddeisz] - Don't allow replacing if/else with ternary if there's an assignment in the predicate.
231
- - [@janklimo] - Do not add an empty line after `rescue` when the block is empty.
280
+ - alse - Support `vscodeLanguageIds` for HAML.
281
+ - ShayDavidson, kddeisz - Don't allow replacing if/else with ternary if there's an assignment in the predicate.
282
+ - janklimo - Do not add an empty line after `rescue` when the block is empty.
232
283
 
233
284
  ## [0.18.1] - 2020-04-05
234
285
 
235
286
  ### Changed
236
287
 
237
- - [@petevk], [@kddeisz] - Use braces for block format iff it was originally a brace block, otherwise you could be changing precedence. For example:
288
+ - petevk, kddeisz - Use braces for block format iff it was originally a brace block, otherwise you could be changing precedence. For example:
238
289
 
239
290
  <!-- prettier-ignore -->
240
291
  ```ruby
@@ -247,7 +298,7 @@ end.to raise_error
247
298
 
248
299
  should maintain its `do...end` and not switch to inline braces otherwise the brace might get associated with the `1`.
249
300
 
250
- - [@flyerhzm] - Rewrite operators binary parser, as in:
301
+ - flyerhzm - Rewrite operators binary parser, as in:
251
302
 
252
303
  <!-- prettier-ignore -->
253
304
  ```ruby
@@ -258,10 +309,10 @@ should maintain its `do...end` and not switch to inline braces otherwise the bra
258
309
  [1]
259
310
  ```
260
311
 
261
- - [@ftes], [@kddeisz] - When old-form dynamic attributes are added to a `div` tag in HAML, it was previously skipping printing the `%div`, which led to it being incorrectly displayed.
262
- - [@ftes], [@kddeisz] - Previously if you had a long tag declaration with attributes that made it hit the line limit, then the content of the tag would be pushed to the next line but indented one character too many.
263
- - [@ftes], [@kddeisz] - Don't explicitly require JSON if it has already been loaded, as this can lead to rubygems activation errors.
264
- - [@mmainz], [@kddeisz] - Handle heredocs as the receivers of call nodes, as in:
312
+ - ftes, kddeisz - When old-form dynamic attributes are added to a `div` tag in HAML, it was previously skipping printing the `%div`, which led to it being incorrectly displayed.
313
+ - ftes, kddeisz - Previously if you had a long tag declaration with attributes that made it hit the line limit, then the content of the tag would be pushed to the next line but indented one character too many.
314
+ - ftes, kddeisz - Don't explicitly require JSON if it has already been loaded, as this can lead to rubygems activation errors.
315
+ - mmainz, kddeisz - Handle heredocs as the receivers of call nodes, as in:
265
316
 
266
317
  <!-- prettier-ignore -->
267
318
  ```ruby
@@ -270,7 +321,7 @@ foo = <<~TEXT.strip
270
321
  TEXT
271
322
  ```
272
323
 
273
- - [@github0013], [@kddeisz] - Leave parentheses in place if the value of a return node contains a binary with low operator precedence, as in:
324
+ - github0013, kddeisz - Leave parentheses in place if the value of a return node contains a binary with low operator precedence, as in:
274
325
 
275
326
  <!-- prettier-ignore -->
276
327
  ```ruby
@@ -281,13 +332,13 @@ return (a or b) if c?
281
332
 
282
333
  ### Added
283
334
 
284
- - [@kddeisz] - Support for the `nokw_param` node for specifying when methods should no accept keywords, as in:
335
+ - kddeisz - Support for the `nokw_param` node for specifying when methods should no accept keywords, as in:
285
336
 
286
337
  ```ruby
287
338
  def foo(**nil); end
288
339
  ```
289
340
 
290
- - [@kddeisz] - Support for the `args_forward` node for forwarding all types of arguments, as in:
341
+ - kddeisz - Support for the `args_forward` node for forwarding all types of arguments, as in:
291
342
 
292
343
  ```ruby
293
344
  def foo(...)
@@ -297,13 +348,13 @@ end
297
348
 
298
349
  ### Changed
299
350
 
300
- - [@ftes], [@kddeisz] - Handled 3 or more classes on a node in HAML, as in:
351
+ - ftes, kddeisz - Handled 3 or more classes on a node in HAML, as in:
301
352
 
302
353
  ```haml
303
354
  %table.table.is-striped.is-hoverable
304
355
  ```
305
356
 
306
- - [@ftes], [@kddeisz] - Better handling of indentation of `if/elsif/else`, `unless/elsif/else`, and `case/when` branches, as in:
357
+ - ftes, kddeisz - Better handling of indentation of `if/elsif/else`, `unless/elsif/else`, and `case/when` branches, as in:
307
358
 
308
359
  ```haml
309
360
  .column.is-12
@@ -313,9 +364,9 @@ end
313
364
  FALSE
314
365
  ```
315
366
 
316
- - [@tobyndockerill] - Format numbers with underscores after 4 digits, as opposed to 3.
317
- - [@ianks] - Improve performance by using `--disable-gems`.
318
- - [@flyerhzm] - Calls are grouped such that after an end parenthesis the following call will not be indented, as in:
367
+ - tobyndockerill - Format numbers with underscores after 4 digits, as opposed to 3.
368
+ - ianks - Improve performance by using `--disable-gems`.
369
+ - flyerhzm - Calls are grouped such that after an end parenthesis the following call will not be indented, as in:
319
370
 
320
371
  <!-- prettier-ignore -->
321
372
  ```ruby
@@ -336,7 +387,7 @@ Config::Download.new(
336
387
  ).perform
337
388
  ```
338
389
 
339
- - [@pje], [@kddeisz] - Method definition bodies (on `defs` nodes) should dedent if a helper method is called. As in:
390
+ - pje, kddeisz - Method definition bodies (on `defs` nodes) should dedent if a helper method is called. As in:
340
391
 
341
392
  <!-- prettier-ignore -->
342
393
  ```ruby
@@ -354,7 +405,7 @@ private def self.foo
354
405
  end
355
406
  ```
356
407
 
357
- - [@masqita], [@kddeisz] - Inline variable assignment within a predicate should force the conditional to break, as in:
408
+ - masqita, kddeisz - Inline variable assignment within a predicate should force the conditional to break, as in:
358
409
 
359
410
  ```ruby
360
411
  array.each do |element|
@@ -364,26 +415,26 @@ array.each do |element|
364
415
  end
365
416
  ```
366
417
 
367
- - [@hafley66], [@kddeisz] - Handle empty `while` and `until` blocks.
368
- - [@Fruetel], [@kddeisz] - Simplify string escape pattern by locking on any escape sequence.
369
- - [@flyerhzm], [@kddeisz] - Properly handle string quotes on symbols in hash keys.
418
+ - hafley66, kddeisz - Handle empty `while` and `until` blocks.
419
+ - Fruetel, kddeisz - Simplify string escape pattern by locking on any escape sequence.
420
+ - flyerhzm, kddeisz - Properly handle string quotes on symbols in hash keys.
370
421
 
371
422
  ## [0.17.0] - 2019-12-12
372
423
 
373
424
  ### Added
374
425
 
375
- - [@matt-wratt] - Better support for explicit `return` nodes with empty arrays or arrays with a single element.
376
- - [@jrdioko], [@kddeisz] - Alignment of `not_to` is explicitly allowed to not indent to better support rspec.
426
+ - matt-wratt - Better support for explicit `return` nodes with empty arrays or arrays with a single element.
427
+ - jrdioko, kddeisz - Alignment of `not_to` is explicitly allowed to not indent to better support rspec.
377
428
 
378
429
  ### Changed
379
430
 
380
- - [@gin0606] - The max buffer being passed into the Ruby process is now up to 10MB.
431
+ - gin0606 - The max buffer being passed into the Ruby process is now up to 10MB.
381
432
 
382
433
  ## [0.16.0] - 2019-11-14
383
434
 
384
435
  ### Added
385
436
 
386
- - [@mmainz], [@kddeisz] - Support for extra commas in multiple assignment, as it changes the meaning. For example,
437
+ - mmainz, kddeisz - Support for extra commas in multiple assignment, as it changes the meaning. For example,
387
438
 
388
439
  <!-- prettier-ignore -->
389
440
  ```ruby
@@ -392,12 +443,12 @@ a, = [1, 2, 3]
392
443
 
393
444
  would previously get printed as `a = [1, 2, 3]`, which changes the value of `a` from `1` to the value of the entire array.
394
445
 
395
- - [@kddeisz] - Experimental support for the HAMtemplate language.
446
+ - kddeisz - Experimental support for the HAMtemplate language.
396
447
 
397
448
  ### Changed
398
449
 
399
- - [@github0013], [@kddeisz] - Support proper string escaping when the original string in the source is wrapped in `%q|...|`. For example, `%q|\'|` should get printed as `"\'"`, where previously it was dropping the backslash.
400
- - [@jamescostian], [@kddeisz] - Force ternary breaking when using the lower-precendence operators `and` and `or`. For example,
450
+ - github0013, kddeisz - Support proper string escaping when the original string in the source is wrapped in `%q|...|`. For example, `%q|\'|` should get printed as `"\'"`, where previously it was dropping the backslash.
451
+ - jamescostian, kddeisz - Force ternary breaking when using the lower-precendence operators `and` and `or`. For example,
401
452
 
402
453
  <!-- prettier-ignore -->
403
454
  ```ruby
@@ -410,7 +461,7 @@ end
410
461
 
411
462
  the previous expression was being transformed into a ternary which was invalid ruby. Instead it now stays broken out into an if/else block.
412
463
 
413
- - [@localhostdotdev], [@joeyjoejoejr], [@eins78], [@kddeisz] - Better support for embedded expressions inside heredocs. For example,
464
+ - localhostdotdev], [@joeyjoejoejr], [@eins78, kddeisz - Better support for embedded expressions inside heredocs. For example,
414
465
 
415
466
  <!-- prettier-ignore -->
416
467
  ```ruby
@@ -423,14 +474,14 @@ HERE
423
474
 
424
475
  should remain formatted as it is. Whereas previously due to the way the lines were split, you would sometimes end up with it breaking after `#{`.
425
476
 
426
- - [@jamescostian], [@kddeisz] - Fix up `return` node printing. When returning multiple values, you need to return an array literal as opposed to using parentheses.
477
+ - jamescostian, kddeisz - Fix up `return` node printing. When returning multiple values, you need to return an array literal as opposed to using parentheses.
427
478
 
428
479
  ## [0.15.1] - 2019-11-05
429
480
 
430
481
  ### Changed
431
482
 
432
- - [@AlanFoster] - Add `bin/lex` for viewing the tokenized result of Ripper on Ruby code.
433
- - [@jakeprime], [@kddeisz] - When predicates from within an `if`, `unless`, `while`, or `until` loop break the line, they should be aligned together. For example,
483
+ - AlanFoster - Add `bin/lex` for viewing the tokenized result of Ripper on Ruby code.
484
+ - jakeprime, kddeisz - When predicates from within an `if`, `unless`, `while`, or `until` loop break the line, they should be aligned together. For example,
434
485
 
435
486
  <!-- prettier-ignore -->
436
487
  ```ruby
@@ -449,7 +500,7 @@ if foooooo ||
449
500
  end
450
501
  ```
451
502
 
452
- - [@jamescostian], [@AlanFoster] - Empty `if`, and `unless` conditionals are now handled gracefully:
503
+ - jamescostian], [@AlanFoster - Empty `if`, and `unless` conditionals are now handled gracefully:
453
504
 
454
505
  <!-- prettier-ignore -->
455
506
  ```ruby
@@ -457,7 +508,7 @@ if foo?
457
508
  end
458
509
  ```
459
510
 
460
- - [@mmainz], [@kddeisz] - Hash keys are not converted to keyword syntax if they would make invalid symbols. For example,
511
+ - mmainz, kddeisz - Hash keys are not converted to keyword syntax if they would make invalid symbols. For example,
461
512
 
462
513
  <!-- prettier-ignore -->
463
514
  ```ruby
@@ -466,9 +517,9 @@ end
466
517
 
467
518
  cannot be translated into `[]:` as that is an invalid symbol. Instead, it stays with the hash rocket syntax.
468
519
 
469
- - [@cldevs], [@kddeisz] - Do not attempt to format the insides of xstring literals (string that get sent to the command line surrounded by backticks or `%x`).
470
- - [@cldevs], [@kddeisz] - When predicates for `if`, `unless`, `while`, or `until` nodes contain an assignment, we can't know for sure that it doesn't modify the body. In this case we need to always break and form a multi-line block.
471
- - [@MarcManiez], [@kddeisz] - When the return value of `if`, `unless`, `while`, or `until` nodes are assigned to anything other than a local variable, we need to wrap them in parentheses if we're changing to the modifier form. This is because the following expressions have different semantic meaning:
520
+ - cldevs, kddeisz - Do not attempt to format the insides of xstring literals (string that get sent to the command line surrounded by backticks or `%x`).
521
+ - cldevs, kddeisz - When predicates for `if`, `unless`, `while`, or `until` nodes contain an assignment, we can't know for sure that it doesn't modify the body. In this case we need to always break and form a multi-line block.
522
+ - MarcManiez, kddeisz - When the return value of `if`, `unless`, `while`, or `until` nodes are assigned to anything other than a local variable, we need to wrap them in parentheses if we're changing to the modifier form. This is because the following expressions have different semantic meaning:
472
523
 
473
524
  <!-- prettier-ignore -->
474
525
  ```ruby
@@ -485,14 +536,14 @@ hash[:key] = (break :value while false)
485
536
 
486
537
  That will guarantee that the expressions are equivalent.
487
538
 
488
- - [@AlanFoster] - Fix crashes that were happening with `ignored_nl` nodes.
539
+ - AlanFoster - Fix crashes that were happening with `ignored_nl` nodes.
489
540
 
490
541
  ## [0.15.0] - 2019-08-06
491
542
 
492
543
  ### Changed
493
544
 
494
- - [@dudeofawesome], [@kddeisz] - If xstring literals (command line calls surrounded by backticks) break, then we indent and place the command on a new line. Previously, this was resulting in new lines getting added each time the code was formatted. Now this happens correctly.
495
- - [@krachtstefan], [@kddeisz] - When a `while` or `until` loop modifies a `begin...end` statement, it must remain in the modifier form or else it changes sematic meaning. For example,
545
+ - dudeofawesome, kddeisz - If xstring literals (command line calls surrounded by backticks) break, then we indent and place the command on a new line. Previously, this was resulting in new lines getting added each time the code was formatted. Now this happens correctly.
546
+ - krachtstefan, kddeisz - When a `while` or `until` loop modifies a `begin...end` statement, it must remain in the modifier form or else it changes sematic meaning. For example,
496
547
 
497
548
  <!-- prettier-ignore -->
498
549
  ```ruby
@@ -512,8 +563,8 @@ end
512
563
 
513
564
  because that would never execute `foo` if `bar` is falsy, whereas in the initial example it would have.
514
565
 
515
- - [@jviney], [@kddeisz] - When transforming a block into the `Symbol#to_proc` syntax from within a list of arguments inside of an `aref` node (i.e., `foo[:bar].each`), we can't put the block syntax inside the brackets.
516
- - [@jakeprime], [@kddeisz] - Values for the `return` keyword that broke the line were previously just printed as they were, which breaks if you have a block expression like an `if` or `while`. For example,
566
+ - jviney], kddeisz - When transforming a block into the `Symbol#to_proc` syntax from within a list of arguments inside of an `aref` node (i.e., `foo[:bar.each`), we can't put the block syntax inside the brackets.
567
+ - jakeprime, kddeisz - Values for the `return` keyword that broke the line were previously just printed as they were, which breaks if you have a block expression like an `if` or `while`. For example,
517
568
 
518
569
  <!-- prettier-ignore -->
519
570
  ```ruby
@@ -544,7 +595,7 @@ return(
544
595
  )
545
596
  ```
546
597
 
547
- - [@jakeprime], [@kddeisz] - When switching from a double-quoted string to a single-quoted string that contained escaped double quotes, the backslashes would stay in the string. As in:
598
+ - jakeprime, kddeisz - When switching from a double-quoted string to a single-quoted string that contained escaped double quotes, the backslashes would stay in the string. As in:
548
599
 
549
600
  <!-- prettier-ignore -->
550
601
  ```ruby
@@ -569,11 +620,11 @@ but now gets formatted as:
569
620
 
570
621
  ### Added
571
622
 
572
- - [@kddeisz] - Support for pattern matching for variables and array patterns. Currently waiting on Ripper support for hash patterns. For examples, check out the [test/js/patterns.test.js](test/js/patterns.test.js) file.
623
+ - kddeisz - Support for pattern matching for variables and array patterns. Currently waiting on Ripper support for hash patterns. For examples, check out the [test/js/patterns.test.js](test/js/patterns.test.js) file.
573
624
 
574
625
  ### Changed
575
626
 
576
- - [@jviney], [@kddeisz] - if/else blocks that had method calls on the end of them that were also transformed into ternaries need to have parens added to them. For example,
627
+ - jviney, kddeisz - if/else blocks that had method calls on the end of them that were also transformed into ternaries need to have parens added to them. For example,
577
628
 
578
629
  <!-- prettier-ignore -->
579
630
  ```ruby
@@ -591,8 +642,8 @@ now correctly gets transformed into:
591
642
  (foo ? 1 : 2).to_s
592
643
  ```
593
644
 
594
- - [@acrewdson], [@kddeisz] - Fixed a bug where multiple newlines at the end of the file would cause a crash.
595
- - [@jviney], [@kddeisz] - If a variable is assigned inside of the predicate of a conditional, then we can't change it into the single-line version as this breaks. For example,
645
+ - acrewdson, kddeisz - Fixed a bug where multiple newlines at the end of the file would cause a crash.
646
+ - jviney, kddeisz - If a variable is assigned inside of the predicate of a conditional, then we can't change it into the single-line version as this breaks. For example,
596
647
 
597
648
  <!-- prettier-ignore -->
598
649
  ```ruby
@@ -607,11 +658,11 @@ must stay the same.
607
658
 
608
659
  ### Added
609
660
 
610
- - [@kddeisz] - Added `locStart` and `locEnd` functions to support `--cursor-offset`.
661
+ - kddeisz - Added `locStart` and `locEnd` functions to support `--cursor-offset`.
611
662
 
612
663
  ### Changed
613
664
 
614
- - [@xipgroc], [@kddeisz] - Comments inside of `do...end` blocks that preceeded `call` nodes were associating the comment with the `var_ref` instead of the `call` itself. For example,
665
+ - xipgroc, kddeisz - Comments inside of `do...end` blocks that preceeded `call` nodes were associating the comment with the `var_ref` instead of the `call` itself. For example,
615
666
 
616
667
  <!-- prettier-ignore -->
617
668
  ```ruby
@@ -636,7 +687,7 @@ end
636
687
 
637
688
  but now gets printed correctly.
638
689
 
639
- - [@petevk], [@kddeisz] - Double splats inside a hash were previously failing to print. For example,
690
+ - petevk, kddeisz - Double splats inside a hash were previously failing to print. For example,
640
691
 
641
692
  <!-- prettier-ignore -->
642
693
  ```ruby
@@ -649,12 +700,12 @@ would fail to print, but now works.
649
700
 
650
701
  ### Changed
651
702
 
652
- - [@kddeisz] - Move arg, assign, constant, flow, massign, operator, scope, and statement nodes into their own files.
653
- - [@kddeisz] - Move `@int`, `access_ctrl`, `assocsplat`, `block_var`, `else`, `number_arg`, `super`, `undef`, `var_ref`, and `var_ref` as well as various call and symbol nodes into appropriate files.
654
- - [@kddeisz] - Better support for excessed commas in block args. Previously `proc { |x,| }` would add an extra space, but now it does not.
655
- - [@kddeisz] - Add a lot more documentation to the parser.
656
- - [@glejeune], [@kddeisz] - Previously, the unary `not` operator inside a ternary (e.g., `a ? not(b) : c`) would break because it wouldn't add parentheses, but now it adds them.
657
- - [@kddeisz] - `if` and `unless` nodes used to not be able to handle if a comment was the only statement in the body. For example,
703
+ - kddeisz - Move arg, assign, constant, flow, massign, operator, scope, and statement nodes into their own files.
704
+ - kddeisz - Move `@int`, `access_ctrl`, `assocsplat`, `block_var`, `else`, `number_arg`, `super`, `undef`, `var_ref`, and `var_ref` as well as various call and symbol nodes into appropriate files.
705
+ - kddeisz - Better support for excessed commas in block args. Previously `proc { |x,| }` would add an extra space, but now it does not.
706
+ - kddeisz - Add a lot more documentation to the parser.
707
+ - glejeune, kddeisz - Previously, the unary `not` operator inside a ternary (e.g., `a ? not(b) : c`) would break because it wouldn't add parentheses, but now it adds them.
708
+ - kddeisz - `if` and `unless` nodes used to not be able to handle if a comment was the only statement in the body. For example,
658
709
 
659
710
  <!-- prettier-ignore -->
660
711
  ```ruby
@@ -672,7 +723,7 @@ would get printed as
672
723
 
673
724
  Now the `if` and `unless` printers check for the presence of single comments.
674
725
 
675
- - [@JoshuaKGoldberg], [@kddeisz] - Fixes an error where `command` nodes within `def` nodes would fail to format if it was only a single block argument. For example,
726
+ - JoshuaKGoldberg, kddeisz - Fixes an error where `command` nodes within `def` nodes would fail to format if it was only a single block argument. For example,
676
727
 
677
728
  <!-- prettier-ignore -->
678
729
  ```ruby
@@ -683,7 +734,7 @@ end
683
734
 
684
735
  would fail, but now works.
685
736
 
686
- - [@xipgroc], [@kddeisz] - Comments on lines with array references were previously deleting the array references entirely. For example,
737
+ - xipgroc, kddeisz - Comments on lines with array references were previously deleting the array references entirely. For example,
687
738
 
688
739
  <!-- prettier-ignore -->
689
740
  ```ruby
@@ -696,323 +747,323 @@ would previously result in `array[]`, but now prints properly.
696
747
 
697
748
  ### Changed
698
749
 
699
- - [@kddeisz] - When symbol literal hash keys end with `=`, they cannot be transformed into hash labels.
700
- - [@xipgroc], [@kddeisz] - Fixed when blocks on methods with no arguments are transformed into `to_proc` syntax.
750
+ - kddeisz - When symbol literal hash keys end with `=`, they cannot be transformed into hash labels.
751
+ - xipgroc, kddeisz - Fixed when blocks on methods with no arguments are transformed into `to_proc` syntax.
701
752
 
702
753
  ## [0.12.1] - 2019-04-22
703
754
 
704
755
  ### Changed
705
756
 
706
- - [@kddeisz] - If a lambda literal is nested under a `command` or `command_call` node anywhere in the heirarchy, then it needs to use the higher-precedence `{ ... }` braces as opposed to the `do ... end` delimiters.
707
- - [@jpickwell], [@kddeisz] - Calling `super` with a block and no args was causing the parser to fail when attempting to inspect lambda nodes.
708
- - [@kddeisz] - Support better breaking within interpolation by grouping the interpolated content.
757
+ - kddeisz - If a lambda literal is nested under a `command` or `command_call` node anywhere in the heirarchy, then it needs to use the higher-precedence `{ ... }` braces as opposed to the `do ... end` delimiters.
758
+ - jpickwell, kddeisz - Calling `super` with a block and no args was causing the parser to fail when attempting to inspect lambda nodes.
759
+ - kddeisz - Support better breaking within interpolation by grouping the interpolated content.
709
760
 
710
761
  ## [0.12.0] - 2019-04-18
711
762
 
712
763
  ### Added
713
764
 
714
- - [@kddeisz] - Automatically convert `lambda { ... }` method calls into `-> { ... }` literals.
765
+ - kddeisz - Automatically convert `lambda { ... }` method calls into `-> { ... }` literals.
715
766
 
716
767
  ## [0.11.0] - 2019-04-18
717
768
 
718
769
  ### Added
719
770
 
720
- - [@kddeisz] - Support for parsing things with a ruby shebang (e.g., `#!/usr/bin/env ruby` or `#!/usr/bin/ruby`).
721
- - [@kddeisz] - Big tests refactor.
722
- - [@kddeisz] - Make multiple `when` predicates break at 80 chars and then wrap to be inline with the other predicates.
723
- - [@kddeisz] - Automatically add underscores in large numbers that aren't already formatted.
724
- - [@AlanFoster] - Better support for inline access control modifiers.
725
- - [@jpickwell], [@kddeisz] - Better support for heredocs in hash literals.
726
- - [@kddeisz] - Better support for heredocs in array literals.
727
- - [@kddeisz] - Support automatically transforming `def/begin/rescue/end/end` into `def/rescue/end`.
771
+ - kddeisz - Support for parsing things with a ruby shebang (e.g., `#!/usr/bin/env ruby` or `#!/usr/bin/ruby`).
772
+ - kddeisz - Big tests refactor.
773
+ - kddeisz - Make multiple `when` predicates break at 80 chars and then wrap to be inline with the other predicates.
774
+ - kddeisz - Automatically add underscores in large numbers that aren't already formatted.
775
+ - AlanFoster - Better support for inline access control modifiers.
776
+ - jpickwell, kddeisz - Better support for heredocs in hash literals.
777
+ - kddeisz - Better support for heredocs in array literals.
778
+ - kddeisz - Support automatically transforming `def/begin/rescue/end/end` into `def/rescue/end`.
728
779
 
729
780
  ### Changed
730
781
 
731
- - [@deecewan] - Fixed support for dynamic string hash keys.
732
- - [@kddeisz] - Moved `case/when` into its own file and added better documentation.
733
- - [@kddeisz] - Moved `begin/rescue` into its own file.
734
- - [@AlanFoster] - Automatically add newlines around access modifiers.
735
- - [@kddeisz] - Alignment of command calls with arguments is fixed.
736
- - [@aaronjensen], [@kddeisz] - Alignment of `to` is explicitly allowed to not indent to better support rspec.
737
- - [@kddeisz] - Fix up the `to_proc` transform so that it works with other argument handling appropriately.
738
- - [@kddeisz] - Fixed regression on regexp comments.
739
- - [@CodingItWrong], [@kddeisz] - Fix up block delimiters when nested inside a `command` or `command_call` node.
740
- - [@kddeisz] - Moved hashes into its own file.
782
+ - deecewan - Fixed support for dynamic string hash keys.
783
+ - kddeisz - Moved `case/when` into its own file and added better documentation.
784
+ - kddeisz - Moved `begin/rescue` into its own file.
785
+ - AlanFoster - Automatically add newlines around access modifiers.
786
+ - kddeisz - Alignment of command calls with arguments is fixed.
787
+ - aaronjensen, kddeisz - Alignment of `to` is explicitly allowed to not indent to better support rspec.
788
+ - kddeisz - Fix up the `to_proc` transform so that it works with other argument handling appropriately.
789
+ - kddeisz - Fixed regression on regexp comments.
790
+ - CodingItWrong, kddeisz - Fix up block delimiters when nested inside a `command` or `command_call` node.
791
+ - kddeisz - Moved hashes into its own file.
741
792
 
742
793
  ## [0.10.0] - 2019-03-25
743
794
 
744
795
  ### Added
745
796
 
746
- - [@kddeisz] - Support for block-local variables.
747
- - [@kddeisz] - Support for dyna-symbols that are using single quotes.
797
+ - kddeisz - Support for block-local variables.
798
+ - kddeisz - Support for dyna-symbols that are using single quotes.
748
799
 
749
800
  ### Changed
750
801
 
751
- - [@kddeisz] - Force method calls after arrays, blocks, hashes, and xstrings to hang onto the end of the previous nodes.
752
- - [@kddeisz] - Check before anything else for an invalid ruby version.
802
+ - kddeisz - Force method calls after arrays, blocks, hashes, and xstrings to hang onto the end of the previous nodes.
803
+ - kddeisz - Check before anything else for an invalid ruby version.
753
804
 
754
805
  ## [0.9.1] - 2019-03-24
755
806
 
756
807
  ### Changed
757
808
 
758
- - [@kddeisz] - Better support string quotes by favoring what the user chose if the string contains escape patterns.
759
- - [@kddeisz] - Better support heredocs within method calls.
809
+ - kddeisz - Better support string quotes by favoring what the user chose if the string contains escape patterns.
810
+ - kddeisz - Better support heredocs within method calls.
760
811
 
761
812
  ## [0.9.0] - 2019-03-18
762
813
 
763
814
  ### Added
764
815
 
765
- - [@kddeisz] - Support the `hasPragma` function.
766
- - [@kddeisz] - Support the new `number_arg` node type in Ruby 2.7.
816
+ - kddeisz - Support the `hasPragma` function.
817
+ - kddeisz - Support the new `number_arg` node type in Ruby 2.7.
767
818
 
768
819
  ### Changed
769
820
 
770
- - [@kddeisz] - Limit the number of nodes that are allowed to turn into ternary expressions.
821
+ - kddeisz - Limit the number of nodes that are allowed to turn into ternary expressions.
771
822
 
772
823
  ## [0.8.0] - 2019-03-08
773
824
 
774
825
  ### Added
775
826
 
776
- - [@kddeisz] - Add `eslint` and fix up existing violations.
777
- - [@AlanFoster] - Add the infra for the `prettier` ruby gem.
778
- - [@kddeisz] - Add a `rake` task for easier process integration for the ruby gem.
779
- - [@kddeisz] - Handle direct interpolation of strings with %w array literals (i.e., `["#{foo}"]` should not be transformed into a %w array).
827
+ - kddeisz - Add `eslint` and fix up existing violations.
828
+ - AlanFoster - Add the infra for the `prettier` ruby gem.
829
+ - kddeisz - Add a `rake` task for easier process integration for the ruby gem.
830
+ - kddeisz - Handle direct interpolation of strings with %w array literals (i.e., `["#{foo}"]` should not be transformed into a %w array).
780
831
 
781
832
  ### Changed
782
833
 
783
- - [@kddeisz] - Fix string escaping for hex digit bit patterns when there's only one character after the "x".
784
- - [@AlanFoster] - Don't allow line breaks between brace block params.
785
- - [@johnschoeman] - Switch over the array.rb test case to minitest.
786
- - [@AlanFoster] - Test improvements to allow running in parallel.
787
- - [@johnschoeman] - Switch over assign.rb test case to minitest.
788
- - [@AlanFoster] - Add a contributing guide.
789
- - [@AlanFoster] - Handle longer command nodes.
790
- - [@kddeisz] - Changed the ruby executable within the `prettier` gem to `rbprettier` for easier autocomplete.
834
+ - kddeisz - Fix string escaping for hex digit bit patterns when there's only one character after the "x".
835
+ - AlanFoster - Don't allow line breaks between brace block params.
836
+ - johnschoeman - Switch over the array.rb test case to minitest.
837
+ - AlanFoster - Test improvements to allow running in parallel.
838
+ - johnschoeman - Switch over assign.rb test case to minitest.
839
+ - AlanFoster - Add a contributing guide.
840
+ - AlanFoster - Handle longer command nodes.
841
+ - kddeisz - Changed the ruby executable within the `prettier` gem to `rbprettier` for easier autocomplete.
791
842
 
792
843
  ### Removed
793
844
 
794
- - [@kddeisz] - All instances of the spread (`...`) operator so that we can support older versions of node.
845
+ - kddeisz - All instances of the spread (`...`) operator so that we can support older versions of node.
795
846
 
796
847
  ## [0.7.0] - 2019-02-24
797
848
 
798
849
  ### Changed
799
850
 
800
- - [@kddeisz] - Support checking for escaping within strings to force double quotes (e.g., "\n").
801
- - [@RossKinsella], [@kddeisz] - Handle cases with empty class and module declarations that need to break.
802
- - [@AlanFoster] - Align the `bin/print` and `bin/sexp` APto support `bin/print` taking a filepath.
803
- - [@AndrewRayCode], [@kddeisz] - Support lambdas that don't break and are inline.
804
- - [@AlanFoster] - Switch over the numbers.rb test to minitest.
805
- - [@AlanFoster] - Switch over the kwargs.rb test to minitest.
806
- - [@AlanFoster] - Bail out early if the Ruby input is invalid.
807
- - [@kddeisz] - Support `__END__` content.
808
- - [@AlanFoster] - Fix up issue with whitespace being added within regexp that are multiline.
809
- - [@AlanFoster] - Better support for destructuring within multi assignment.
810
- - [@kddeisz] - Switch `next` test over to minitest.
811
- - [@kddeisz] - Handle multiple arguments to `next` with a space between.
812
- - [@AndrewRayCode], [@kddeisz] - Handle multi-line conditional predicate (should align with keyword).
813
- - [@aaronjensen], [@kddeisz] - Properly support adding trailing commas with and without blocks.
814
- - [@AlanFoster], [@kddeisz] - Fix regression of handling comments within arrays on array literals.
815
- - [@AlanFoster] - Support multiple arguments to `undef`.
851
+ - kddeisz - Support checking for escaping within strings to force double quotes (e.g., "\n").
852
+ - RossKinsella, kddeisz - Handle cases with empty class and module declarations that need to break.
853
+ - AlanFoster - Align the `bin/print` and `bin/sexp` APto support `bin/print` taking a filepath.
854
+ - AndrewRayCode, kddeisz - Support lambdas that don't break and are inline.
855
+ - AlanFoster - Switch over the numbers.rb test to minitest.
856
+ - AlanFoster - Switch over the kwargs.rb test to minitest.
857
+ - AlanFoster - Bail out early if the Ruby input is invalid.
858
+ - kddeisz - Support `__END__` content.
859
+ - AlanFoster - Fix up issue with whitespace being added within regexp that are multiline.
860
+ - AlanFoster - Better support for destructuring within multi assignment.
861
+ - kddeisz - Switch `next` test over to minitest.
862
+ - kddeisz - Handle multiple arguments to `next` with a space between.
863
+ - AndrewRayCode, kddeisz - Handle multi-line conditional predicate (should align with keyword).
864
+ - aaronjensen, kddeisz - Properly support adding trailing commas with and without blocks.
865
+ - AlanFoster, kddeisz - Fix regression of handling comments within arrays on array literals.
866
+ - AlanFoster - Support multiple arguments to `undef`.
816
867
 
817
868
  ## [0.6.3] - 2019-02-18
818
869
 
819
870
  ### Changed
820
871
 
821
- - [@kddeisz] - Switch over `binary` fixture to minitest.
822
- - [@kddeisz] - Reconfigure parser into multiple layer modules so that it's easier to understand and manage.
823
- - [@kddeisz] - Handle comments from within `begin`, `rescue`, `ensure`, `while`, and `until` nodes.
824
- - [@kddeisz] - Properly indent heredocs without taking into account current indentation level.
872
+ - kddeisz - Switch over `binary` fixture to minitest.
873
+ - kddeisz - Reconfigure parser into multiple layer modules so that it's easier to understand and manage.
874
+ - kddeisz - Handle comments from within `begin`, `rescue`, `ensure`, `while`, and `until` nodes.
875
+ - kddeisz - Properly indent heredocs without taking into account current indentation level.
825
876
 
826
877
  ## [0.6.2] - 2019-02-17
827
878
 
828
879
  ### Changed
829
880
 
830
- - [@AlanFoster] - Handle regexp suffixes.
831
- - [@kddeisz] - Add support for testing the test fixtures with minitest.
832
- - [@kddeisz] - Switch over `alias` and `regexp` tests to minitest.
833
- - [@aaronjensen], [@kddeisz] - Break up method args to split into multiple lines.
834
- - [@christoomey], [@kddeisz] - Handle blocks args when trailing commas are on.
881
+ - AlanFoster - Handle regexp suffixes.
882
+ - kddeisz - Add support for testing the test fixtures with minitest.
883
+ - kddeisz - Switch over `alias` and `regexp` tests to minitest.
884
+ - aaronjensen, kddeisz - Break up method args to split into multiple lines.
885
+ - christoomey, kddeisz - Handle blocks args when trailing commas are on.
835
886
 
836
887
  ## [0.6.1] - 2019-02-15
837
888
 
838
889
  ### Changed
839
890
 
840
- - [@meleyal], [@kddeisz] - Fix Ruby 2.5 inline comments on `args_add_block` nodes.
841
- - [@meleyal], [@kddeisz] - Support passing `super()` explicitly with no arguments.
891
+ - meleyal, kddeisz - Fix Ruby 2.5 inline comments on `args_add_block` nodes.
892
+ - meleyal, kddeisz - Support passing `super()` explicitly with no arguments.
842
893
 
843
894
  ## [0.6.0] - 2019-02-14
844
895
 
845
896
  ### Added
846
897
 
847
- - [@kddeisz] - Handle non UTF-8 comments.
848
- - [@kddeisz] - Handle non UTF-8 identifiers.
849
- - [@kddeisz] - Handle non UTF-8 strings.
850
- - [@kddeisz] - Handle empty parens.
851
- - [@kddeisz] - Handle rescue with splats preceeding the exception names.
898
+ - kddeisz - Handle non UTF-8 comments.
899
+ - kddeisz - Handle non UTF-8 identifiers.
900
+ - kddeisz - Handle non UTF-8 strings.
901
+ - kddeisz - Handle empty parens.
902
+ - kddeisz - Handle rescue with splats preceeding the exception names.
852
903
 
853
904
  ### Changed
854
905
 
855
- - [@kddeisz] - Use `JSON::fast_generate` to get the s-expressions back from the parser.
856
- - [@NoahTheDuke], [@kddeisz] - Handle broken lambdas from within `command` and `command_call` nodes.
906
+ - kddeisz - Use `JSON::fast_generate` to get the s-expressions back from the parser.
907
+ - NoahTheDuke, kddeisz - Handle broken lambdas from within `command` and `command_call` nodes.
857
908
 
858
909
  ## [0.5.2] - 2019-02-13
859
910
 
860
911
  ### Changed
861
912
 
862
- - [@kddeisz] - Support embedded expressions within strings that contain only keywords, as in `"#{super}"`.
913
+ - kddeisz - Support embedded expressions within strings that contain only keywords, as in `"#{super}"`.
863
914
 
864
915
  ## [0.5.1] - 2019-02-13
865
916
 
866
917
  ### Changed
867
918
 
868
- - [@yuki24], [@kddeisz] - Force `do` blocks that we know have to be `do` blocks to break.
869
- - [@kmcq], [@kddeisz] - Handle `command` and `command_call` nodes `do` blocks by forcing them to break.
870
- - [@ashfurrow], [@kddeisz] - Attach comments to full hash association nodes, not just the value.
919
+ - yuki24, kddeisz - Force `do` blocks that we know have to be `do` blocks to break.
920
+ - kmcq, kddeisz - Handle `command` and `command_call` nodes `do` blocks by forcing them to break.
921
+ - ashfurrow, kddeisz - Attach comments to full hash association nodes, not just the value.
871
922
 
872
923
  ## [0.5.0] - 2019-02-13
873
924
 
874
925
  ### Added
875
926
 
876
- - [@kddeisz] - Automatically convert arrays of all string literals to %w arrays.
877
- - [@kddeisz] - Automatically convert arrays of all symbol literals to %i arrays.
927
+ - kddeisz - Automatically convert arrays of all string literals to %w arrays.
928
+ - kddeisz - Automatically convert arrays of all symbol literals to %i arrays.
878
929
 
879
930
  ### Changed
880
931
 
881
- - [@kddeisz] - Move the `args_add` and `args_new` handling into the parser.
882
- - [@uri], [@kddeisz] - Change `command_call` nodes to properly indent when broken and to not add a trailing comma.
883
- - [@kddeisz] - Rename the `trailingComma` option to `addTrailingCommas` to not conflict with the JS option.
932
+ - kddeisz - Move the `args_add` and `args_new` handling into the parser.
933
+ - uri, kddeisz - Change `command_call` nodes to properly indent when broken and to not add a trailing comma.
934
+ - kddeisz - Rename the `trailingComma` option to `addTrailingCommas` to not conflict with the JS option.
884
935
 
885
936
  ## [0.4.1] - 2019-02-12
886
937
 
887
938
  ### Changed
888
939
 
889
- - [@kddeisz] - Provide the `makeList` utility for the nodes that are lists from within ripper.
890
- - [@awinograd], [@kddeisz] - Again, this time for real, properly escape strings.
891
- - [@kddeisz] - Fix up trailing commas on command calls.
940
+ - kddeisz - Provide the `makeList` utility for the nodes that are lists from within ripper.
941
+ - awinograd, kddeisz - Again, this time for real, properly escape strings.
942
+ - kddeisz - Fix up trailing commas on command calls.
892
943
 
893
944
  ## [0.4.0] - 2019-02-12
894
945
 
895
946
  ### Added
896
947
 
897
- - [@Overload119], [@kddeisz] - Support the `trailingComma` configuration option (defaults to `false`).
948
+ - Overload119, kddeisz - Support the `trailingComma` configuration option (defaults to `false`).
898
949
 
899
950
  ### Changed
900
951
 
901
- - [@NoahTheDuke], [@kddeisz] - Pass the code to be formatted over `stdin`.
952
+ - NoahTheDuke, kddeisz - Pass the code to be formatted over `stdin`.
902
953
 
903
954
  ## [0.3.7] - 2019-02-11
904
955
 
905
956
  ### Changed
906
957
 
907
- - [@kddeisz] - Split up statements even if they started on the same line with `;`s unless they are within an embedded expression.
908
- - [@kddeisz] - Properly handle escaped quotes within strings.
958
+ - kddeisz - Split up statements even if they started on the same line with `;`s unless they are within an embedded expression.
959
+ - kddeisz - Properly handle escaped quotes within strings.
909
960
 
910
961
  ## [0.3.6] - 2019-02-10
911
962
 
912
963
  ### Changed
913
964
 
914
- - [@AlanFoster], [@kddeisz] - Support the `not` operator properly.
915
- - [@AlanFoster], [@kddeisz] - Handle comments properly inside `if`, `unless`, and `when` nodes.
965
+ - AlanFoster, kddeisz - Support the `not` operator properly.
966
+ - AlanFoster, kddeisz - Handle comments properly inside `if`, `unless`, and `when` nodes.
916
967
 
917
968
  ## [0.3.5] - 2019-02-09
918
969
 
919
970
  ### Changed
920
971
 
921
- - [@kddeisz] - Handle lonely operators in Ruby `2.5`.
972
+ - kddeisz - Handle lonely operators in Ruby `2.5`.
922
973
 
923
974
  ## [0.3.4] - 2019-02-09
924
975
 
925
976
  ### Changed
926
977
 
927
- - [@kddeisz] - Comments are now properly attached inside `defs` nodes.
928
- - [@kddeisz] - Support multiple inline comments on nodes.
929
- - [@kddeisz] - Support inline comments from within the `EXPR_END|EXPR_LABEL` lexer state.
930
- - [@cbothner] - Stop transforming multistatement blocks with `to_proc`.
931
- - [@kddeisz] - `do` blocks necessarily need to break their parent nodes.
932
- - [@eins78], [@kddeisz] - Handle `next` node edge case with `args_add` as the body.
978
+ - kddeisz - Comments are now properly attached inside `defs` nodes.
979
+ - kddeisz - Support multiple inline comments on nodes.
980
+ - kddeisz - Support inline comments from within the `EXPR_END|EXPR_LABEL` lexer state.
981
+ - cbothner - Stop transforming multistatement blocks with `to_proc`.
982
+ - kddeisz - `do` blocks necessarily need to break their parent nodes.
983
+ - eins78, kddeisz - Handle `next` node edge case with `args_add` as the body.
933
984
 
934
985
  ## [0.3.3] - 2019-02-09
935
986
 
936
987
  ### Changed
937
988
 
938
- - [@bugthing], [@kddeisz] - Command nodes within conditionals now break parents to disallow them from being turned into ternary expressions.
939
- - [@awinograd], [@kddeisz] - Properly escape double quotes when using `preferSingleQuotes: false`.
989
+ - bugthing, kddeisz - Command nodes within conditionals now break parents to disallow them from being turned into ternary expressions.
990
+ - awinograd, kddeisz - Properly escape double quotes when using `preferSingleQuotes: false`.
940
991
 
941
992
  ## [0.3.2] - 2019-02-09
942
993
 
943
994
  ### Changed
944
995
 
945
- - [@kddeisz] - Don't define duplicated methods in the parser.
946
- - [@kddeisz] - Let prettier know about `.rb` and `.rake` files so you don't have to specify the parser when running.
947
- - [@kddeisz] - Renamed the package to @prettier/plugin-ruby.
996
+ - kddeisz - Don't define duplicated methods in the parser.
997
+ - kddeisz - Let prettier know about `.rb` and `.rake` files so you don't have to specify the parser when running.
998
+ - kddeisz - Renamed the package to @prettier/plugin-ruby.
948
999
 
949
1000
  ## [0.3.1] - 2019-02-07
950
1001
 
951
1002
  ### Changed
952
1003
 
953
- - [@kddeisz] - Automatically add parens to method declarations.
954
- - [@kddeisz] - Handle comments on bare hash assocs.
955
- - [@kddeisz] - Handle `method_add_block` nodes where the statements may be nested one more level.
956
- - [@kddeisz] - Handle heredocs nested no matter how many levels deep.
1004
+ - kddeisz - Automatically add parens to method declarations.
1005
+ - kddeisz - Handle comments on bare hash assocs.
1006
+ - kddeisz - Handle `method_add_block` nodes where the statements may be nested one more level.
1007
+ - kddeisz - Handle heredocs nested no matter how many levels deep.
957
1008
 
958
1009
  ## [0.3.0] - 2019-02-07
959
1010
 
960
1011
  ### Added
961
1012
 
962
- - [@kddeisz] - Support squiggly heredocs.
963
- - [@kddeisz] - Support straight heredocs.
1013
+ - kddeisz - Support squiggly heredocs.
1014
+ - kddeisz - Support straight heredocs.
964
1015
 
965
1016
  ### Changed
966
1017
 
967
- - [@kddeisz] - Ignore current indentation when creating embdocs so that `=begin` is always at the beginning of the line.
968
- - [@kddeisz] - Move `regexp_add` and `regexp_new` handling into the parser.
969
- - [@kddeisz] - Move `xstring_add` and `xstring_new` handling into the parser.
970
- - [@kddeisz] - Move `string_add` and `string_content` handling into the parser.
971
- - [@kddeisz] - Move `mrhs_add` and `mrhs_new` handling into the parser.
972
- - [@kddeisz] - Move `mlhs_add` and `mlhs_new` handling into the parser.
1018
+ - kddeisz - Ignore current indentation when creating embdocs so that `=begin` is always at the beginning of the line.
1019
+ - kddeisz - Move `regexp_add` and `regexp_new` handling into the parser.
1020
+ - kddeisz - Move `xstring_add` and `xstring_new` handling into the parser.
1021
+ - kddeisz - Move `string_add` and `string_content` handling into the parser.
1022
+ - kddeisz - Move `mrhs_add` and `mrhs_new` handling into the parser.
1023
+ - kddeisz - Move `mlhs_add` and `mlhs_new` handling into the parser.
973
1024
 
974
1025
  ## [0.2.1] - 2019-02-06
975
1026
 
976
1027
  ### Changed
977
1028
 
978
- - [@kddeisz] - Handle brace blocks on commands properly.
979
- - [@kddeisz] - Break parent and return `do` blocks when called from a `command` node.
980
- - [@kddeisz] - Handle edge cases with `if` statements where there is no body of the if (so it can't be converted to a ternary).
1029
+ - kddeisz - Handle brace blocks on commands properly.
1030
+ - kddeisz - Break parent and return `do` blocks when called from a `command` node.
1031
+ - kddeisz - Handle edge cases with `if` statements where there is no body of the if (so it can't be converted to a ternary).
981
1032
 
982
1033
  ## [0.2.0] - 2019-02-06
983
1034
 
984
1035
  ### Added
985
1036
 
986
- - [@kddeisz] - Handle `methref` nodes from Ruby `2.7`.
987
- - [@kddeisz] - Allow `module` nodes to shorten using `;` when the block is empty.
1037
+ - kddeisz - Handle `methref` nodes from Ruby `2.7`.
1038
+ - kddeisz - Allow `module` nodes to shorten using `;` when the block is empty.
988
1039
 
989
1040
  ### Changed
990
1041
 
991
- - [@kddeisz] - Handle splat within an array, as in `[1, 2, *foo]`.
992
- - [@kddeisz] - Disallow comments from being attached to intermediary regex nodes.
993
- - [@kddeisz] - Fix `to_proc` transforms to reference the method called as opposed to the parameter name.
994
- - [@kddeisz] - Change statement lists to be generated within the parser instead of the printer, thereby allowing finer control over comments.
995
- - [@kddeisz] - Completely revamp comment parsing by switching off the internal lexer state from `ripper`. This should drastically increase accuracy of comment parsing in general, and set us up for success in the future.
996
- - [@kddeisz] - Allow comments to be attached to `CHAR` nodes.
997
- - [@kddeisz] - Disallow comments from being attached to `args_new` nodes.
998
- - [@kddeisz] - Track start and end lines so we can better insert block comments.
999
- - [@kddeisz] - Handle intermediary array nodes in the parse for better comment handling.
1042
+ - kddeisz - Handle splat within an array, as in `[1, 2, *foo]`.
1043
+ - kddeisz - Disallow comments from being attached to intermediary regex nodes.
1044
+ - kddeisz - Fix `to_proc` transforms to reference the method called as opposed to the parameter name.
1045
+ - kddeisz - Change statement lists to be generated within the parser instead of the printer, thereby allowing finer control over comments.
1046
+ - kddeisz - Completely revamp comment parsing by switching off the internal lexer state from `ripper`. This should drastically increase accuracy of comment parsing in general, and set us up for success in the future.
1047
+ - kddeisz - Allow comments to be attached to `CHAR` nodes.
1048
+ - kddeisz - Disallow comments from being attached to `args_new` nodes.
1049
+ - kddeisz - Track start and end lines so we can better insert block comments.
1050
+ - kddeisz - Handle intermediary array nodes in the parse for better comment handling.
1000
1051
 
1001
1052
  ## [0.1.2] - 2019-02-05
1002
1053
 
1003
1054
  ### Changed
1004
1055
 
1005
- - [@kddeisz] - Handle guard clauses that return with no parens.
1056
+ - kddeisz - Handle guard clauses that return with no parens.
1006
1057
 
1007
1058
  ## [0.1.1] - 2019-02-05
1008
1059
 
1009
1060
  ### Changed
1010
1061
 
1011
- - [@kddeisz] - Handle class method calls with the `::` operator.
1012
- - [@kddeisz] - Handle strings with apostrophes when using `preferSingleQuote`.
1013
- - [@kddeisz] - Have travis run multiple ruby versions.
1014
- - [@kddeisz] - Explicitly fail if ruby version is < `2.5`.
1015
- - [@kddeisz] - Disallow comments from being attached to intermediary string nodes.
1062
+ - kddeisz - Handle class method calls with the `::` operator.
1063
+ - kddeisz - Handle strings with apostrophes when using `preferSingleQuote`.
1064
+ - kddeisz - Have travis run multiple ruby versions.
1065
+ - kddeisz - Explicitly fail if ruby version is < `2.5`.
1066
+ - kddeisz - Disallow comments from being attached to intermediary string nodes.
1016
1067
 
1017
1068
  ## [0.1.0] - 2019-02-04
1018
1069
 
@@ -1020,7 +1071,13 @@ would previously result in `array[]`, but now prints properly.
1020
1071
 
1021
1072
  - Initial release 🎉
1022
1073
 
1023
- [unreleased]: https://github.com/prettier/plugin-ruby/compare/v1.2.3...HEAD
1074
+ [unreleased]: https://github.com/prettier/plugin-ruby/compare/v1.5.1...HEAD
1075
+ [1.5.1]: https://github.com/prettier/plugin-ruby/compare/v1.5.0...v1.5.1
1076
+ [1.5.0]: https://github.com/prettier/plugin-ruby/compare/v1.4.0...v1.5.0
1077
+ [1.4.0]: https://github.com/prettier/plugin-ruby/compare/v1.3.0...v1.4.0
1078
+ [1.3.0]: https://github.com/prettier/plugin-ruby/compare/v1.2.5...v1.3.0
1079
+ [1.2.5]: https://github.com/prettier/plugin-ruby/compare/v1.2.4...v1.2.5
1080
+ [1.2.4]: https://github.com/prettier/plugin-ruby/compare/v1.2.3...v1.2.4
1024
1081
  [1.2.3]: https://github.com/prettier/plugin-ruby/compare/v1.2.2...v1.2.3
1025
1082
  [1.2.2]: https://github.com/prettier/plugin-ruby/compare/v1.2.1...v1.2.2
1026
1083
  [1.2.1]: https://github.com/prettier/plugin-ruby/compare/v1.2.0...v1.2.1
@@ -1077,70 +1134,3 @@ would previously result in `array[]`, but now prints properly.
1077
1134
  [0.1.2]: https://github.com/prettier/plugin-ruby/compare/v0.1.1...v0.1.2
1078
1135
  [0.1.1]: https://github.com/prettier/plugin-ruby/compare/v0.1.0...v0.1.1
1079
1136
  [0.1.0]: https://github.com/prettier/plugin-ruby/compare/61f675...v0.1.0
1080
- [@aaronjensen]: https://github.com/aaronjensen
1081
- [@acrewdson]: https://github.com/acrewdson
1082
- [@alanfoster]: https://github.com/AlanFoster
1083
- [@alse]: https://github.com/alse
1084
- [@andrewraycode]: https://github.com/AndrewRayCode
1085
- [@andyw8]: https://github.com/andyw8
1086
- [@ashfurrow]: https://github.com/ashfurrow
1087
- [@awinograd]: https://github.com/awinograd
1088
- [@blampe]: https://github.com/blampe
1089
- [@bugthing]: https://github.com/bugthing
1090
- [@cbothner]: https://github.com/cbothner
1091
- [@christoomey]: https://github.com/christoomey
1092
- [@cldevs]: https://github.com/cldevs
1093
- [@codingitwrong]: https://github.com/CodingItWrong
1094
- [@coiti]: https://github.com/coiti
1095
- [@deecewan]: https://github.com/deecewan
1096
- [@dudeofawesome]: https://github.com/dudeofawesome
1097
- [@eins78]: https://github.com/eins78
1098
- [@flyerhzm]: https://github.com/flyerhzm
1099
- [@fruetel]: https://github.com/Fruetel
1100
- [@ftes]: https://github.com/ftes
1101
- [@gin0606]: https://github.com/gin0606
1102
- [@github0013]: https://github.com/github0013
1103
- [@glejeune]: https://github.com/glejeune
1104
- [@hafley66]: https://github.com/hafley66
1105
- [@ianks]: https://github.com/ianks
1106
- [@jakeprime]: https://github.com/jakeprime
1107
- [@jamescostian]: https://github.com/jamescostian
1108
- [@janklimo]: https://github.com/janklimo
1109
- [@jbielick]: https://github.com/jbielick
1110
- [@joeyjoejoejr]: https://github.com/joeyjoejoejr
1111
- [@johncsnyder]: https://github.com/johncsnyder
1112
- [@johnschoeman]: https://github.com/johnschoeman
1113
- [@joshuakgoldberg]: https://github.com/JoshuaKGoldberg
1114
- [@jpickwell]: https://github.com/jpickwell
1115
- [@jrdioko]: https://github.com/jrdioko
1116
- [@jviney]: https://github.com/jviney
1117
- [@karanmandal]: https://github.com/karanmandal
1118
- [@kddeisz]: https://github.com/kddeisz
1119
- [@kmcq]: https://github.com/kmcq
1120
- [@krachtstefan]: https://github.com/krachtstefan
1121
- [@localhostdotdev]: https://github.com/localhostdotdev
1122
- [@lukyth]: https://github.com/lukyth
1123
- [@marcmaniez]: https://github.com/MarcManiez
1124
- [@masqita]: https://github.com/masqita
1125
- [@matt-wratt]: https://github.com/matt-wratt
1126
- [@meleyal]: https://github.com/meleyal
1127
- [@mmainz]: https://github.com/mmainz
1128
- [@mmcnl]: https://github.com/mmcnl
1129
- [@nathan-beam]: https://github.com/nathan-beam
1130
- [@noahtheduke]: https://github.com/NoahTheDuke
1131
- [@overload119]: https://github.com/Overload119
1132
- [@petevk]: https://github.com/petevk
1133
- [@pje]: https://github.com/pje
1134
- [@rafbm]: https://github.com/rafbm
1135
- [@rindek]: https://github.com/rindek
1136
- [@rosskinsella]: https://github.com/RossKinsella
1137
- [@rsullivan00]: https://github.com/Rsullivan00
1138
- [@ryan-hunter-pc]: https://github.com/ryan-hunter-pc
1139
- [@shaydavidson]: https://github.com/ShayDavidson
1140
- [@steobrien]: https://github.com/steobrien
1141
- [@sviccari]: https://github.com/SViccari
1142
- [@tobyndockerill]: https://github.com/tobyndockerill
1143
- [@uri]: https://github.com/uri
1144
- [@xipgroc]: https://github.com/xipgroc
1145
- [@ykpythemind]: https://github.com/ykpythemind
1146
- [@yuki24]: https://github.com/yuki24