prettier 0.17.0 → 0.19.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: fc291568d5eacc510331ada372873009a421e662515973e636f01ae976259f86
4
- data.tar.gz: 1468039903774af9890529e3465ff1d87604e7021d245169e98d5ef18530d191
3
+ metadata.gz: c1f1b3a234ed95cb01a603dafef678f5363e34953a35fb662ce59a83a0462393
4
+ data.tar.gz: 77fbbb7333e1d119a3ec3fbd6f4c3c305cba1826b9b03e5b22a7876ef5f0f686
5
5
  SHA512:
6
- metadata.gz: 6b24329a405906fdd398ca103542b668a81a2405c3c3fa4d1d9b0fe7ba241725fadfdc94f82ea5c9863124bc47b23aba6e9c7cf8bcb0c691f823fe36ebb838a1
7
- data.tar.gz: 16af5261aa8f8aaec126d9d2290567e2d3f14046618ea99c6818ac88d06117a56655e4e09dfacaf90c46cd679654fa15fed605d0a37eee61819275a73e54a202
6
+ metadata.gz: 541b753615c3d8daab03eaeb2d82ec4fcca83e112ffc252a86be359f44f98368244701e92f386ab3c9b38f519e308144d9f8274017a25ee9258ca0f2af075226
7
+ data.tar.gz: 60da4e2ab1e640bb58df4ffccdade65c7dad1b923372f30d43799939ad084623ec996c3ef24c501681119a09d4ecaf481583770cb367d21f43a308748ac84483
@@ -6,36 +6,197 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) a
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
+ ## [0.19.1] - 2020-08-21
10
+
11
+ ### Changed
12
+
13
+ - [@Rsullivan00] - Do not tranform word-literal arrays when there is an escape sequence.
14
+ - [@steobrien], [@kddeisz] - Do not indent heredocs with calls more than they should be.
15
+ - [@jpickwell] - Include .simplecov in filenames
16
+ - [@github0013], [@kddeisz] - Ensure we're parsing ruby files using UTF-8 regardless of the system encoding.
17
+
18
+ ## [0.19.0] - 2020-07-03
19
+
20
+ ### Added
21
+
22
+ - [@ryan-hunter-pc] - Add the option to disable the `Symbol#to_proc` transform.
23
+ - [@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`.
24
+
25
+ ## [0.18.2] - 2020-05-01
26
+
27
+ ### Changed
28
+
29
+ - [@alse] - Support `vscodeLanguageIds` for HAML.
30
+ - [@ShayDavidson], [@kddeisz] - Don't allow replacing if/else with ternary if there's an assignment in the predicate.
31
+ - [@janklimo] - Do not add an empty line after `rescue` when the block is empty.
32
+
33
+ ## [0.18.1] - 2020-04-05
34
+
35
+ ### Changed
36
+
37
+ - [@petevk], [@kddeisz] - Use braces for block format iff it was originally a brace block, otherwise you could be changing precedence. For example:
38
+
39
+ <!-- prettier-ignore -->
40
+ ```ruby
41
+ expect do
42
+ field 1 do
43
+ "foo"
44
+ end
45
+ end.to raise_error
46
+ ```
47
+
48
+ should maintain its `do...end` and not switch to inline braces otherwise the brace might get associated with the `1`.
49
+
50
+ - [@flyerhzm] - Rewrite operators binary parser, as in:
51
+
52
+ <!-- prettier-ignore -->
53
+ ```ruby
54
+ [
55
+ '1111111111111111111111111111111111111111111111111111111111111111111111111',
56
+ 222
57
+ ] +
58
+ [1]
59
+ ```
60
+
61
+ - [@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.
62
+ - [@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.
63
+ - [@ftes], [@kddeisz] - Don't explicitly require JSON if it has already been loaded, as this can lead to rubygems activation errors.
64
+ - [@mmainz], [@kddeisz] - Handle heredocs as the receivers of call nodes, as in:
65
+
66
+ <!-- prettier-ignore -->
67
+ ```ruby
68
+ foo = <<~TEXT.strip
69
+ bar
70
+ TEXT
71
+ ```
72
+
73
+ - [@github0013], [@kddeisz] - Leave parentheses in place if the value of a return node contains a binary with low operator precedence, as in:
74
+
75
+ <!-- prettier-ignore -->
76
+ ```ruby
77
+ return (a or b) if c?
78
+ ```
79
+
80
+ ## [0.18.0] - 2020-03-17
81
+
82
+ ### Added
83
+
84
+ - [@kddeisz] - Support for the `nokw_param` node for specifying when methods should no accept keywords, as in:
85
+
86
+ ```ruby
87
+ def foo(**nil); end
88
+ ```
89
+
90
+ - [@kddeisz] - Support for the `args_forward` node for forwarding all types of arguments, as in:
91
+
92
+ ```ruby
93
+ def foo(...)
94
+ bar(...)
95
+ end
96
+ ```
97
+
98
+ ### Changed
99
+
100
+ - [@ftes], [@kddeisz] - Handled 3 or more classes on a node in HAML, as in:
101
+
102
+ ```haml
103
+ %table.table.is-striped.is-hoverable
104
+ ```
105
+
106
+ - [@ftes], [@kddeisz] - Better handling of indentation of `if/elsif/else`, `unless/elsif/else`, and `case/when` branches, as in:
107
+
108
+ ```haml
109
+ .column.is-12
110
+ - if true
111
+ TRUE
112
+ - else
113
+ FALSE
114
+ ```
115
+
116
+ - [@tobyndockerill] - Format numbers with underscores after 4 digits, as opposed to 3.
117
+ - [@ianks] - Improve performance by using `--disable-gems`.
118
+ - [@flyerhzm] - Calls are grouped such that after an end parenthesis the following call will not be indented, as in:
119
+
120
+ <!-- prettier-ignore -->
121
+ ```ruby
122
+ Config::Download.new(
123
+ 'prettier',
124
+ filename: 'prettier.yml', url: 'https://raw.githubusercontent.com/...'
125
+ )
126
+ .perform
127
+ ```
128
+
129
+ will now be printed as:
130
+
131
+ ```ruby
132
+ Config::Download.new(
133
+ 'prettier',
134
+ filename: 'prettier.yml', url: 'https://raw.githubusercontent.com/...'
135
+ ).perform
136
+ ```
137
+
138
+ - [@pje], [@kddeisz] - Method definition bodies (on `defs` nodes) should dedent if a helper method is called. As in:
139
+
140
+ <!-- prettier-ignore -->
141
+ ```ruby
142
+ private def self.foo
143
+ 'bar'
144
+ end
145
+ ```
146
+
147
+ should instead be indented as:
148
+
149
+ <!-- prettier-ignore -->
150
+ ```ruby
151
+ private def self.foo
152
+ 'bar'
153
+ end
154
+ ```
155
+
156
+ - [@masqita], [@kddeisz] - Inline variable assignment within a predicate should force the conditional to break, as in:
157
+
158
+ ```ruby
159
+ array.each do |element|
160
+ if index = difference.index(element)
161
+ difference.delete_at(index)
162
+ end
163
+ end
164
+ ```
165
+
166
+ - [@hafley66], [@kddeisz] - Handle empty `while` and `until` blocks.
167
+ - [@Fruetel], [@kddeisz] - Simplify string escape pattern by locking on any escape sequence.
168
+ - [@flyerhzm], [@kddeisz] - Properly handle string quotes on symbols in hash keys.
169
+
9
170
  ## [0.17.0] - 2019-12-12
10
171
 
11
172
  ### Added
12
173
 
13
- - Better support for explicit `return` nodes with empty arrays or arrays with a single element. (Thanks to @matt-wratt.)
14
- - Alignment of `not_to` is explicitly allowed to not indent to better support rspec. (Thanks to @jrdioko for the report.)
174
+ - [@matt-wratt] - Better support for explicit `return` nodes with empty arrays or arrays with a single element.
175
+ - [@jrdioko], [@kddeisz] - Alignment of `not_to` is explicitly allowed to not indent to better support rspec.
15
176
 
16
177
  ### Changed
17
178
 
18
- - The max buffer being passed into the Ruby process is now up to 10MB. (Thanks to @gin0606.)
179
+ - [@gin0606] - The max buffer being passed into the Ruby process is now up to 10MB.
19
180
 
20
181
  ## [0.16.0] - 2019-11-14
21
182
 
22
183
  ### Added
23
184
 
24
- - Support for extra commas in multiple assignment, as it changes the meaning. For example,
185
+ - [@mmainz], [@kddeisz] - Support for extra commas in multiple assignment, as it changes the meaning. For example,
25
186
 
26
187
  <!-- prettier-ignore -->
27
188
  ```ruby
28
189
  a, = [1, 2, 3]
29
190
  ```
30
191
 
31
- would previously get printed as `a = [1, 2, 3]`, which changes the value of `a` from `1` to the value of the entire array. (Thanks to @mmainz for the report.)
192
+ would previously get printed as `a = [1, 2, 3]`, which changes the value of `a` from `1` to the value of the entire array.
32
193
 
33
- - Experimental support for the HAML template language.
194
+ - [@kddeisz] - Experimental support for the HAMtemplate language.
34
195
 
35
196
  ### Changed
36
197
 
37
- - 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. (Thanks to @github0013 for the report.)
38
- - Force ternary breaking when using the lower-precendence operators `and` and `or`. For example,
198
+ - [@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.
199
+ - [@jamescostian], [@kddeisz] - Force ternary breaking when using the lower-precendence operators `and` and `or`. For example,
39
200
 
40
201
  <!-- prettier-ignore -->
41
202
  ```ruby
@@ -46,9 +207,9 @@ else
46
207
  end
47
208
  ```
48
209
 
49
- the previous expression was being transformed into a ternary which was invalid ruby. Instead it now stays broken out into an if/else block. (Thanks to @jamescostian for the report.)
210
+ the previous expression was being transformed into a ternary which was invalid ruby. Instead it now stays broken out into an if/else block.
50
211
 
51
- - Better support for embedded expressions inside heredocs. For example,
212
+ - [@localhostdotdev], [@joeyjoejoejr], [@eins78], [@kddeisz] - Better support for embedded expressions inside heredocs. For example,
52
213
 
53
214
  <!-- prettier-ignore -->
54
215
  ```ruby
@@ -59,16 +220,16 @@ the previous expression was being transformed into a ternary which was invalid r
59
220
  HERE
60
221
  ```
61
222
 
62
- 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 `#{`. (Thanks to @localhostdotdev, @joeyjoejoejr, and @eins78 for the reports.)
223
+ 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 `#{`.
63
224
 
64
- - Fix up `return` node printing. When returning multiple values, you need to return an array literal as opposed to using parentheses. (Thanks to @jamescostian for the report.)
225
+ - [@jamescostian], [@kddeisz] - Fix up `return` node printing. When returning multiple values, you need to return an array literal as opposed to using parentheses.
65
226
 
66
227
  ## [0.15.1] - 2019-11-05
67
228
 
68
229
  ### Changed
69
230
 
70
- - [INTERNAL] Add `bin/lex` for viewing the tokenized result of Ripper on Ruby code (Thanks to @AlanFoster.)
71
- - When predicates from within an `if`, `unless`, `while`, or `until` loop break the line, they should be aligned together. For example,
231
+ - [@AlanFoster] - Add `bin/lex` for viewing the tokenized result of Ripper on Ruby code.
232
+ - [@jakeprime], [@kddeisz] - When predicates from within an `if`, `unless`, `while`, or `until` loop break the line, they should be aligned together. For example,
72
233
 
73
234
  <!-- prettier-ignore -->
74
235
  ```ruby
@@ -87,9 +248,7 @@ if foooooo ||
87
248
  end
88
249
  ```
89
250
 
90
- (Thanks to @jakeprime for the report.)
91
-
92
- - Empty `if`, and `unless` conditionals are now handled gracefully:
251
+ - [@jamescostian], [@AlanFoster] - Empty `if`, and `unless` conditionals are now handled gracefully:
93
252
 
94
253
  <!-- prettier-ignore -->
95
254
  ```ruby
@@ -97,20 +256,18 @@ if foo?
97
256
  end
98
257
  ```
99
258
 
100
- (Thanks to @AlanFoster for the fix, and @jamescostian for the report.)
101
-
102
- - Hash keys are not converted to keyword syntax if they would make invalid symbols. For example,
259
+ - [@mmainz], [@kddeisz] - Hash keys are not converted to keyword syntax if they would make invalid symbols. For example,
103
260
 
104
261
  <!-- prettier-ignore -->
105
262
  ```ruby
106
263
  { :[] => nil }
107
264
  ```
108
265
 
109
- cannot be translated into `[]:` as that is an invalid symbol. Instead, it stays with the hash rocket syntax. (Thanks to @mmainz for the report.)
266
+ cannot be translated into `[]:` as that is an invalid symbol. Instead, it stays with the hash rocket syntax.
110
267
 
111
- - Do not attempt to format the insides of xstring literals (string that get sent to the command line surrounded by backticks or `%x`). (Thanks to @cldevs for the report.)
112
- - 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. (Thanks to @cldevs for the report.)
113
- - 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:
268
+ - [@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`).
269
+ - [@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.
270
+ - [@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:
114
271
 
115
272
  <!-- prettier-ignore -->
116
273
  ```ruby
@@ -125,16 +282,16 @@ The first one will not result in an empty hash, whereas the second one will resu
125
282
  hash[:key] = (break :value while false)
126
283
  ```
127
284
 
128
- That will guarantee that the expressions are equivalent. (Thanks to @MarcManiez for the report.)
285
+ That will guarantee that the expressions are equivalent.
129
286
 
130
- - Fix crashes that were happening with `ignored_nl` nodes. (Thanks to @AlanFoster.)
287
+ - [@AlanFoster] - Fix crashes that were happening with `ignored_nl` nodes.
131
288
 
132
289
  ## [0.15.0] - 2019-08-06
133
290
 
134
291
  ### Changed
135
292
 
136
- - 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. (Thanks to @dudeofawesome for the report.)
137
- - 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,
293
+ - [@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.
294
+ - [@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,
138
295
 
139
296
  <!-- prettier-ignore -->
140
297
  ```ruby
@@ -152,10 +309,10 @@ while bar
152
309
  end
153
310
  ```
154
311
 
155
- because that would never execute `foo` if `bar` is falsy, whereas in the initial example it would have. (Thanks to @krachtstefan for the report.)
312
+ because that would never execute `foo` if `bar` is falsy, whereas in the initial example it would have.
156
313
 
157
- - 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. (Thanks to @jviney for the report.)
158
- - 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,
314
+ - [@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.
315
+ - [@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,
159
316
 
160
317
  <!-- prettier-ignore -->
161
318
  ```ruby
@@ -186,9 +343,7 @@ return(
186
343
  )
187
344
  ```
188
345
 
189
- (Thanks to @jakeprime for the report.)
190
-
191
- - 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:
346
+ - [@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:
192
347
 
193
348
  <!-- prettier-ignore -->
194
349
  ```ruby
@@ -209,17 +364,15 @@ but now gets formatted as:
209
364
  'Foo "Bar" Baz'
210
365
  ```
211
366
 
212
- (Thanks to @jakeprime for the report.)
213
-
214
367
  ## [0.14.0] - 2019-07-17
215
368
 
216
369
  ### Added
217
370
 
218
- - 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.
371
+ - [@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.
219
372
 
220
373
  ### Changed
221
374
 
222
- - 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,
375
+ - [@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,
223
376
 
224
377
  <!-- prettier-ignore -->
225
378
  ```ruby
@@ -237,10 +390,8 @@ now correctly gets transformed into:
237
390
  (foo ? 1 : 2).to_s
238
391
  ```
239
392
 
240
- (Thanks to @jviney for the report.)
241
-
242
- - Fixed a bug where multiple newlines at the end of the file would cause a crash. (Thanks to @acrewdson for the report.)
243
- - 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,
393
+ - [@acrewdson], [@kddeisz] - Fixed a bug where multiple newlines at the end of the file would cause a crash.
394
+ - [@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,
244
395
 
245
396
  <!-- prettier-ignore -->
246
397
  ```ruby
@@ -249,17 +400,17 @@ if foo = 1
249
400
  end
250
401
  ```
251
402
 
252
- must stay the same. (Thanks to @jviney for the report.)
403
+ must stay the same.
253
404
 
254
405
  ## [0.13.0] - 2019-07-05
255
406
 
256
407
  ### Added
257
408
 
258
- - Added `locStart` and `locEnd` functions to support `--cursor-offset`.
409
+ - [@kddeisz] - Added `locStart` and `locEnd` functions to support `--cursor-offset`.
259
410
 
260
411
  ### Changed
261
412
 
262
- - 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,
413
+ - [@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,
263
414
 
264
415
  <!-- prettier-ignore -->
265
416
  ```ruby
@@ -282,27 +433,27 @@ foo.each do |bar|
282
433
  end
283
434
  ```
284
435
 
285
- but now gets printed correctly. (Thanks to @xipgroc for the report.)
436
+ but now gets printed correctly.
286
437
 
287
- - Double splats inside a hash were previously failing to print. For example,
438
+ - [@petevk], [@kddeisz] - Double splats inside a hash were previously failing to print. For example,
288
439
 
289
440
  <!-- prettier-ignore -->
290
441
  ```ruby
291
442
  { foo: "bar", **baz }
292
443
  ```
293
444
 
294
- would fail to print, but now works. (Thanks to @petevk for the report.)
445
+ would fail to print, but now works.
295
446
 
296
447
  ## [0.12.3] - 2019-05-16
297
448
 
298
449
  ### Changed
299
450
 
300
- - [INTERNAL] Move arg, assign, constant, flow, massign, operator, scope, and statement nodes into their own files.
301
- - [INTERNAL] 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.
302
- - Better support for excessed commas in block args. Previously `proc { |x,| }` would add an extra space, but now it does not.
303
- - [INTERNAL] Add a lot more documentation to the parser.
304
- - 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. (Thanks to @glejeune for the report.)
305
- - `if` and `unless` nodes used to not be able to handle if a comment was the only statement in the body. For example,
451
+ - [@kddeisz] - Move arg, assign, constant, flow, massign, operator, scope, and statement nodes into their own files.
452
+ - [@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.
453
+ - [@kddeisz] - Better support for excessed commas in block args. Previously `proc { |x,| }` would add an extra space, but now it does not.
454
+ - [@kddeisz] - Add a lot more documentation to the parser.
455
+ - [@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.
456
+ - [@kddeisz] - `if` and `unless` nodes used to not be able to handle if a comment was the only statement in the body. For example,
306
457
 
307
458
  <!-- prettier-ignore -->
308
459
  ```ruby
@@ -320,7 +471,7 @@ would get printed as
320
471
 
321
472
  Now the `if` and `unless` printers check for the presence of single comments.
322
473
 
323
- - Fixes an error where `command` nodes within `def` nodes would fail to format if it was only a single block argument. For example,
474
+ - [@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,
324
475
 
325
476
  <!-- prettier-ignore -->
326
477
  ```ruby
@@ -329,338 +480,338 @@ def curry(&block)
329
480
  end
330
481
  ```
331
482
 
332
- would fail, but now works. (Thanks to @JoshuaKGoldberg for the report.)
483
+ would fail, but now works.
333
484
 
334
- - Comments on lines with array references were previously deleting the array references entirely. For example,
485
+ - [@xipgroc], [@kddeisz] - Comments on lines with array references were previously deleting the array references entirely. For example,
335
486
 
336
487
  <!-- prettier-ignore -->
337
488
  ```ruby
338
489
  array[index] # comment
339
490
  ```
340
491
 
341
- would previously result in `array[]`, but now prints properly. (Thanks to @xipgroc for the report.)
492
+ would previously result in `array[]`, but now prints properly.
342
493
 
343
494
  ## [0.12.2] - 2019-04-30
344
495
 
345
496
  ### Changed
346
497
 
347
- - When symbol literal hash keys end with `=`, they cannot be transformed into hash labels.
348
- - Fixed when blocks on methods with no arguments are transformed into `to_proc` syntax. (Thanks to @xipgroc for the report.)
498
+ - [@kddeisz] - When symbol literal hash keys end with `=`, they cannot be transformed into hash labels.
499
+ - [@xipgroc], [@kddeisz] - Fixed when blocks on methods with no arguments are transformed into `to_proc` syntax.
349
500
 
350
501
  ## [0.12.1] - 2019-04-22
351
502
 
352
503
  ### Changed
353
504
 
354
- - 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.
355
- - Calling `super` with a block and no args was causing the parser to fail when attempting to inspect lambda nodes. (Thanks to @jpickwell for the report.)
356
- - Support better breaking within interpolation by grouping the interpolated content.
505
+ - [@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.
506
+ - [@jpickwell], [@kddeisz] - Calling `super` with a block and no args was causing the parser to fail when attempting to inspect lambda nodes.
507
+ - [@kddeisz] - Support better breaking within interpolation by grouping the interpolated content.
357
508
 
358
509
  ## [0.12.0] - 2019-04-18
359
510
 
360
511
  ### Added
361
512
 
362
- - Automatically convert `lambda { ... }` method calls into `-> { ... }` literals.
513
+ - [@kddeisz] - Automatically convert `lambda { ... }` method calls into `-> { ... }` literals.
363
514
 
364
515
  ## [0.11.0] - 2019-04-18
365
516
 
366
517
  ### Added
367
518
 
368
- - Support for parsing things with a ruby shebang (e.g., `#!/usr/bin/env ruby` or `#!/usr/bin/ruby`).
369
- - [INTERNAL] Big tests refactor.
370
- - Make multiple `when` predicates break at 80 chars and then wrap to be inline with the other predicates.
371
- - Automatically add underscores in large numbers that aren't already formatted.
372
- - Better support for inline access control modifiers. (Thanks for @AlanFoster.)
373
- - Better support for heredocs in hash literals. (Thanks to @jpickwell for the report.)
374
- - Better support for heredocs in array literals.
375
- - Support automatically transforming `def/begin/rescue/end/end` into `def/rescue/end`.
519
+ - [@kddeisz] - Support for parsing things with a ruby shebang (e.g., `#!/usr/bin/env ruby` or `#!/usr/bin/ruby`).
520
+ - [@kddeisz] - Big tests refactor.
521
+ - [@kddeisz] - Make multiple `when` predicates break at 80 chars and then wrap to be inline with the other predicates.
522
+ - [@kddeisz] - Automatically add underscores in large numbers that aren't already formatted.
523
+ - [@AlanFoster] - Better support for inline access control modifiers.
524
+ - [@jpickwell], [@kddeisz] - Better support for heredocs in hash literals.
525
+ - [@kddeisz] - Better support for heredocs in array literals.
526
+ - [@kddeisz] - Support automatically transforming `def/begin/rescue/end/end` into `def/rescue/end`.
376
527
 
377
528
  ### Changed
378
529
 
379
- - Fixed support for dynamic string hash keys. (Thanks to @deecewan.)
380
- - [INTERNAL] Moved `case/when` into its own file and added better documentation.
381
- - [INTERNAL] Moved `begin/rescue` into its own file.
382
- - Automatically add newlines around access modifiers. (Thanks for @AlanFoster.)
383
- - Alignment of command calls with arguments is fixed.
384
- - Alignment of `to` is explicitly allowed to not indent to better support rspec. (Thanks to @aaronjensen for the report.)
385
- - Fix up the `to_proc` transform so that it works with other argument handling appropriately.
386
- - Fixed regression on regexp comments.
387
- - Fix up block delimiters when nested inside a `command` or `command_call` node. (Thanks to @CodingItWrong for the report.)
388
- - [INTERNAL] Moved hashes into its own file.
530
+ - [@deecewan] - Fixed support for dynamic string hash keys.
531
+ - [@kddeisz] - Moved `case/when` into its own file and added better documentation.
532
+ - [@kddeisz] - Moved `begin/rescue` into its own file.
533
+ - [@AlanFoster] - Automatically add newlines around access modifiers.
534
+ - [@kddeisz] - Alignment of command calls with arguments is fixed.
535
+ - [@aaronjensen], [@kddeisz] - Alignment of `to` is explicitly allowed to not indent to better support rspec.
536
+ - [@kddeisz] - Fix up the `to_proc` transform so that it works with other argument handling appropriately.
537
+ - [@kddeisz] - Fixed regression on regexp comments.
538
+ - [@CodingItWrong], [@kddeisz] - Fix up block delimiters when nested inside a `command` or `command_call` node.
539
+ - [@kddeisz] - Moved hashes into its own file.
389
540
 
390
541
  ## [0.10.0] - 2019-03-25
391
542
 
392
543
  ### Added
393
544
 
394
- - Support for block-local variables.
395
- - Support for dyna-symbols that are using single quotes.
545
+ - [@kddeisz] - Support for block-local variables.
546
+ - [@kddeisz] - Support for dyna-symbols that are using single quotes.
396
547
 
397
548
  ### Changed
398
549
 
399
- - Force method calls after arrays, blocks, hashes, and xstrings to hang onto the end of the previous nodes.
400
- - Check before anything else for an invalid ruby version.
550
+ - [@kddeisz] - Force method calls after arrays, blocks, hashes, and xstrings to hang onto the end of the previous nodes.
551
+ - [@kddeisz] - Check before anything else for an invalid ruby version.
401
552
 
402
553
  ## [0.9.1] - 2019-03-24
403
554
 
404
555
  ### Changed
405
556
 
406
- - Better support string quotes by favoring what the user chose if the string contains escape patterns.
407
- - Better support heredocs within method calls.
557
+ - [@kddeisz] - Better support string quotes by favoring what the user chose if the string contains escape patterns.
558
+ - [@kddeisz] - Better support heredocs within method calls.
408
559
 
409
560
  ## [0.9.0] - 2019-03-18
410
561
 
411
562
  ### Added
412
563
 
413
- - Support the `hasPragma` function.
414
- - Support the new `number_arg` node type in Ruby 2.7.
564
+ - [@kddeisz] - Support the `hasPragma` function.
565
+ - [@kddeisz] - Support the new `number_arg` node type in Ruby 2.7.
415
566
 
416
567
  ### Changed
417
568
 
418
- - Limit the number of nodes that are allowed to turn into ternary expressions.
569
+ - [@kddeisz] - Limit the number of nodes that are allowed to turn into ternary expressions.
419
570
 
420
571
  ## [0.8.0] - 2019-03-08
421
572
 
422
573
  ### Added
423
574
 
424
- - [INTERNAL] Add `eslint` and fix up existing violations.
425
- - Add the infra for the `prettier` ruby gem. (Thanks to @AlanFoster.)
426
- - Add a `rake` task for easier process integration for the ruby gem.
427
- - Handle direct interpolation of strings with %w array literals (i.e., `["#{foo}"]` should not be transformed into a %w array).
575
+ - [@kddeisz] - Add `eslint` and fix up existing violations.
576
+ - [@AlanFoster] - Add the infra for the `prettier` ruby gem.
577
+ - [@kddeisz] - Add a `rake` task for easier process integration for the ruby gem.
578
+ - [@kddeisz] - Handle direct interpolation of strings with %w array literals (i.e., `["#{foo}"]` should not be transformed into a %w array).
428
579
 
429
580
  ### Changed
430
581
 
431
- - Fix string escaping for hex digit bit patterns when there's only one character after the "x".
432
- - Don't allow line breaks between brace block params. (Thanks to @AlanFoster.)
433
- - [INTERNAL] Switch over the array.rb test case to minitest. (Thanks to @johnschoeman.)
434
- - [INTERNAL] Test improvements to allow running in parallel. (Thanks to @AlanFoster.)
435
- - [INTERNAL] Switch over assign.rb test case to minitest. (Thanks to @johnschoeman.)
436
- - [INTERNAL] Add a contributing guide. (Thanks to @AlanFoster.)
437
- - Handle longer command nodes. (Thanks to @AlanFoster.)
438
- - Changed the ruby executable within the `prettier` gem to `rbprettier` for easier autocomplete.
582
+ - [@kddeisz] - Fix string escaping for hex digit bit patterns when there's only one character after the "x".
583
+ - [@AlanFoster] - Don't allow line breaks between brace block params.
584
+ - [@johnschoeman] - Switch over the array.rb test case to minitest.
585
+ - [@AlanFoster] - Test improvements to allow running in parallel.
586
+ - [@johnschoeman] - Switch over assign.rb test case to minitest.
587
+ - [@AlanFoster] - Add a contributing guide.
588
+ - [@AlanFoster] - Handle longer command nodes.
589
+ - [@kddeisz] - Changed the ruby executable within the `prettier` gem to `rbprettier` for easier autocomplete.
439
590
 
440
591
  ### Removed
441
592
 
442
- - All instances of the spread (`...`) operator so that we can support older versions of node.
593
+ - [@kddeisz] - All instances of the spread (`...`) operator so that we can support older versions of node.
443
594
 
444
595
  ## [0.7.0] - 2019-02-24
445
596
 
446
597
  ### Changed
447
598
 
448
- - Support checking for escaping within strings to force double quotes (e.g., "\n").
449
- - Handle cases with empty class and module declarations that need to break. (Thanks to @RossKinsella for the report.)
450
- - [INTERNAL] Align the `bin/print` and `bin/sexp` API to support `bin/print` taking a filepath. (Thanks to @AlanFoster.)
451
- - Support lambdas that don't break and are inline. (Thanks to @AndrewRayCode for the report.)
452
- - [INTERNAL] Switch over the numbers.rb test to minitest. (Thanks to @AlanFoster.)
453
- - [INTERNAL] Switch over the kwargs.rb test to minitest. (Thanks to @AlanFoster.)
454
- - [INTERNAL] Bail out early if the Ruby input is invalid. (Thanks to @AlanFoster.)
455
- - Support `__END__` content.
456
- - Fix up issue with whitespace being added within regexp that are multiline. (Thanks to @AlanFoster.)
457
- - Better support for destructuring within multi assignment. (Thanks to @AlanFoster.)
458
- - [INTERNAL] Switch `next` test over to minitest.
459
- - Handle multiple arguments to `next` with a space between.
460
- - Handle multi-line conditional predicate (should align with keyword). (Thanks to @AndrewRayCode for the report.)
461
- - Properly support adding trailing commas with and without blocks. (Thanks to @aaronjensen for the report.)
462
- - Fix regression of handling comments within arrays on array literals. (Thanks to @AlanFoster for the report.)
463
- - Support multiple arguments to `undef`. (Thanks to @AlanFoster.)
599
+ - [@kddeisz] - Support checking for escaping within strings to force double quotes (e.g., "\n").
600
+ - [@RossKinsella], [@kddeisz] - Handle cases with empty class and module declarations that need to break.
601
+ - [@AlanFoster] - Align the `bin/print` and `bin/sexp` APto support `bin/print` taking a filepath.
602
+ - [@AndrewRayCode], [@kddeisz] - Support lambdas that don't break and are inline.
603
+ - [@AlanFoster] - Switch over the numbers.rb test to minitest.
604
+ - [@AlanFoster] - Switch over the kwargs.rb test to minitest.
605
+ - [@AlanFoster] - Bail out early if the Ruby input is invalid.
606
+ - [@kddeisz] - Support `__END__` content.
607
+ - [@AlanFoster] - Fix up issue with whitespace being added within regexp that are multiline.
608
+ - [@AlanFoster] - Better support for destructuring within multi assignment.
609
+ - [@kddeisz] - Switch `next` test over to minitest.
610
+ - [@kddeisz] - Handle multiple arguments to `next` with a space between.
611
+ - [@AndrewRayCode], [@kddeisz] - Handle multi-line conditional predicate (should align with keyword).
612
+ - [@aaronjensen], [@kddeisz] - Properly support adding trailing commas with and without blocks.
613
+ - [@AlanFoster], [@kddeisz] - Fix regression of handling comments within arrays on array literals.
614
+ - [@AlanFoster] - Support multiple arguments to `undef`.
464
615
 
465
616
  ## [0.6.3] - 2019-02-18
466
617
 
467
618
  ### Changed
468
619
 
469
- - [INTERNAL] Switch over `binary` fixture to minitest.
470
- - [INTERNAL] Reconfigure parser into multiple layer modules so that it's easier to understand and manage.
471
- - Handle comments from within `begin`, `rescue`, `ensure`, `while`, and `until` nodes.
472
- - Properly indent heredocs without taking into account current indentation level.
620
+ - [@kddeisz] - Switch over `binary` fixture to minitest.
621
+ - [@kddeisz] - Reconfigure parser into multiple layer modules so that it's easier to understand and manage.
622
+ - [@kddeisz] - Handle comments from within `begin`, `rescue`, `ensure`, `while`, and `until` nodes.
623
+ - [@kddeisz] - Properly indent heredocs without taking into account current indentation level.
473
624
 
474
625
  ## [0.6.2] - 2019-02-17
475
626
 
476
627
  ### Changed
477
628
 
478
- - Handle regexp suffixes. (Thanks to @AlanFoster.)
479
- - [INTERNAL] Add support for testing the test fixtures with minitest.
480
- - [INTERNAL] Switch over `alias` and `regexp` tests to minitest.
481
- - Break up method args to split into multiple lines. (Thanks to @aaronjensen for the report.)
482
- - Handle blocks args when trailing commas are on. (Thanks to @christoomey for the report.)
629
+ - [@AlanFoster] - Handle regexp suffixes.
630
+ - [@kddeisz] - Add support for testing the test fixtures with minitest.
631
+ - [@kddeisz] - Switch over `alias` and `regexp` tests to minitest.
632
+ - [@aaronjensen], [@kddeisz] - Break up method args to split into multiple lines.
633
+ - [@christoomey], [@kddeisz] - Handle blocks args when trailing commas are on.
483
634
 
484
635
  ## [0.6.1] - 2019-02-15
485
636
 
486
637
  ### Changed
487
638
 
488
- - Fix Ruby 2.5 inline comments on `args_add_block` nodes. (Thanks to @meleyal for the report.)
489
- - Support passing `super()` explicitly with no arguments. (Thanks to @meleyal for the report.)
639
+ - [@meleyal], [@kddeisz] - Fix Ruby 2.5 inline comments on `args_add_block` nodes.
640
+ - [@meleyal], [@kddeisz] - Support passing `super()` explicitly with no arguments.
490
641
 
491
642
  ## [0.6.0] - 2019-02-14
492
643
 
493
644
  ### Added
494
645
 
495
- - Handle non UTF-8 comments.
496
- - Handle non UTF-8 identifiers.
497
- - Handle non UTF-8 strings.
498
- - Handle empty parens.
499
- - Handle rescue with splats preceeding the exception names.
646
+ - [@kddeisz] - Handle non UTF-8 comments.
647
+ - [@kddeisz] - Handle non UTF-8 identifiers.
648
+ - [@kddeisz] - Handle non UTF-8 strings.
649
+ - [@kddeisz] - Handle empty parens.
650
+ - [@kddeisz] - Handle rescue with splats preceeding the exception names.
500
651
 
501
652
  ### Changed
502
653
 
503
- - Use `JSON::fast_generate` to get the s-expressions back from the parser.
504
- - Handle broken lambdas from within `command` and `command_call` nodes. (Thanks to @NoahTheDuke for the report.)
654
+ - [@kddeisz] - Use `JSON::fast_generate` to get the s-expressions back from the parser.
655
+ - [@NoahTheDuke], [@kddeisz] - Handle broken lambdas from within `command` and `command_call` nodes.
505
656
 
506
657
  ## [0.5.2] - 2019-02-13
507
658
 
508
659
  ### Changed
509
660
 
510
- - Support embedded expressions within strings that contain only keywords, as in `"#{super}"`.
661
+ - [@kddeisz] - Support embedded expressions within strings that contain only keywords, as in `"#{super}"`.
511
662
 
512
663
  ## [0.5.1] - 2019-02-13
513
664
 
514
665
  ### Changed
515
666
 
516
- - Force `do` blocks that we know have to be `do` blocks to break. (Thanks to @yuki24 for the report.)
517
- - Handle `command` and `command_call` nodes `do` blocks by forcing them to break. (Thanks to @kmcq for the report.)
518
- - Attach comments to full hash association nodes, not just the value. (Thanks to @ashfurrow for the report.)
667
+ - [@yuki24], [@kddeisz] - Force `do` blocks that we know have to be `do` blocks to break.
668
+ - [@kmcq], [@kddeisz] - Handle `command` and `command_call` nodes `do` blocks by forcing them to break.
669
+ - [@ashfurrow], [@kddeisz] - Attach comments to full hash association nodes, not just the value.
519
670
 
520
671
  ## [0.5.0] - 2019-02-13
521
672
 
522
673
  ### Added
523
674
 
524
- - Automatically convert arrays of all string literals to %w arrays.
525
- - Automatically convert arrays of all symbol literals to %i arrays.
675
+ - [@kddeisz] - Automatically convert arrays of all string literals to %w arrays.
676
+ - [@kddeisz] - Automatically convert arrays of all symbol literals to %i arrays.
526
677
 
527
678
  ### Changed
528
679
 
529
- - [INTERNAL] Move the `args_add` and `args_new` handling into the parser.
530
- - Change `command_call` nodes to properly indent when broken and to not add a trailing comma. (Thanks to @uri for the report.)
531
- - Rename the `trailingComma` option to `addTrailingCommas` to not conflict with the JS option.
680
+ - [@kddeisz] - Move the `args_add` and `args_new` handling into the parser.
681
+ - [@uri], [@kddeisz] - Change `command_call` nodes to properly indent when broken and to not add a trailing comma.
682
+ - [@kddeisz] - Rename the `trailingComma` option to `addTrailingCommas` to not conflict with the JS option.
532
683
 
533
684
  ## [0.4.1] - 2019-02-12
534
685
 
535
686
  ### Changed
536
687
 
537
- - [INTERNAL] Provide the `makeList` utility for the nodes that are lists from within ripper.
538
- - Again, this time for real, properly escape strings. (Thanks to @awinograd for the report.)
539
- - Fix up trailing commas on command calls.
688
+ - [@kddeisz] - Provide the `makeList` utility for the nodes that are lists from within ripper.
689
+ - [@awinograd], [@kddeisz] - Again, this time for real, properly escape strings.
690
+ - [@kddeisz] - Fix up trailing commas on command calls.
540
691
 
541
692
  ## [0.4.0] - 2019-02-12
542
693
 
543
694
  ### Added
544
695
 
545
- - Support the `trailingComma` configuration option (defaults to `false`). (Thanks to @Overload119 for the request.)
696
+ - [@Overload119], [@kddeisz] - Support the `trailingComma` configuration option (defaults to `false`).
546
697
 
547
698
  ### Changed
548
699
 
549
- - Pass the code to be formatted over `stdin`. (Thanks to @NoahTheDuke for the report.)
700
+ - [@NoahTheDuke], [@kddeisz] - Pass the code to be formatted over `stdin`.
550
701
 
551
702
  ## [0.3.7] - 2019-02-11
552
703
 
553
704
  ### Changed
554
705
 
555
- - Split up statements even if they started on the same line with `;`s unless they are within an embedded expression.
556
- - Properly handle escaped quotes within strings.
706
+ - [@kddeisz] - Split up statements even if they started on the same line with `;`s unless they are within an embedded expression.
707
+ - [@kddeisz] - Properly handle escaped quotes within strings.
557
708
 
558
709
  ## [0.3.6] - 2019-02-10
559
710
 
560
711
  ### Changed
561
712
 
562
- - Support the `not` operator properly. (Thanks to @AlanFoster for the report.)
563
- - Handle comments properly inside `if`, `unless`, and `when` nodes. (Thanks to @AlanFoster for the report.)
713
+ - [@AlanFoster], [@kddeisz] - Support the `not` operator properly.
714
+ - [@AlanFoster], [@kddeisz] - Handle comments properly inside `if`, `unless`, and `when` nodes.
564
715
 
565
716
  ## [0.3.5] - 2019-02-09
566
717
 
567
718
  ### Changed
568
719
 
569
- - Handle lonely operators in Ruby `2.5`.
720
+ - [@kddeisz] - Handle lonely operators in Ruby `2.5`.
570
721
 
571
722
  ## [0.3.4] - 2019-02-09
572
723
 
573
724
  ### Changed
574
725
 
575
- - Comments are now properly attached inside `defs` nodes.
576
- - Support multiple inline comments on nodes.
577
- - Support inline comments from within the `EXPR_END|EXPR_LABEL` lexer state.
578
- - Stop transforming multistatement blocks with `to_proc`. (Thanks to @cbothner.)
579
- - `do` blocks necessarily need to break their parent nodes.
580
- - Handle `next` node edge case with `args_add` as the body. (Thanks to @eins78 for the report.)
726
+ - [@kddeisz] - Comments are now properly attached inside `defs` nodes.
727
+ - [@kddeisz] - Support multiple inline comments on nodes.
728
+ - [@kddeisz] - Support inline comments from within the `EXPR_END|EXPR_LABEL` lexer state.
729
+ - [@cbothner] - Stop transforming multistatement blocks with `to_proc`.
730
+ - [@kddeisz] - `do` blocks necessarily need to break their parent nodes.
731
+ - [@eins78], [@kddeisz] - Handle `next` node edge case with `args_add` as the body.
581
732
 
582
733
  ## [0.3.3] - 2019-02-09
583
734
 
584
735
  ### Changed
585
736
 
586
- - Command nodes within conditionals now break parents to disallow them from being turned into ternary expressions. (Thanks to @bugthing for the report.)
587
- - Properly escape double quotes when using `preferSingleQuotes: false`. (Thanks to @awinograd for the report.)
737
+ - [@bugthing], [@kddeisz] - Command nodes within conditionals now break parents to disallow them from being turned into ternary expressions.
738
+ - [@awinograd], [@kddeisz] - Properly escape double quotes when using `preferSingleQuotes: false`.
588
739
 
589
740
  ## [0.3.2] - 2019-02-09
590
741
 
591
742
  ### Changed
592
743
 
593
- - [INTERNAL] Don't define duplicated methods in the parser.
594
- - Let prettier know about `.rb` and `.rake` files so you don't have to specify the parser when running.
595
- - Renamed the package to @prettier/plugin-ruby.
744
+ - [@kddeisz] - Don't define duplicated methods in the parser.
745
+ - [@kddeisz] - Let prettier know about `.rb` and `.rake` files so you don't have to specify the parser when running.
746
+ - [@kddeisz] - Renamed the package to @prettier/plugin-ruby.
596
747
 
597
748
  ## [0.3.1] - 2019-02-07
598
749
 
599
750
  ### Changed
600
751
 
601
- - Automatically add parens to method declarations.
602
- - Handle comments on bare hash assocs.
603
- - Handle `method_add_block` nodes where the statements may be nested one more level.
604
- - Handle heredocs nested no matter how many levels deep.
752
+ - [@kddeisz] - Automatically add parens to method declarations.
753
+ - [@kddeisz] - Handle comments on bare hash assocs.
754
+ - [@kddeisz] - Handle `method_add_block` nodes where the statements may be nested one more level.
755
+ - [@kddeisz] - Handle heredocs nested no matter how many levels deep.
605
756
 
606
757
  ## [0.3.0] - 2019-02-07
607
758
 
608
759
  ### Added
609
760
 
610
- - Support squiggly heredocs.
611
- - Support straight heredocs.
761
+ - [@kddeisz] - Support squiggly heredocs.
762
+ - [@kddeisz] - Support straight heredocs.
612
763
 
613
764
  ### Changed
614
765
 
615
- - Ignore current indentation when creating embdocs so that `=begin` is always at the beginning of the line.
616
- - [INTERNAL] Move `regexp_add` and `regexp_new` handling into the parser.
617
- - [INTERNAL] Move `xstring_add` and `xstring_new` handling into the parser.
618
- - [INTERNAL] Move `string_add` and `string_content` handling into the parser.
619
- - [INTERNAL] Move `mrhs_add` and `mrhs_new` handling into the parser.
620
- - [INTERNAL] Move `mlhs_add` and `mlhs_new` handling into the parser.
766
+ - [@kddeisz] - Ignore current indentation when creating embdocs so that `=begin` is always at the beginning of the line.
767
+ - [@kddeisz] - Move `regexp_add` and `regexp_new` handling into the parser.
768
+ - [@kddeisz] - Move `xstring_add` and `xstring_new` handling into the parser.
769
+ - [@kddeisz] - Move `string_add` and `string_content` handling into the parser.
770
+ - [@kddeisz] - Move `mrhs_add` and `mrhs_new` handling into the parser.
771
+ - [@kddeisz] - Move `mlhs_add` and `mlhs_new` handling into the parser.
621
772
 
622
773
  ## [0.2.1] - 2019-02-06
623
774
 
624
775
  ### Changed
625
776
 
626
- - Handle brace blocks on commands properly.
627
- - Break parent and return `do` blocks when called from a `command` node.
628
- - Handle edge cases with `if` statements where there is no body of the if (so it can't be converted to a ternary).
777
+ - [@kddeisz] - Handle brace blocks on commands properly.
778
+ - [@kddeisz] - Break parent and return `do` blocks when called from a `command` node.
779
+ - [@kddeisz] - Handle edge cases with `if` statements where there is no body of the if (so it can't be converted to a ternary).
629
780
 
630
781
  ## [0.2.0] - 2019-02-06
631
782
 
632
783
  ### Added
633
784
 
634
- - Handle `methref` nodes from Ruby `2.7`.
635
- - Allow `module` nodes to shorten using `;` when the block is empty.
785
+ - [@kddeisz] - Handle `methref` nodes from Ruby `2.7`.
786
+ - [@kddeisz] - Allow `module` nodes to shorten using `;` when the block is empty.
636
787
 
637
788
  ### Changed
638
789
 
639
- - Handle splat within an array, as in `[1, 2, *foo]`.
640
- - Disallow comments from being attached to intermediary regex nodes.
641
- - Fix `to_proc` transforms to reference the method called as opposed to the parameter name.
642
- - [INTERNAL] Change statement lists to be generated within the parser instead of the printer, thereby allowing finer control over comments.
643
- - [INTERNAL] 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.
644
- - Allow comments to be attached to `CHAR` nodes.
645
- - [INTERNAL] Disallow comments from being attached to `args_new` nodes.
646
- - [INTERNAL] Track start and end lines so we can better insert block comments.
647
- - [INTERNAL] Handle intermediary array nodes in the parse for better comment handling.
790
+ - [@kddeisz] - Handle splat within an array, as in `[1, 2, *foo]`.
791
+ - [@kddeisz] - Disallow comments from being attached to intermediary regex nodes.
792
+ - [@kddeisz] - Fix `to_proc` transforms to reference the method called as opposed to the parameter name.
793
+ - [@kddeisz] - Change statement lists to be generated within the parser instead of the printer, thereby allowing finer control over comments.
794
+ - [@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.
795
+ - [@kddeisz] - Allow comments to be attached to `CHAR` nodes.
796
+ - [@kddeisz] - Disallow comments from being attached to `args_new` nodes.
797
+ - [@kddeisz] - Track start and end lines so we can better insert block comments.
798
+ - [@kddeisz] - Handle intermediary array nodes in the parse for better comment handling.
648
799
 
649
800
  ## [0.1.2] - 2019-02-05
650
801
 
651
802
  ### Changed
652
803
 
653
- - Handle guard clauses that return with no parens.
804
+ - [@kddeisz] - Handle guard clauses that return with no parens.
654
805
 
655
806
  ## [0.1.1] - 2019-02-05
656
807
 
657
808
  ### Changed
658
809
 
659
- - Handle class method calls with the `::` operator.
660
- - Handle strings with apostrophes when using `preferSingleQuote`.
661
- - [INTERAL] Have travis run multiple ruby versions.
662
- - Explicitly fail if ruby version is < `2.5`.
663
- - Disallow comments from being attached to intermediary string nodes.
810
+ - [@kddeisz] - Handle class method calls with the `::` operator.
811
+ - [@kddeisz] - Handle strings with apostrophes when using `preferSingleQuote`.
812
+ - [@kddeisz] - Have travis run multiple ruby versions.
813
+ - [@kddeisz] - Explicitly fail if ruby version is < `2.5`.
814
+ - [@kddeisz] - Disallow comments from being attached to intermediary string nodes.
664
815
 
665
816
  ## [0.1.0] - 2019-02-04
666
817
 
@@ -668,7 +819,12 @@ would previously result in `array[]`, but now prints properly. (Thanks to @xipgr
668
819
 
669
820
  - Initial release 🎉
670
821
 
671
- [unreleased]: https://github.com/prettier/plugin-ruby/compare/v0.17.0...HEAD
822
+ [unreleased]: https://github.com/prettier/plugin-ruby/compare/v0.19.1...HEAD
823
+ [0.19.1]: https://github.com/prettier/plugin-ruby/compare/v0.19.0...v0.19.1
824
+ [0.19.0]: https://github.com/prettier/plugin-ruby/compare/v0.18.2...v0.19.0
825
+ [0.18.2]: https://github.com/prettier/plugin-ruby/compare/v0.18.1...v0.18.2
826
+ [0.18.1]: https://github.com/prettier/plugin-ruby/compare/v0.18.0...v0.18.1
827
+ [0.18.0]: https://github.com/prettier/plugin-ruby/compare/v0.17.0...v0.18.0
672
828
  [0.17.0]: https://github.com/prettier/plugin-ruby/compare/v0.16.0...v0.17.0
673
829
  [0.16.0]: https://github.com/prettier/plugin-ruby/compare/v0.15.1...v0.16.0
674
830
  [0.15.1]: https://github.com/prettier/plugin-ruby/compare/v0.15.0...v0.15.1
@@ -707,3 +863,56 @@ would previously result in `array[]`, but now prints properly. (Thanks to @xipgr
707
863
  [0.1.2]: https://github.com/prettier/plugin-ruby/compare/v0.1.1...v0.1.2
708
864
  [0.1.1]: https://github.com/prettier/plugin-ruby/compare/v0.1.0...v0.1.1
709
865
  [0.1.0]: https://github.com/prettier/plugin-ruby/compare/61f675...v0.1.0
866
+ [@aaronjensen]: https://github.com/aaronjensen
867
+ [@acrewdson]: https://github.com/acrewdson
868
+ [@alanfoster]: https://github.com/AlanFoster
869
+ [@alse]: https://github.com/alse
870
+ [@andrewraycode]: https://github.com/AndrewRayCode
871
+ [@ashfurrow]: https://github.com/ashfurrow
872
+ [@awinograd]: https://github.com/awinograd
873
+ [@bugthing]: https://github.com/bugthing
874
+ [@cbothner]: https://github.com/cbothner
875
+ [@christoomey]: https://github.com/christoomey
876
+ [@cldevs]: https://github.com/cldevs
877
+ [@codingitwrong]: https://github.com/CodingItWrong
878
+ [@deecewan]: https://github.com/deecewan
879
+ [@dudeofawesome]: https://github.com/dudeofawesome
880
+ [@eins78]: https://github.com/eins78
881
+ [@ftes]: https://github.com/ftes
882
+ [@flyerhzm]: https://github.com/flyerhzm
883
+ [@fruetel]: https://github.com/Fruetel
884
+ [@gin0606]: https://github.com/gin0606
885
+ [@github0013]: https://github.com/github0013
886
+ [@glejeune]: https://github.com/glejeune
887
+ [@hafley66]: https://github.com/hafley66
888
+ [@ianks]: https://github.com/ianks
889
+ [@jakeprime]: https://github.com/jakeprime
890
+ [@jamescostian]: https://github.com/jamescostian
891
+ [@janklimo]: https://github.com/janklimo
892
+ [@joeyjoejoejr]: https://github.com/joeyjoejoejr
893
+ [@johnschoeman]: https://github.com/johnschoeman
894
+ [@joshuakgoldberg]: https://github.com/JoshuaKGoldberg
895
+ [@jpickwell]: https://github.com/jpickwell
896
+ [@jrdioko]: https://github.com/jrdioko
897
+ [@jviney]: https://github.com/jviney
898
+ [@kddeisz]: https://github.com/kddeisz
899
+ [@kmcq]: https://github.com/kmcq
900
+ [@krachtstefan]: https://github.com/krachtstefan
901
+ [@localhostdotdev]: https://github.com/localhostdotdev
902
+ [@marcmaniez]: https://github.com/MarcManiez
903
+ [@masqita]: https://github.com/masqita
904
+ [@matt-wratt]: https://github.com/matt-wratt
905
+ [@meleyal]: https://github.com/meleyal
906
+ [@mmainz]: https://github.com/mmainz
907
+ [@noahtheduke]: https://github.com/NoahTheDuke
908
+ [@overload119]: https://github.com/Overload119
909
+ [@petevk]: https://github.com/petevk
910
+ [@pje]: https://github.com/pje
911
+ [@rosskinsella]: https://github.com/RossKinsella
912
+ [@shaydavidson]: https://github.com/ShayDavidson
913
+ [@tobyndockerill]: https://github.com/tobyndockerill
914
+ [@uri]: https://github.com/uri
915
+ [@xipgroc]: https://github.com/xipgroc
916
+ [@yuki24]: https://github.com/yuki24
917
+ [@rsullivan00]: https://github.com/Rsullivan00
918
+ [@steobrien]: https://github.com/steobrien