prettier 1.6.1 → 2.0.0.pre.rc1

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