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