prettier 0.20.1 → 0.21.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +18 -1
- data/CONTRIBUTING.md +5 -3
- data/README.md +51 -48
- data/node_modules/prettier/bin-prettier.js +181 -148
- data/node_modules/prettier/index.js +10335 -7465
- data/node_modules/prettier/third-party.js +33 -140
- data/package.json +1 -1
- data/src/nodes.js +1 -0
- data/src/nodes/alias.js +67 -24
- data/src/nodes/aref.js +55 -0
- data/src/nodes/arrays.js +6 -38
- data/src/nodes/calls.js +4 -19
- data/src/nodes/conditionals.js +12 -24
- data/src/nodes/flow.js +36 -18
- data/src/nodes/hashes.js +45 -45
- data/src/nodes/hooks.js +36 -6
- data/src/nodes/lambdas.js +75 -45
- data/src/nodes/loops.js +9 -24
- data/src/nodes/strings.js +0 -6
- data/src/parse.js +1 -1
- data/src/{ripper.rb → parser.rb} +27 -50
- data/src/ruby.js +1 -1
- data/src/utils.js +21 -19
- data/src/utils/inlineEnsureParens.js +42 -0
- data/src/utils/isEmptyStmts.js +7 -0
- metadata +6 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 628031f901d9500c43e16890affeb303afcd9fc6241a5adde35ea59e2e8848da
|
4
|
+
data.tar.gz: 3e138dd11805ad5de42ebcd3d25541b1b897f183492fd488e91ca906ba51d784
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7b92c23628247bc53f6ebe5b39f4b7b961a38c0bccc2eb6ec701b52f8be8df7d507ec6dab28b3f48b0600cdafbc9ab51fcf52001c726535f191dab67a1d301aa
|
7
|
+
data.tar.gz: 0335f2171298ebe46ca5c960a252ec49abc315bfc0438bb75a28ff4204c5dda340532c93af936b27d861ab867308f7f149c3b0eebf26cdd8d3475ba133e52854
|
data/CHANGELOG.md
CHANGED
@@ -6,6 +6,20 @@ 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.21.0] - 2020-12-02
|
10
|
+
|
11
|
+
### Changed
|
12
|
+
|
13
|
+
- [@kddeisz], [@ryan-hunter-pc] - Explicitly handle `break` and `next` keyword parentheses.
|
14
|
+
- [@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.
|
15
|
+
- [@kddeisz] - Turn off the `Symbol#to_proc` transform by default.
|
16
|
+
- [@janklimo], [@kddeisz] - Properly handle trailing commas on hash arguments.
|
17
|
+
- [@coiti], [@kddeisz] - Properly handle parentheses when necessary on if/unless statements and while/until loops.
|
18
|
+
- [@Rsullivan00] - Prevent `command` and `command_call` nodes from being turned into ternaries.
|
19
|
+
- [@kddeisz] - Better handling of the `alias` node with and without comments.
|
20
|
+
- [@kddeisz] - Better handling of the `BEGIN` and `END` nodes with and without comments.
|
21
|
+
- [@kddeisz] - Much better handling of heredocs where now there is a consistent `heredoc` node instead of multiple.
|
22
|
+
|
9
23
|
## [0.20.1] - 2020-09-04
|
10
24
|
|
11
25
|
### Changed
|
@@ -848,7 +862,8 @@ would previously result in `array[]`, but now prints properly.
|
|
848
862
|
|
849
863
|
- Initial release 🎉
|
850
864
|
|
851
|
-
[unreleased]: https://github.com/prettier/plugin-ruby/compare/v0.
|
865
|
+
[unreleased]: https://github.com/prettier/plugin-ruby/compare/v0.21.0...HEAD
|
866
|
+
[0.21.0]: https://github.com/prettier/plugin-ruby/compare/v0.20.1...v0.21.0
|
852
867
|
[0.20.1]: https://github.com/prettier/plugin-ruby/compare/v0.20.0...v0.20.1
|
853
868
|
[0.20.0]: https://github.com/prettier/plugin-ruby/compare/v0.19.1...v0.20.0
|
854
869
|
[0.19.1]: https://github.com/prettier/plugin-ruby/compare/v0.19.0...v0.19.1
|
@@ -947,3 +962,5 @@ would previously result in `array[]`, but now prints properly.
|
|
947
962
|
[@yuki24]: https://github.com/yuki24
|
948
963
|
[@rsullivan00]: https://github.com/Rsullivan00
|
949
964
|
[@steobrien]: https://github.com/steobrien
|
965
|
+
[@jbielick]: https://github.com/jbielick
|
966
|
+
[@coiti]: https://github.com/coiti
|
data/CONTRIBUTING.md
CHANGED
@@ -22,9 +22,9 @@ In order to get printed, the code goes through a couple of transformations. The
|
|
22
22
|
|
23
23
|
### Text to AST
|
24
24
|
|
25
|
-
When the prettier process first spins up, it examines which files it's going to print and selects an appropriate plugin for each one. Once selected, it runs that plugin's `parse` function, seen [here](src/parse.js). For the case of the Ruby plugin, that entails spawning a Ruby process that runs [
|
25
|
+
When the prettier process first spins up, it examines which files it's going to print and selects an appropriate plugin for each one. Once selected, it runs that plugin's `parse` function, seen [here](src/parse.js). For the case of the Ruby plugin, that entails spawning a Ruby process that runs [parser.rb](src/parser.rb) with the input code preloaded on stdin.
|
26
26
|
|
27
|
-
`
|
27
|
+
`parser.rb` will read the text off of stdin and then feed it to a new `Ripper` instance, which is a Ruby standard library recursive-descent parser. Briefly, the way that `Ripper` works is by tokenizing the input and then matching those tokens against a grammar to form s-expressions. To extend `Ripper`, you overwrite the methods that control how those s-expressions are formed, e.g., to modify the s-expression that is formed when `Ripper` encounters a string literal, you would override the `#on_string_literal` method. Below is an example for seeing that in action.
|
28
28
|
|
29
29
|
Let's assume you have the following code:
|
30
30
|
|
@@ -34,6 +34,7 @@ Let's assume you have the following code:
|
|
34
34
|
|
35
35
|
First, `Ripper` will tokenize:
|
36
36
|
|
37
|
+
<!-- prettier-ignore -->
|
37
38
|
```ruby
|
38
39
|
require 'ripper'
|
39
40
|
|
@@ -50,6 +51,7 @@ pp Ripper.lex('1 + 1')
|
|
50
51
|
|
51
52
|
You can see it has location metadata (row and column), the token type, the value associated with that token type, and the lexer state when that token was encountered. Then, it will convert those tokens into s-expressions:
|
52
53
|
|
54
|
+
<!-- prettier-ignore -->
|
53
55
|
```ruby
|
54
56
|
require 'ripper'
|
55
57
|
|
@@ -65,7 +67,7 @@ pp Ripper.sexp_raw('1 + 1')
|
|
65
67
|
|
66
68
|
As you can see above, the resulting s-expressions will call the following methods in order on the instantiated `Ripper` instance: `on_int`, `on_int`, `on_stmts_new`, `on_binary`, `on_stmts_add`, `on_program`. You can hook into any part of this process by overriding any of those methods (we override all of them).
|
67
69
|
|
68
|
-
Now that the text has been transformed into an AST that we can work with, `
|
70
|
+
Now that the text has been transformed into an AST that we can work with, `parser.rb` will serialize the result to JSON, write it back to stdout, and exit. The `parse` function will then parse that JSON by reading off the child process once it has exited, and return that value back to prettier.
|
69
71
|
|
70
72
|
### AST to Doc
|
71
73
|
|
data/README.md
CHANGED
@@ -132,6 +132,7 @@ Below are the options (from [`src/ruby.js`](src/ruby.js)) that `@prettier/plugin
|
|
132
132
|
| `inlineLoops` | `--inline-loops` | `true` | When it fits on one line, allows while and until statements to use the modifier form. |
|
133
133
|
| `preferHashLabels` | `--prefer-hash-labels` | `true` | When possible, uses the shortened hash key syntax, as opposed to hash rockets. |
|
134
134
|
| `preferSingleQuotes` | `--prefer-single-quotes` | `true` | When double quotes are not necessary for interpolation, prefers the use of single quotes for string literals. |
|
135
|
+
| `toProcTransform` | `--to-proc-transform` | `false` | When possible, convert blocks to the more concise `Symbol#to_proc` syntax. |
|
135
136
|
|
136
137
|
Any of these can be added to your existing [prettier configuration
|
137
138
|
file](https://prettier.io/docs/en/configuration.html). For example:
|
@@ -161,69 +162,71 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
|
|
161
162
|
<!-- markdownlint-disable -->
|
162
163
|
<table>
|
163
164
|
<tr>
|
164
|
-
<td align="center"><a href="https://kevindeisz.com"><img src="https://avatars2.githubusercontent.com/u/5093358?v=4" width="100px;" alt=""/><br /><sub><b>Kevin Deisz</b></sub></a><br /><a href="https://github.com/prettier/plugin-ruby/commits?author=kddeisz" title="Code">💻</a> <a href="https://github.com/prettier/plugin-ruby/commits?author=kddeisz" title="Documentation">📖</a> <a href="https://github.com/prettier/plugin-ruby/commits?author=kddeisz" title="Tests">⚠️</a> <a href="https://github.com/prettier/plugin-ruby/issues?q=author%3Akddeisz" title="Bug reports">🐛</a></td>
|
165
|
-
<td align="center"><a href="https://www.alanfoster.me/"><img src="https://avatars2.githubusercontent.com/u/1271782?v=4" width="100px;" alt=""/><br /><sub><b>Alan Foster</b></sub></a><br /><a href="https://github.com/prettier/plugin-ruby/commits?author=AlanFoster" title="Code">💻</a> <a href="https://github.com/prettier/plugin-ruby/commits?author=AlanFoster" title="Documentation">📖</a> <a href="https://github.com/prettier/plugin-ruby/commits?author=AlanFoster" title="Tests">⚠️</a> <a href="https://github.com/prettier/plugin-ruby/issues?q=author%3AAlanFoster" title="Bug reports">🐛</a></td>
|
166
|
-
<td align="center"><a href="https://github.com/johnschoeman"><img src="https://avatars0.githubusercontent.com/u/16049495?v=4" width="100px;" alt=""/><br /><sub><b>johnschoeman</b></sub></a><br /><a href="https://github.com/prettier/plugin-ruby/commits?author=johnschoeman" title="Tests">⚠️</a></td>
|
167
|
-
<td align="center"><a href="https://twitter.com/aaronjensen"><img src="https://avatars3.githubusercontent.com/u/8588?v=4" width="100px;" alt=""/><br /><sub><b>Aaron Jensen</b></sub></a><br /><a href="https://github.com/prettier/plugin-ruby/commits?author=aaronjensen" title="Documentation">📖</a></td>
|
168
|
-
<td align="center"><a href="http://cameronbothner.com"><img src="https://avatars1.githubusercontent.com/u/4642599?v=4" width="100px;" alt=""/><br /><sub><b>Cameron Bothner</b></sub></a><br /><a href="https://github.com/prettier/plugin-ruby/commits?author=cbothner" title="Code">💻</a></td>
|
169
|
-
<td align="center"><a href="https://localhost.dev"><img src="https://avatars3.githubusercontent.com/u/47308085?v=4" width="100px;" alt=""/><br /><sub><b>localhost.dev</b></sub></a><br /><a href="https://github.com/prettier/plugin-ruby/issues?q=author%3Alocalhostdotdev" title="Bug reports">🐛</a> <a href="https://github.com/prettier/plugin-ruby/commits?author=localhostdotdev" title="Code">💻</a></td>
|
170
|
-
<td align="center"><a href="https://deecewan.github.io"><img src="https://avatars0.githubusercontent.com/u/4755785?v=4" width="100px;" alt=""/><br /><sub><b>David Buchan-Swanson</b></sub></a><br /><a href="https://github.com/prettier/plugin-ruby/issues?q=author%3Adeecewan" title="Bug reports">🐛</a> <a href="https://github.com/prettier/plugin-ruby/commits?author=deecewan" title="Code">💻</a></td>
|
165
|
+
<td align="center"><a href="https://kevindeisz.com"><img src="https://avatars2.githubusercontent.com/u/5093358?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Kevin Deisz</b></sub></a><br /><a href="https://github.com/prettier/plugin-ruby/commits?author=kddeisz" title="Code">💻</a> <a href="https://github.com/prettier/plugin-ruby/commits?author=kddeisz" title="Documentation">📖</a> <a href="https://github.com/prettier/plugin-ruby/commits?author=kddeisz" title="Tests">⚠️</a> <a href="https://github.com/prettier/plugin-ruby/issues?q=author%3Akddeisz" title="Bug reports">🐛</a></td>
|
166
|
+
<td align="center"><a href="https://www.alanfoster.me/"><img src="https://avatars2.githubusercontent.com/u/1271782?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Alan Foster</b></sub></a><br /><a href="https://github.com/prettier/plugin-ruby/commits?author=AlanFoster" title="Code">💻</a> <a href="https://github.com/prettier/plugin-ruby/commits?author=AlanFoster" title="Documentation">📖</a> <a href="https://github.com/prettier/plugin-ruby/commits?author=AlanFoster" title="Tests">⚠️</a> <a href="https://github.com/prettier/plugin-ruby/issues?q=author%3AAlanFoster" title="Bug reports">🐛</a></td>
|
167
|
+
<td align="center"><a href="https://github.com/johnschoeman"><img src="https://avatars0.githubusercontent.com/u/16049495?v=4?s=100" width="100px;" alt=""/><br /><sub><b>johnschoeman</b></sub></a><br /><a href="https://github.com/prettier/plugin-ruby/commits?author=johnschoeman" title="Tests">⚠️</a></td>
|
168
|
+
<td align="center"><a href="https://twitter.com/aaronjensen"><img src="https://avatars3.githubusercontent.com/u/8588?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Aaron Jensen</b></sub></a><br /><a href="https://github.com/prettier/plugin-ruby/commits?author=aaronjensen" title="Documentation">📖</a></td>
|
169
|
+
<td align="center"><a href="http://cameronbothner.com"><img src="https://avatars1.githubusercontent.com/u/4642599?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Cameron Bothner</b></sub></a><br /><a href="https://github.com/prettier/plugin-ruby/commits?author=cbothner" title="Code">💻</a></td>
|
170
|
+
<td align="center"><a href="https://localhost.dev"><img src="https://avatars3.githubusercontent.com/u/47308085?v=4?s=100" width="100px;" alt=""/><br /><sub><b>localhost.dev</b></sub></a><br /><a href="https://github.com/prettier/plugin-ruby/issues?q=author%3Alocalhostdotdev" title="Bug reports">🐛</a> <a href="https://github.com/prettier/plugin-ruby/commits?author=localhostdotdev" title="Code">💻</a></td>
|
171
|
+
<td align="center"><a href="https://deecewan.github.io"><img src="https://avatars0.githubusercontent.com/u/4755785?v=4?s=100" width="100px;" alt=""/><br /><sub><b>David Buchan-Swanson</b></sub></a><br /><a href="https://github.com/prettier/plugin-ruby/issues?q=author%3Adeecewan" title="Bug reports">🐛</a> <a href="https://github.com/prettier/plugin-ruby/commits?author=deecewan" title="Code">💻</a></td>
|
171
172
|
</tr>
|
172
173
|
<tr>
|
173
|
-
<td align="center"><a href="https://github.com/jpickwell"><img src="https://avatars1.githubusercontent.com/u/4682321?v=4" width="100px;" alt=""/><br /><sub><b>Jordan Pickwell</b></sub></a><br /><a href="https://github.com/prettier/plugin-ruby/issues?q=author%3Ajpickwell" title="Bug reports">🐛</a></td>
|
174
|
-
<td align="center"><a href="http://codingitwrong.com"><img src="https://avatars0.githubusercontent.com/u/15832198?v=4" width="100px;" alt=""/><br /><sub><b>Josh Justice</b></sub></a><br /><a href="https://github.com/prettier/plugin-ruby/issues?q=author%3ACodingItWrong" title="Bug reports">🐛</a></td>
|
175
|
-
<td align="center"><a href="https://github.com/xipgroc"><img src="https://avatars0.githubusercontent.com/u/28561131?v=4" width="100px;" alt=""/><br /><sub><b>xipgroc</b></sub></a><br /><a href="https://github.com/prettier/plugin-ruby/issues?q=author%3Axipgroc" title="Bug reports">🐛</a></td>
|
176
|
-
<td align="center"><a href="http://lejeun.es"><img src="https://avatars1.githubusercontent.com/u/15168?v=4" width="100px;" alt=""/><br /><sub><b>Gregoire Lejeune</b></sub></a><br /><a href="https://github.com/prettier/plugin-ruby/issues?q=author%3Aglejeune" title="Bug reports">🐛</a></td>
|
177
|
-
<td align="center"><a href="https://github.com/petevk"><img src="https://avatars3.githubusercontent.com/u/5108627?v=4" width="100px;" alt=""/><br /><sub><b>Pete Van Klaveren</b></sub></a><br /><a href="https://github.com/prettier/plugin-ruby/issues?q=author%3Apetevk" title="Bug reports">🐛</a></td>
|
178
|
-
<td align="center"><a href="https://github.com/meleyal"><img src="https://avatars3.githubusercontent.com/u/15045?v=4" width="100px;" alt=""/><br /><sub><b>meleyal</b></sub></a><br /><a href="https://github.com/prettier/plugin-ruby/commits?author=meleyal" title="Documentation">📖</a></td>
|
179
|
-
<td align="center"><a href="https://lip.is"><img src="https://avatars1.githubusercontent.com/u/125676?v=4" width="100px;" alt=""/><br /><sub><b>Lipis</b></sub></a><br /><a href="https://github.com/prettier/plugin-ruby/commits?author=lipis" title="Documentation">📖</a></td>
|
174
|
+
<td align="center"><a href="https://github.com/jpickwell"><img src="https://avatars1.githubusercontent.com/u/4682321?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Jordan Pickwell</b></sub></a><br /><a href="https://github.com/prettier/plugin-ruby/issues?q=author%3Ajpickwell" title="Bug reports">🐛</a></td>
|
175
|
+
<td align="center"><a href="http://codingitwrong.com"><img src="https://avatars0.githubusercontent.com/u/15832198?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Josh Justice</b></sub></a><br /><a href="https://github.com/prettier/plugin-ruby/issues?q=author%3ACodingItWrong" title="Bug reports">🐛</a></td>
|
176
|
+
<td align="center"><a href="https://github.com/xipgroc"><img src="https://avatars0.githubusercontent.com/u/28561131?v=4?s=100" width="100px;" alt=""/><br /><sub><b>xipgroc</b></sub></a><br /><a href="https://github.com/prettier/plugin-ruby/issues?q=author%3Axipgroc" title="Bug reports">🐛</a></td>
|
177
|
+
<td align="center"><a href="http://lejeun.es"><img src="https://avatars1.githubusercontent.com/u/15168?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Gregoire Lejeune</b></sub></a><br /><a href="https://github.com/prettier/plugin-ruby/issues?q=author%3Aglejeune" title="Bug reports">🐛</a></td>
|
178
|
+
<td align="center"><a href="https://github.com/petevk"><img src="https://avatars3.githubusercontent.com/u/5108627?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Pete Van Klaveren</b></sub></a><br /><a href="https://github.com/prettier/plugin-ruby/issues?q=author%3Apetevk" title="Bug reports">🐛</a></td>
|
179
|
+
<td align="center"><a href="https://github.com/meleyal"><img src="https://avatars3.githubusercontent.com/u/15045?v=4?s=100" width="100px;" alt=""/><br /><sub><b>meleyal</b></sub></a><br /><a href="https://github.com/prettier/plugin-ruby/commits?author=meleyal" title="Documentation">📖</a></td>
|
180
|
+
<td align="center"><a href="https://lip.is"><img src="https://avatars1.githubusercontent.com/u/125676?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Lipis</b></sub></a><br /><a href="https://github.com/prettier/plugin-ruby/commits?author=lipis" title="Documentation">📖</a></td>
|
180
181
|
</tr>
|
181
182
|
<tr>
|
182
|
-
<td align="center"><a href="https://janpiotrowski.de"><img src="https://avatars0.githubusercontent.com/u/183673?v=4" width="100px;" alt=""/><br /><sub><b>Jan Piotrowski</b></sub></a><br /><a href="https://github.com/prettier/plugin-ruby/commits?author=janpio" title="Documentation">📖</a></td>
|
183
|
-
<td align="center"><a href="https://www.andywaite.com"><img src="https://avatars1.githubusercontent.com/u/13400?v=4" width="100px;" alt=""/><br /><sub><b>Andy Waite</b></sub></a><br /><a href="https://github.com/prettier/plugin-ruby/commits?author=andyw8" title="Documentation">📖</a></td>
|
184
|
-
<td align="center"><a href="https://github.com/jviney"><img src="https://avatars3.githubusercontent.com/u/7051?v=4" width="100px;" alt=""/><br /><sub><b>Jonathan Viney</b></sub></a><br /><a href="https://github.com/prettier/plugin-ruby/issues?q=author%3Ajviney" title="Bug reports">🐛</a></td>
|
185
|
-
<td align="center"><a href="https://github.com/acrewdson"><img src="https://avatars0.githubusercontent.com/u/10353074?v=4" width="100px;" alt=""/><br /><sub><b>acrewdson</b></sub></a><br /><a href="https://github.com/prettier/plugin-ruby/issues?q=author%3Aacrewdson" title="Bug reports">🐛</a></td>
|
186
|
-
<td align="center"><a href="https://orleans.io"><img src="https://avatars0.githubusercontent.com/u/1683595?v=4" width="100px;" alt=""/><br /><sub><b>Louis Orleans</b></sub></a><br /><a href="https://github.com/prettier/plugin-ruby/issues?q=author%3Adudeofawesome" title="Bug reports">🐛</a></td>
|
187
|
-
<td align="center"><a href="https://github.com/cvoege"><img src="https://avatars2.githubusercontent.com/u/6777709?v=4" width="100px;" alt=""/><br /><sub><b>Colton Voege</b></sub></a><br /><a href="https://github.com/prettier/plugin-ruby/issues?q=author%3Acvoege" title="Bug reports">🐛</a></td>
|
188
|
-
<td align="center"><a href="https://stefankracht.de"><img src="https://avatars1.githubusercontent.com/u/529711?v=4" width="100px;" alt=""/><br /><sub><b>Stefan Kracht</b></sub></a><br /><a href="https://github.com/prettier/plugin-ruby/issues?q=author%3Akrachtstefan" title="Bug reports">🐛</a></td>
|
183
|
+
<td align="center"><a href="https://janpiotrowski.de"><img src="https://avatars0.githubusercontent.com/u/183673?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Jan Piotrowski</b></sub></a><br /><a href="https://github.com/prettier/plugin-ruby/commits?author=janpio" title="Documentation">📖</a></td>
|
184
|
+
<td align="center"><a href="https://www.andywaite.com"><img src="https://avatars1.githubusercontent.com/u/13400?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Andy Waite</b></sub></a><br /><a href="https://github.com/prettier/plugin-ruby/commits?author=andyw8" title="Documentation">📖</a></td>
|
185
|
+
<td align="center"><a href="https://github.com/jviney"><img src="https://avatars3.githubusercontent.com/u/7051?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Jonathan Viney</b></sub></a><br /><a href="https://github.com/prettier/plugin-ruby/issues?q=author%3Ajviney" title="Bug reports">🐛</a></td>
|
186
|
+
<td align="center"><a href="https://github.com/acrewdson"><img src="https://avatars0.githubusercontent.com/u/10353074?v=4?s=100" width="100px;" alt=""/><br /><sub><b>acrewdson</b></sub></a><br /><a href="https://github.com/prettier/plugin-ruby/issues?q=author%3Aacrewdson" title="Bug reports">🐛</a></td>
|
187
|
+
<td align="center"><a href="https://orleans.io"><img src="https://avatars0.githubusercontent.com/u/1683595?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Louis Orleans</b></sub></a><br /><a href="https://github.com/prettier/plugin-ruby/issues?q=author%3Adudeofawesome" title="Bug reports">🐛</a></td>
|
188
|
+
<td align="center"><a href="https://github.com/cvoege"><img src="https://avatars2.githubusercontent.com/u/6777709?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Colton Voege</b></sub></a><br /><a href="https://github.com/prettier/plugin-ruby/issues?q=author%3Acvoege" title="Bug reports">🐛</a></td>
|
189
|
+
<td align="center"><a href="https://stefankracht.de"><img src="https://avatars1.githubusercontent.com/u/529711?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Stefan Kracht</b></sub></a><br /><a href="https://github.com/prettier/plugin-ruby/issues?q=author%3Akrachtstefan" title="Bug reports">🐛</a></td>
|
189
190
|
</tr>
|
190
191
|
<tr>
|
191
|
-
<td align="center"><a href="https://github.com/jakeprime"><img src="https://avatars1.githubusercontent.com/u/1019036?v=4" width="100px;" alt=""/><br /><sub><b>jakeprime</b></sub></a><br /><a href="https://github.com/prettier/plugin-ruby/issues?q=author%3Ajakeprime" title="Bug reports">🐛</a></td>
|
192
|
-
<td align="center"><a href="http://mmainz.github.io"><img src="https://avatars2.githubusercontent.com/u/5417714?v=4" width="100px;" alt=""/><br /><sub><b>Mario Mainz</b></sub></a><br /><a href="https://github.com/prettier/plugin-ruby/issues?q=author%3Ammainz" title="Bug reports">🐛</a></td>
|
193
|
-
<td align="center"><a href="http://www.cldevs.com"><img src="https://avatars3.githubusercontent.com/u/38632061?v=4" width="100px;" alt=""/><br /><sub><b>CL Web Developers</b></sub></a><br /><a href="https://github.com/prettier/plugin-ruby/issues?q=author%3Acldevs" title="Bug reports">🐛</a></td>
|
194
|
-
<td align="center"><a href="https://twitter.com/github0013"><img src="https://avatars0.githubusercontent.com/u/809378?v=4" width="100px;" alt=""/><br /><sub><b>github0013</b></sub></a><br /><a href="https://github.com/prettier/plugin-ruby/issues?q=author%3Agithub0013" title="Bug reports">🐛</a></td>
|
195
|
-
<td align="center"><a href="https://jami.am"><img src="https://avatars1.githubusercontent.com/u/1456118?v=4" width="100px;" alt=""/><br /><sub><b>James Costian</b></sub></a><br /><a href="https://github.com/prettier/plugin-ruby/issues?q=author%3Ajamescostian" title="Bug reports">🐛</a></td>
|
196
|
-
<td align="center"><a href="https://github.com/joeyjoejoejr"><img src="https://avatars0.githubusercontent.com/u/1141502?v=4" width="100px;" alt=""/><br /><sub><b>Joe Jackson</b></sub></a><br /><a href="https://github.com/prettier/plugin-ruby/issues?q=author%3Ajoeyjoejoejr" title="Bug reports">🐛</a></td>
|
197
|
-
<td align="center"><a href="http://178.is"><img src="https://avatars3.githubusercontent.com/u/134942?v=4" width="100px;" alt=""/><br /><sub><b>Max Albrecht</b></sub></a><br /><a href="https://github.com/prettier/plugin-ruby/issues?q=author%3Aeins78" title="Bug reports">🐛</a></td>
|
192
|
+
<td align="center"><a href="https://github.com/jakeprime"><img src="https://avatars1.githubusercontent.com/u/1019036?v=4?s=100" width="100px;" alt=""/><br /><sub><b>jakeprime</b></sub></a><br /><a href="https://github.com/prettier/plugin-ruby/issues?q=author%3Ajakeprime" title="Bug reports">🐛</a></td>
|
193
|
+
<td align="center"><a href="http://mmainz.github.io"><img src="https://avatars2.githubusercontent.com/u/5417714?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Mario Mainz</b></sub></a><br /><a href="https://github.com/prettier/plugin-ruby/issues?q=author%3Ammainz" title="Bug reports">🐛</a></td>
|
194
|
+
<td align="center"><a href="http://www.cldevs.com"><img src="https://avatars3.githubusercontent.com/u/38632061?v=4?s=100" width="100px;" alt=""/><br /><sub><b>CL Web Developers</b></sub></a><br /><a href="https://github.com/prettier/plugin-ruby/issues?q=author%3Acldevs" title="Bug reports">🐛</a></td>
|
195
|
+
<td align="center"><a href="https://twitter.com/github0013"><img src="https://avatars0.githubusercontent.com/u/809378?v=4?s=100" width="100px;" alt=""/><br /><sub><b>github0013</b></sub></a><br /><a href="https://github.com/prettier/plugin-ruby/issues?q=author%3Agithub0013" title="Bug reports">🐛</a></td>
|
196
|
+
<td align="center"><a href="https://jami.am"><img src="https://avatars1.githubusercontent.com/u/1456118?v=4?s=100" width="100px;" alt=""/><br /><sub><b>James Costian</b></sub></a><br /><a href="https://github.com/prettier/plugin-ruby/issues?q=author%3Ajamescostian" title="Bug reports">🐛</a></td>
|
197
|
+
<td align="center"><a href="https://github.com/joeyjoejoejr"><img src="https://avatars0.githubusercontent.com/u/1141502?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Joe Jackson</b></sub></a><br /><a href="https://github.com/prettier/plugin-ruby/issues?q=author%3Ajoeyjoejoejr" title="Bug reports">🐛</a></td>
|
198
|
+
<td align="center"><a href="http://178.is"><img src="https://avatars3.githubusercontent.com/u/134942?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Max Albrecht</b></sub></a><br /><a href="https://github.com/prettier/plugin-ruby/issues?q=author%3Aeins78" title="Bug reports">🐛</a></td>
|
198
199
|
</tr>
|
199
200
|
<tr>
|
200
|
-
<td align="center"><a href="https://github.com/matt-wratt"><img src="https://avatars0.githubusercontent.com/u/570030?v=4" width="100px;" alt=""/><br /><sub><b>Matt</b></sub></a><br /><a href="https://github.com/prettier/plugin-ruby/issues?q=author%3Amatt-wratt" title="Bug reports">🐛</a> <a href="https://github.com/prettier/plugin-ruby/commits?author=matt-wratt" title="Code">💻</a></td>
|
201
|
-
<td align="center"><a href="http://vesalaakso.com"><img src="https://avatars2.githubusercontent.com/u/482561?v=4" width="100px;" alt=""/><br /><sub><b>Vesa Laakso</b></sub></a><br /><a href="https://github.com/prettier/plugin-ruby/commits?author=valscion" title="Documentation">📖</a></td>
|
202
|
-
<td align="center"><a href="https://github.com/jrdioko"><img src="https://avatars0.githubusercontent.com/u/405288?v=4" width="100px;" alt=""/><br /><sub><b>jrdioko</b></sub></a><br /><a href="https://github.com/prettier/plugin-ruby/issues?q=author%3Ajrdioko" title="Bug reports">🐛</a></td>
|
203
|
-
<td align="center"><a href="http://gin0606.hatenablog.com"><img src="https://avatars2.githubusercontent.com/u/795891?v=4" width="100px;" alt=""/><br /><sub><b>gin0606</b></sub></a><br /><a href="https://github.com/prettier/plugin-ruby/issues?q=author%3Agin0606" title="Bug reports">🐛</a> <a href="https://github.com/prettier/plugin-ruby/commits?author=gin0606" title="Code">💻</a></td>
|
204
|
-
<td align="center"><a href="https://github.com/tobyndockerill"><img src="https://avatars1.githubusercontent.com/u/5688326?v=4" width="100px;" alt=""/><br /><sub><b>Tobyn</b></sub></a><br /><a href="https://github.com/prettier/plugin-ruby/commits?author=tobyndockerill" title="Code">💻</a></td>
|
205
|
-
<td align="center"><a href="http://ianks.com"><img src="https://avatars0.githubusercontent.com/u/3303032?v=4" width="100px;" alt=""/><br /><sub><b>Ian Ker-Seymer</b></sub></a><br /><a href="https://github.com/prettier/plugin-ruby/commits?author=ianks" title="Code">💻</a></td>
|
206
|
-
<td align="center"><a href="https://huangzhimin.com"><img src="https://avatars2.githubusercontent.com/u/66836?v=4" width="100px;" alt=""/><br /><sub><b>Richard Huang</b></sub></a><br /><a href="https://github.com/prettier/plugin-ruby/commits?author=flyerhzm" title="Code">💻</a></td>
|
201
|
+
<td align="center"><a href="https://github.com/matt-wratt"><img src="https://avatars0.githubusercontent.com/u/570030?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Matt</b></sub></a><br /><a href="https://github.com/prettier/plugin-ruby/issues?q=author%3Amatt-wratt" title="Bug reports">🐛</a> <a href="https://github.com/prettier/plugin-ruby/commits?author=matt-wratt" title="Code">💻</a></td>
|
202
|
+
<td align="center"><a href="http://vesalaakso.com"><img src="https://avatars2.githubusercontent.com/u/482561?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Vesa Laakso</b></sub></a><br /><a href="https://github.com/prettier/plugin-ruby/commits?author=valscion" title="Documentation">📖</a></td>
|
203
|
+
<td align="center"><a href="https://github.com/jrdioko"><img src="https://avatars0.githubusercontent.com/u/405288?v=4?s=100" width="100px;" alt=""/><br /><sub><b>jrdioko</b></sub></a><br /><a href="https://github.com/prettier/plugin-ruby/issues?q=author%3Ajrdioko" title="Bug reports">🐛</a></td>
|
204
|
+
<td align="center"><a href="http://gin0606.hatenablog.com"><img src="https://avatars2.githubusercontent.com/u/795891?v=4?s=100" width="100px;" alt=""/><br /><sub><b>gin0606</b></sub></a><br /><a href="https://github.com/prettier/plugin-ruby/issues?q=author%3Agin0606" title="Bug reports">🐛</a> <a href="https://github.com/prettier/plugin-ruby/commits?author=gin0606" title="Code">💻</a></td>
|
205
|
+
<td align="center"><a href="https://github.com/tobyndockerill"><img src="https://avatars1.githubusercontent.com/u/5688326?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Tobyn</b></sub></a><br /><a href="https://github.com/prettier/plugin-ruby/commits?author=tobyndockerill" title="Code">💻</a></td>
|
206
|
+
<td align="center"><a href="http://ianks.com"><img src="https://avatars0.githubusercontent.com/u/3303032?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Ian Ker-Seymer</b></sub></a><br /><a href="https://github.com/prettier/plugin-ruby/commits?author=ianks" title="Code">💻</a></td>
|
207
|
+
<td align="center"><a href="https://huangzhimin.com"><img src="https://avatars2.githubusercontent.com/u/66836?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Richard Huang</b></sub></a><br /><a href="https://github.com/prettier/plugin-ruby/commits?author=flyerhzm" title="Code">💻</a></td>
|
207
208
|
</tr>
|
208
209
|
<tr>
|
209
|
-
<td align="center"><a href="https://github.com/pje"><img src="https://avatars1.githubusercontent.com/u/319655?v=4" width="100px;" alt=""/><br /><sub><b>Patrick Ellis</b></sub></a><br /><a href="https://github.com/prettier/plugin-ruby/issues?q=author%3Apje" title="Bug reports">🐛</a></td>
|
210
|
-
<td align="center"><a href="https://www.piesync.com/"><img src="https://avatars0.githubusercontent.com/u/161271?v=4" width="100px;" alt=""/><br /><sub><b>Peter De Berdt</b></sub></a><br /><a href="https://github.com/prettier/plugin-ruby/issues?q=author%3Amasqita" title="Bug reports">🐛</a></td>
|
211
|
-
<td align="center"><a href="https://github.com/hafley66"><img src="https://avatars0.githubusercontent.com/u/6750483?v=4" width="100px;" alt=""/><br /><sub><b>Chris Hafley</b></sub></a><br /><a href="https://github.com/prettier/plugin-ruby/issues?q=author%3Ahafley66" title="Bug reports">🐛</a></td>
|
212
|
-
<td align="center"><a href="http://fruetel.de"><img src="https://avatars1.githubusercontent.com/u/8015212?v=4" width="100px;" alt=""/><br /><sub><b>Thomas Frütel</b></sub></a><br /><a href="https://github.com/prettier/plugin-ruby/issues?q=author%3AFruetel" title="Bug reports">🐛</a></td>
|
213
|
-
<td align="center"><a href="https://github.com/alse"><img src="https://avatars1.githubusercontent.com/u/1160249?v=4" width="100px;" alt=""/><br /><sub><b>Alex Serban</b></sub></a><br /><a href="https://github.com/prettier/plugin-ruby/commits?author=alse" title="Code">💻</a></td>
|
214
|
-
<td align="center"><a href="http://sviccari.github.io"><img src="https://avatars3.githubusercontent.com/u/4016985?v=4" width="100px;" alt=""/><br /><sub><b>Stephanie</b></sub></a><br /><a href="https://github.com/prettier/plugin-ruby/commits?author=SViccari" title="Code">💻</a></td>
|
215
|
-
<td align="center"><a href="https://github.com/ShayDavidson"><img src="https://avatars1.githubusercontent.com/u/1366521?v=4" width="100px;" alt=""/><br /><sub><b>Shay Davidson</b></sub></a><br /><a href="https://github.com/prettier/plugin-ruby/issues?q=author%3AShayDavidson" title="Bug reports">🐛</a></td>
|
210
|
+
<td align="center"><a href="https://github.com/pje"><img src="https://avatars1.githubusercontent.com/u/319655?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Patrick Ellis</b></sub></a><br /><a href="https://github.com/prettier/plugin-ruby/issues?q=author%3Apje" title="Bug reports">🐛</a></td>
|
211
|
+
<td align="center"><a href="https://www.piesync.com/"><img src="https://avatars0.githubusercontent.com/u/161271?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Peter De Berdt</b></sub></a><br /><a href="https://github.com/prettier/plugin-ruby/issues?q=author%3Amasqita" title="Bug reports">🐛</a></td>
|
212
|
+
<td align="center"><a href="https://github.com/hafley66"><img src="https://avatars0.githubusercontent.com/u/6750483?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Chris Hafley</b></sub></a><br /><a href="https://github.com/prettier/plugin-ruby/issues?q=author%3Ahafley66" title="Bug reports">🐛</a></td>
|
213
|
+
<td align="center"><a href="http://fruetel.de"><img src="https://avatars1.githubusercontent.com/u/8015212?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Thomas Frütel</b></sub></a><br /><a href="https://github.com/prettier/plugin-ruby/issues?q=author%3AFruetel" title="Bug reports">🐛</a></td>
|
214
|
+
<td align="center"><a href="https://github.com/alse"><img src="https://avatars1.githubusercontent.com/u/1160249?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Alex Serban</b></sub></a><br /><a href="https://github.com/prettier/plugin-ruby/commits?author=alse" title="Code">💻</a></td>
|
215
|
+
<td align="center"><a href="http://sviccari.github.io"><img src="https://avatars3.githubusercontent.com/u/4016985?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Stephanie</b></sub></a><br /><a href="https://github.com/prettier/plugin-ruby/commits?author=SViccari" title="Code">💻</a></td>
|
216
|
+
<td align="center"><a href="https://github.com/ShayDavidson"><img src="https://avatars1.githubusercontent.com/u/1366521?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Shay Davidson</b></sub></a><br /><a href="https://github.com/prettier/plugin-ruby/issues?q=author%3AShayDavidson" title="Bug reports">🐛</a></td>
|
216
217
|
</tr>
|
217
218
|
<tr>
|
218
|
-
<td align="center"><a href="https://github.com/ryan-hunter-pc"><img src="https://avatars2.githubusercontent.com/u/13044512?v=4" width="100px;" alt=""/><br /><sub><b>Ryan Hunter</b></sub></a><br /><a href="https://github.com/prettier/plugin-ruby/commits?author=ryan-hunter-pc" title="Code">💻</a></td>
|
219
|
-
<td align="center"><a href="https://www.locksteplabs.com/"><img src="https://avatars1.githubusercontent.com/u/7811733?v=4" width="100px;" alt=""/><br /><sub><b>Jan Klimo</b></sub></a><br /><a href="https://github.com/prettier/plugin-ruby/commits?author=janklimo" title="Code">💻</a></td>
|
220
|
-
<td align="center"><a href="http://ricksullivan.net"><img src="https://avatars0.githubusercontent.com/u/3654176?v=4" width="100px;" alt=""/><br /><sub><b>Rick Sullivan</b></sub></a><br /><a href="https://github.com/prettier/plugin-ruby/issues?q=author%3ARsullivan00" title="Bug reports">🐛</a> <a href="https://github.com/prettier/plugin-ruby/commits?author=Rsullivan00" title="Code">💻</a></td>
|
221
|
-
<td align="center"><a href="https://twitter.com/steobrien"><img src="https://avatars3.githubusercontent.com/u/1694410?v=4" width="100px;" alt=""/><br /><sub><b>Stephen O'Brien</b></sub></a><br /><a href="https://github.com/prettier/plugin-ruby/issues?q=author%3Asteobrien" title="Bug reports">🐛</a></td>
|
222
|
-
<td align="center"><a href="https://github.com/nimish-mehta"><img src="https://avatars2.githubusercontent.com/u/2488470?v=4" width="100px;" alt=""/><br /><sub><b>Nimish Mehta</b></sub></a><br /><a href="https://github.com/prettier/plugin-ruby/issues?q=author%3Animish-mehta" title="Bug reports">🐛</a> <a href="https://github.com/prettier/plugin-ruby/commits?author=nimish-mehta" title="Code">💻</a></td>
|
219
|
+
<td align="center"><a href="https://github.com/ryan-hunter-pc"><img src="https://avatars2.githubusercontent.com/u/13044512?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Ryan Hunter</b></sub></a><br /><a href="https://github.com/prettier/plugin-ruby/commits?author=ryan-hunter-pc" title="Code">💻</a></td>
|
220
|
+
<td align="center"><a href="https://www.locksteplabs.com/"><img src="https://avatars1.githubusercontent.com/u/7811733?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Jan Klimo</b></sub></a><br /><a href="https://github.com/prettier/plugin-ruby/commits?author=janklimo" title="Code">💻</a></td>
|
221
|
+
<td align="center"><a href="http://ricksullivan.net"><img src="https://avatars0.githubusercontent.com/u/3654176?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Rick Sullivan</b></sub></a><br /><a href="https://github.com/prettier/plugin-ruby/issues?q=author%3ARsullivan00" title="Bug reports">🐛</a> <a href="https://github.com/prettier/plugin-ruby/commits?author=Rsullivan00" title="Code">💻</a></td>
|
222
|
+
<td align="center"><a href="https://twitter.com/steobrien"><img src="https://avatars3.githubusercontent.com/u/1694410?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Stephen O'Brien</b></sub></a><br /><a href="https://github.com/prettier/plugin-ruby/issues?q=author%3Asteobrien" title="Bug reports">🐛</a></td>
|
223
|
+
<td align="center"><a href="https://github.com/nimish-mehta"><img src="https://avatars2.githubusercontent.com/u/2488470?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Nimish Mehta</b></sub></a><br /><a href="https://github.com/prettier/plugin-ruby/issues?q=author%3Animish-mehta" title="Bug reports">🐛</a> <a href="https://github.com/prettier/plugin-ruby/commits?author=nimish-mehta" title="Code">💻</a></td>
|
224
|
+
<td align="center"><a href="https://joshbielick.com/"><img src="https://avatars2.githubusercontent.com/u/1413330?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Josh Bielick</b></sub></a><br /><a href="https://github.com/prettier/plugin-ruby/issues?q=author%3Ajbielick" title="Bug reports">🐛</a> <a href="https://github.com/prettier/plugin-ruby/commits?author=jbielick" title="Code">💻</a></td>
|
225
|
+
<td align="center"><a href="https://github.com/coiti"><img src="https://avatars3.githubusercontent.com/u/27384706?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Román Coitiño</b></sub></a><br /><a href="https://github.com/prettier/plugin-ruby/issues?q=author%3Acoiti" title="Bug reports">🐛</a></td>
|
223
226
|
</tr>
|
224
227
|
</table>
|
225
228
|
|
226
|
-
<!-- markdownlint-
|
229
|
+
<!-- markdownlint-restore -->
|
227
230
|
<!-- prettier-ignore-end -->
|
228
231
|
|
229
232
|
<!-- ALL-CONTRIBUTORS-LIST:END -->
|
@@ -7,8 +7,8 @@ var readline = require('readline');
|
|
7
7
|
var os = require('os');
|
8
8
|
var tty = require('tty');
|
9
9
|
var util$2 = require('util');
|
10
|
-
var
|
11
|
-
var
|
10
|
+
var stream_1 = require('stream');
|
11
|
+
var events_1 = require('events');
|
12
12
|
|
13
13
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
14
14
|
|
@@ -18,8 +18,8 @@ var readline__default = /*#__PURE__*/_interopDefaultLegacy(readline);
|
|
18
18
|
var os__default = /*#__PURE__*/_interopDefaultLegacy(os);
|
19
19
|
var tty__default = /*#__PURE__*/_interopDefaultLegacy(tty);
|
20
20
|
var util__default = /*#__PURE__*/_interopDefaultLegacy(util$2);
|
21
|
-
var
|
22
|
-
var
|
21
|
+
var stream_1__default = /*#__PURE__*/_interopDefaultLegacy(stream_1);
|
22
|
+
var events_1__default = /*#__PURE__*/_interopDefaultLegacy(events_1);
|
23
23
|
|
24
24
|
var semverCompare = function cmp(a, b) {
|
25
25
|
var pa = a.split('.');
|
@@ -58,7 +58,7 @@ var pleaseUpgradeNode = function pleaseUpgradeNode(pkg, opts) {
|
|
58
58
|
};
|
59
59
|
|
60
60
|
var name = "prettier";
|
61
|
-
var version = "2.
|
61
|
+
var version = "2.2.1";
|
62
62
|
var description = "Prettier is an opinionated code formatter";
|
63
63
|
var bin = "./bin/prettier.js";
|
64
64
|
var repository = "prettier/prettier";
|
@@ -78,33 +78,34 @@ var files = [
|
|
78
78
|
"bin"
|
79
79
|
];
|
80
80
|
var dependencies = {
|
81
|
-
"@angular/compiler": "10.
|
81
|
+
"@angular/compiler": "10.2.3",
|
82
82
|
"@babel/code-frame": "7.10.4",
|
83
|
-
"@babel/parser": "7.
|
84
|
-
"@glimmer/syntax": "0.
|
83
|
+
"@babel/parser": "7.12.5",
|
84
|
+
"@glimmer/syntax": "0.66.0",
|
85
85
|
"@iarna/toml": "2.2.5",
|
86
|
-
"@typescript-eslint/typescript-estree": "
|
87
|
-
"angular-estree-parser": "2.2.
|
86
|
+
"@typescript-eslint/typescript-estree": "4.8.1",
|
87
|
+
"angular-estree-parser": "2.2.1",
|
88
88
|
"angular-html-parser": "1.7.1",
|
89
|
-
camelcase: "6.
|
89
|
+
camelcase: "6.2.0",
|
90
90
|
chalk: "4.1.0",
|
91
91
|
"ci-info": "watson/ci-info#f43f6a1cefff47fb361c88cf4b943fdbcaafe540",
|
92
92
|
"cjk-regex": "2.0.0",
|
93
93
|
cosmiconfig: "7.0.0",
|
94
94
|
dashify: "2.0.0",
|
95
|
-
diff: "
|
95
|
+
diff: "5.0.0",
|
96
96
|
editorconfig: "0.15.3",
|
97
|
-
"editorconfig-to-prettier": "0.
|
97
|
+
"editorconfig-to-prettier": "0.2.0",
|
98
98
|
"escape-string-regexp": "4.0.0",
|
99
|
+
espree: "7.3.0",
|
99
100
|
esutils: "2.0.3",
|
100
101
|
"fast-glob": "3.2.4",
|
101
102
|
"fast-json-stable-stringify": "2.1.0",
|
102
103
|
"find-parent-dir": "0.3.0",
|
103
|
-
"flow-parser": "0.
|
104
|
-
"get-
|
104
|
+
"flow-parser": "0.138.0",
|
105
|
+
"get-stdin": "8.0.0",
|
105
106
|
globby: "11.0.1",
|
106
|
-
graphql: "15.
|
107
|
-
"html-element-attributes": "2.
|
107
|
+
graphql: "15.4.0",
|
108
|
+
"html-element-attributes": "2.3.0",
|
108
109
|
"html-styles": "1.0.0",
|
109
110
|
"html-tag-names": "1.1.5",
|
110
111
|
"html-void-elements": "1.0.5",
|
@@ -113,12 +114,13 @@ var dependencies = {
|
|
113
114
|
json5: "2.1.3",
|
114
115
|
leven: "3.1.0",
|
115
116
|
"lines-and-columns": "1.1.6",
|
116
|
-
"linguist-languages": "7.
|
117
|
+
"linguist-languages": "7.12.1",
|
117
118
|
lodash: "4.17.20",
|
118
|
-
mem: "
|
119
|
+
mem: "8.0.0",
|
120
|
+
meriyah: "3.1.6",
|
119
121
|
minimatch: "3.0.4",
|
120
122
|
minimist: "1.2.5",
|
121
|
-
"n-readlines": "1.0.
|
123
|
+
"n-readlines": "1.0.1",
|
122
124
|
outdent: "0.7.1",
|
123
125
|
"parse-srcset": "ikatyang/parse-srcset#54eb9c1cb21db5c62b4d0e275d7249516df6f0ee",
|
124
126
|
"please-upgrade-node": "3.2.0",
|
@@ -129,62 +131,64 @@ var dependencies = {
|
|
129
131
|
"postcss-values-parser": "2.0.1",
|
130
132
|
"regexp-util": "1.2.2",
|
131
133
|
"remark-footnotes": "2.0.0",
|
132
|
-
"remark-math": "
|
134
|
+
"remark-math": "3.0.1",
|
133
135
|
"remark-parse": "8.0.3",
|
134
|
-
resolve: "1.
|
136
|
+
resolve: "1.19.0",
|
135
137
|
semver: "7.3.2",
|
136
138
|
"string-width": "4.2.0",
|
137
|
-
typescript: "4.
|
139
|
+
typescript: "4.1.2",
|
138
140
|
"unicode-regex": "3.0.0",
|
139
141
|
unified: "9.2.0",
|
140
142
|
vnopts: "1.0.2",
|
141
|
-
"yaml-unist-parser": "1.3.
|
143
|
+
"yaml-unist-parser": "1.3.1"
|
142
144
|
};
|
143
145
|
var devDependencies = {
|
144
|
-
"@babel/core": "7.
|
145
|
-
"@babel/preset-env": "7.
|
146
|
-
"@babel/types": "7.
|
147
|
-
"@glimmer/reference": "0.
|
146
|
+
"@babel/core": "7.12.3",
|
147
|
+
"@babel/preset-env": "7.12.1",
|
148
|
+
"@babel/types": "7.12.6",
|
149
|
+
"@glimmer/reference": "0.66.0",
|
148
150
|
"@rollup/plugin-alias": "3.1.1",
|
149
|
-
"@rollup/plugin-babel": "5.2.
|
150
|
-
"@rollup/plugin-commonjs": "
|
151
|
+
"@rollup/plugin-babel": "5.2.1",
|
152
|
+
"@rollup/plugin-commonjs": "16.0.0",
|
151
153
|
"@rollup/plugin-json": "4.1.0",
|
152
|
-
"@rollup/plugin-node-resolve": "
|
153
|
-
"@rollup/plugin-replace": "2.3.
|
154
|
+
"@rollup/plugin-node-resolve": "10.0.0",
|
155
|
+
"@rollup/plugin-replace": "2.3.4",
|
154
156
|
"@types/estree": "0.0.45",
|
155
|
-
"@types/node": "14.
|
156
|
-
"@typescript-eslint/types": "
|
157
|
-
"babel-
|
157
|
+
"@types/node": "14.14.0",
|
158
|
+
"@typescript-eslint/types": "4.8.1",
|
159
|
+
"babel-jest": "26.6.3",
|
160
|
+
"babel-loader": "8.2.1",
|
158
161
|
benchmark: "2.1.4",
|
159
162
|
"builtin-modules": "3.1.0",
|
160
163
|
"cross-env": "7.0.2",
|
161
|
-
cspell: "4.
|
162
|
-
eslint: "7.
|
163
|
-
"eslint-config-prettier": "6.
|
164
|
+
cspell: "4.2.2",
|
165
|
+
eslint: "7.13.0",
|
166
|
+
"eslint-config-prettier": "6.15.0",
|
164
167
|
"eslint-formatter-friendly": "7.0.0",
|
165
|
-
"eslint-plugin-import": "2.22.
|
166
|
-
"eslint-plugin-jest": "
|
168
|
+
"eslint-plugin-import": "2.22.1",
|
169
|
+
"eslint-plugin-jest": "24.1.3",
|
167
170
|
"eslint-plugin-prettier-internal-rules": "file:scripts/tools/eslint-plugin-prettier-internal-rules",
|
168
|
-
"eslint-plugin-react": "7.
|
169
|
-
"eslint-plugin-unicorn": "
|
170
|
-
execa: "4.0
|
171
|
-
jest: "26.
|
171
|
+
"eslint-plugin-react": "7.21.5",
|
172
|
+
"eslint-plugin-unicorn": "23.0.0",
|
173
|
+
execa: "4.1.0",
|
174
|
+
jest: "26.6.3",
|
172
175
|
"jest-snapshot-serializer-ansi": "1.0.0",
|
173
176
|
"jest-snapshot-serializer-raw": "1.1.0",
|
174
|
-
"jest-watch-typeahead": "0.6.
|
177
|
+
"jest-watch-typeahead": "0.6.1",
|
175
178
|
"npm-run-all": "4.1.5",
|
176
|
-
|
179
|
+
"path-browserify": "1.0.1",
|
180
|
+
prettier: "2.2.0",
|
177
181
|
rimraf: "3.0.2",
|
178
|
-
rollup: "2.
|
182
|
+
rollup: "2.33.3",
|
179
183
|
"rollup-plugin-node-globals": "1.4.0",
|
180
|
-
"rollup-plugin-terser": "7.0.
|
184
|
+
"rollup-plugin-terser": "7.0.2",
|
181
185
|
shelljs: "0.8.4",
|
182
186
|
"snapshot-diff": "0.8.1",
|
183
187
|
"strip-ansi": "6.0.0",
|
184
|
-
"synchronous-promise": "2.0.
|
185
|
-
tempy: "0.
|
186
|
-
"terser-webpack-plugin": "
|
187
|
-
webpack: "
|
188
|
+
"synchronous-promise": "2.0.15",
|
189
|
+
tempy: "1.0.0",
|
190
|
+
"terser-webpack-plugin": "5.0.3",
|
191
|
+
webpack: "5.5.1"
|
188
192
|
};
|
189
193
|
var scripts = {
|
190
194
|
prepublishOnly: "echo \"Error: must publish from dist/\" && exit 1",
|
@@ -202,16 +206,16 @@ var scripts = {
|
|
202
206
|
"lint:eslint": "cross-env EFF_NO_LINK_RULES=true eslint . --format friendly",
|
203
207
|
"lint:changelog": "node ./scripts/lint-changelog.js",
|
204
208
|
"lint:prettier": "prettier . \"!test*\" --check",
|
205
|
-
"lint:dist": "eslint --no-eslintrc --no-ignore --env=es6,browser --parser-options=ecmaVersion:
|
209
|
+
"lint:dist": "eslint --no-eslintrc --no-ignore --env=es6,browser --parser-options=ecmaVersion:2018 \"dist/!(bin-prettier|index|third-party).js\"",
|
206
210
|
"lint:spellcheck": "cspell \"**/*\" \".github/**/*\"",
|
207
211
|
"lint:deps": "node ./scripts/check-deps.js",
|
208
212
|
fix: "run-s fix:eslint fix:prettier",
|
209
213
|
"fix:eslint": "yarn lint:eslint --fix",
|
210
214
|
"fix:prettier": "yarn lint:prettier --write",
|
211
|
-
build: "node ./scripts/build/build.js",
|
215
|
+
build: "node --max-old-space-size=3072 ./scripts/build/build.js",
|
212
216
|
"build-docs": "node ./scripts/build-docs.js"
|
213
217
|
};
|
214
|
-
var
|
218
|
+
var require$$1 = {
|
215
219
|
name: name,
|
216
220
|
version: version,
|
217
221
|
description: description,
|
@@ -230,27 +234,6 @@ var _package = {
|
|
230
234
|
scripts: scripts
|
231
235
|
};
|
232
236
|
|
233
|
-
var _package$1 = /*#__PURE__*/Object.freeze({
|
234
|
-
__proto__: null,
|
235
|
-
name: name,
|
236
|
-
version: version,
|
237
|
-
description: description,
|
238
|
-
bin: bin,
|
239
|
-
repository: repository,
|
240
|
-
homepage: homepage,
|
241
|
-
author: author,
|
242
|
-
license: license,
|
243
|
-
main: main,
|
244
|
-
browser: browser,
|
245
|
-
unpkg: unpkg,
|
246
|
-
engines: engines,
|
247
|
-
files: files,
|
248
|
-
dependencies: dependencies,
|
249
|
-
devDependencies: devDependencies,
|
250
|
-
scripts: scripts,
|
251
|
-
'default': _package
|
252
|
-
});
|
253
|
-
|
254
237
|
var fastJsonStableStringify = function (data, opts) {
|
255
238
|
if (!opts) opts = {};
|
256
239
|
if (typeof opts === 'function') opts = {
|
@@ -322,7 +305,7 @@ var fastJsonStableStringify = function (data, opts) {
|
|
322
305
|
|
323
306
|
var src = require("./index");
|
324
307
|
|
325
|
-
const preserveCamelCase = string => {
|
308
|
+
const preserveCamelCase = (string, locale) => {
|
326
309
|
let isLastCharLower = false;
|
327
310
|
let isLastCharUpper = false;
|
328
311
|
let isLastLastCharUpper = false;
|
@@ -342,26 +325,33 @@ const preserveCamelCase = string => {
|
|
342
325
|
isLastCharUpper = false;
|
343
326
|
isLastCharLower = true;
|
344
327
|
} else {
|
345
|
-
isLastCharLower = character.toLocaleLowerCase() === character && character.toLocaleUpperCase() !== character;
|
328
|
+
isLastCharLower = character.toLocaleLowerCase(locale) === character && character.toLocaleUpperCase(locale) !== character;
|
346
329
|
isLastLastCharUpper = isLastCharUpper;
|
347
|
-
isLastCharUpper = character.toLocaleUpperCase() === character && character.toLocaleLowerCase() !== character;
|
330
|
+
isLastCharUpper = character.toLocaleUpperCase(locale) === character && character.toLocaleLowerCase(locale) !== character;
|
348
331
|
}
|
349
332
|
}
|
350
333
|
|
351
334
|
return string;
|
352
335
|
};
|
353
336
|
|
337
|
+
const preserveConsecutiveUppercase = input => {
|
338
|
+
return input.replace(/^[\p{Lu}](?![\p{Lu}])/gu, m1 => m1.toLowerCase());
|
339
|
+
};
|
340
|
+
|
341
|
+
const postProcess = (input, options) => {
|
342
|
+
return input.replace(/[_.\- ]+([\p{Alpha}\p{N}_]|$)/gu, (_, p1) => p1.toLocaleUpperCase(options.locale)).replace(/\d+([\p{Alpha}\p{N}_]|$)/gu, m => m.toLocaleUpperCase(options.locale));
|
343
|
+
};
|
344
|
+
|
354
345
|
const camelCase = (input, options) => {
|
355
346
|
if (!(typeof input === 'string' || Array.isArray(input))) {
|
356
347
|
throw new TypeError('Expected the input to be `string | string[]`');
|
357
348
|
}
|
358
349
|
|
359
|
-
options = Object.assign({
|
360
|
-
pascalCase: false
|
350
|
+
options = Object.assign({
|
351
|
+
pascalCase: false,
|
352
|
+
preserveConsecutiveUppercase: false
|
361
353
|
}, options);
|
362
354
|
|
363
|
-
const postProcess = x => options.pascalCase ? x.charAt(0).toLocaleUpperCase() + x.slice(1) : x;
|
364
|
-
|
365
355
|
if (Array.isArray(input)) {
|
366
356
|
input = input.map(x => x.trim()).filter(x => x.length).join('-');
|
367
357
|
} else {
|
@@ -373,17 +363,28 @@ const camelCase = (input, options) => {
|
|
373
363
|
}
|
374
364
|
|
375
365
|
if (input.length === 1) {
|
376
|
-
return options.pascalCase ? input.toLocaleUpperCase() : input.toLocaleLowerCase();
|
366
|
+
return options.pascalCase ? input.toLocaleUpperCase(options.locale) : input.toLocaleLowerCase(options.locale);
|
377
367
|
}
|
378
368
|
|
379
|
-
const hasUpperCase = input !== input.toLocaleLowerCase();
|
369
|
+
const hasUpperCase = input !== input.toLocaleLowerCase(options.locale);
|
380
370
|
|
381
371
|
if (hasUpperCase) {
|
382
|
-
input = preserveCamelCase(input);
|
372
|
+
input = preserveCamelCase(input, options.locale);
|
373
|
+
}
|
374
|
+
|
375
|
+
input = input.replace(/^[_.\- ]+/, '');
|
376
|
+
|
377
|
+
if (options.preserveConsecutiveUppercase) {
|
378
|
+
input = preserveConsecutiveUppercase(input);
|
379
|
+
} else {
|
380
|
+
input = input.toLocaleLowerCase();
|
381
|
+
}
|
382
|
+
|
383
|
+
if (options.pascalCase) {
|
384
|
+
input = input.charAt(0).toLocaleUpperCase(options.locale) + input.slice(1);
|
383
385
|
}
|
384
386
|
|
385
|
-
|
386
|
-
return postProcess(input);
|
387
|
+
return postProcess(input, options);
|
387
388
|
};
|
388
389
|
|
389
390
|
var camelcase = camelCase; // TODO: Remove this for the next major release
|
@@ -405,18 +406,14 @@ var dashify = (str, options) => {
|
|
405
406
|
|
406
407
|
function createCommonjsModule(fn, basedir, module) {
|
407
408
|
return module = {
|
408
|
-
|
409
|
-
|
410
|
-
|
411
|
-
|
412
|
-
|
409
|
+
path: basedir,
|
410
|
+
exports: {},
|
411
|
+
require: function (path, base) {
|
412
|
+
return commonjsRequire(path, (base === undefined || base === null) ? module.path : base);
|
413
|
+
}
|
413
414
|
}, fn(module, module.exports), module.exports;
|
414
415
|
}
|
415
416
|
|
416
|
-
function getCjsExportFromNamespace (n) {
|
417
|
-
return n && n['default'] || n;
|
418
|
-
}
|
419
|
-
|
420
417
|
function commonjsRequire () {
|
421
418
|
throw new Error('Dynamic requires are not currently supported by @rollup/plugin-commonjs');
|
422
419
|
}
|
@@ -11090,7 +11087,7 @@ var pattern = createCommonjsModule(function (module, exports) {
|
|
11090
11087
|
*/
|
11091
11088
|
|
11092
11089
|
|
11093
|
-
const PassThrough =
|
11090
|
+
const PassThrough = stream_1__default['default'].PassThrough;
|
11094
11091
|
const slice = Array.prototype.slice;
|
11095
11092
|
var merge2_1 = merge2;
|
11096
11093
|
|
@@ -12207,7 +12204,7 @@ var async$2 = createCommonjsModule(function (module, exports) {
|
|
12207
12204
|
super(_root, _settings);
|
12208
12205
|
this._settings = _settings;
|
12209
12206
|
this._scandir = out$1.scandir;
|
12210
|
-
this._emitter = new
|
12207
|
+
this._emitter = new events_1__default['default'].EventEmitter();
|
12211
12208
|
this._queue = queue(this._worker.bind(this), this._settings.concurrency);
|
12212
12209
|
this._isFatalError = false;
|
12213
12210
|
this._isDestroyed = false;
|
@@ -12371,7 +12368,7 @@ var stream$1 = createCommonjsModule(function (module, exports) {
|
|
12371
12368
|
this._root = _root;
|
12372
12369
|
this._settings = _settings;
|
12373
12370
|
this._reader = new async$2.default(this._root, this._settings);
|
12374
|
-
this._stream = new
|
12371
|
+
this._stream = new stream_1__default['default'].Readable({
|
12375
12372
|
objectMode: true,
|
12376
12373
|
read: () => {},
|
12377
12374
|
destroy: this._reader.destroy.bind(this._reader)
|
@@ -12640,7 +12637,7 @@ var stream$2 = createCommonjsModule(function (module, exports) {
|
|
12640
12637
|
|
12641
12638
|
static(patterns, options) {
|
12642
12639
|
const filepaths = patterns.map(this._getFullEntryPath, this);
|
12643
|
-
const stream = new
|
12640
|
+
const stream = new stream_1__default['default'].PassThrough({
|
12644
12641
|
objectMode: true
|
12645
12642
|
});
|
12646
12643
|
|
@@ -13147,7 +13144,7 @@ var stream$3 = createCommonjsModule(function (module, exports) {
|
|
13147
13144
|
const options = this._getReaderOptions(task);
|
13148
13145
|
|
13149
13146
|
const source = this.api(root, task, options);
|
13150
|
-
const destination = new
|
13147
|
+
const destination = new stream_1__default['default'].Readable({
|
13151
13148
|
objectMode: true,
|
13152
13149
|
read: () => {}
|
13153
13150
|
});
|
@@ -14359,7 +14356,8 @@ wordDiff.equals = function (left, right) {
|
|
14359
14356
|
};
|
14360
14357
|
|
14361
14358
|
wordDiff.tokenize = function (value) {
|
14362
|
-
|
14359
|
+
// All whitespace symbols except newline group into one token, each newline - in separate token
|
14360
|
+
var tokens = value.split(/([^\S\r\n]+|[()[\]{}'"\r\n]|\b)/); // Join the boundary splits that we do not consider to be boundaries. This is primarily the extended Latin character set.
|
14363
14361
|
|
14364
14362
|
for (var i = 0; i < tokens.length - 1; i++) {
|
14365
14363
|
// If we have an empty string in the next field and we have only word chars before and after, merge
|
@@ -14444,6 +14442,8 @@ function diffCss(oldStr, newStr, callback) {
|
|
14444
14442
|
}
|
14445
14443
|
|
14446
14444
|
function _typeof(obj) {
|
14445
|
+
"@babel/helpers - typeof";
|
14446
|
+
|
14447
14447
|
if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
|
14448
14448
|
_typeof = function (obj) {
|
14449
14449
|
return typeof obj;
|
@@ -14458,23 +14458,36 @@ function _typeof(obj) {
|
|
14458
14458
|
}
|
14459
14459
|
|
14460
14460
|
function _toConsumableArray(arr) {
|
14461
|
-
return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread();
|
14461
|
+
return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
|
14462
14462
|
}
|
14463
14463
|
|
14464
14464
|
function _arrayWithoutHoles(arr) {
|
14465
|
-
if (Array.isArray(arr))
|
14466
|
-
for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) arr2[i] = arr[i];
|
14467
|
-
|
14468
|
-
return arr2;
|
14469
|
-
}
|
14465
|
+
if (Array.isArray(arr)) return _arrayLikeToArray(arr);
|
14470
14466
|
}
|
14471
14467
|
|
14472
14468
|
function _iterableToArray(iter) {
|
14473
|
-
if (Symbol.iterator in Object(iter)
|
14469
|
+
if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter);
|
14470
|
+
}
|
14471
|
+
|
14472
|
+
function _unsupportedIterableToArray(o, minLen) {
|
14473
|
+
if (!o) return;
|
14474
|
+
if (typeof o === "string") return _arrayLikeToArray(o, minLen);
|
14475
|
+
var n = Object.prototype.toString.call(o).slice(8, -1);
|
14476
|
+
if (n === "Object" && o.constructor) n = o.constructor.name;
|
14477
|
+
if (n === "Map" || n === "Set") return Array.from(o);
|
14478
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
|
14479
|
+
}
|
14480
|
+
|
14481
|
+
function _arrayLikeToArray(arr, len) {
|
14482
|
+
if (len == null || len > arr.length) len = arr.length;
|
14483
|
+
|
14484
|
+
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
|
14485
|
+
|
14486
|
+
return arr2;
|
14474
14487
|
}
|
14475
14488
|
|
14476
14489
|
function _nonIterableSpread() {
|
14477
|
-
throw new TypeError("Invalid attempt to spread non-iterable instance");
|
14490
|
+
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
14478
14491
|
}
|
14479
14492
|
|
14480
14493
|
var objectPrototypeToString = Object.prototype.toString;
|
@@ -14664,12 +14677,23 @@ function parsePatch(uniDiff) {
|
|
14664
14677
|
chunkHeader = chunkHeaderLine.split(/@@ -(\d+)(?:,(\d+))? \+(\d+)(?:,(\d+))? @@/);
|
14665
14678
|
var hunk = {
|
14666
14679
|
oldStart: +chunkHeader[1],
|
14667
|
-
oldLines:
|
14680
|
+
oldLines: typeof chunkHeader[2] === 'undefined' ? 1 : +chunkHeader[2],
|
14668
14681
|
newStart: +chunkHeader[3],
|
14669
|
-
newLines:
|
14682
|
+
newLines: typeof chunkHeader[4] === 'undefined' ? 1 : +chunkHeader[4],
|
14670
14683
|
lines: [],
|
14671
14684
|
linedelimiters: []
|
14672
|
-
};
|
14685
|
+
}; // Unified Diff Format quirk: If the chunk size is 0,
|
14686
|
+
// the first number is one lower than one would expect.
|
14687
|
+
// https://www.artima.com/weblogs/viewpost.jsp?thread=164293
|
14688
|
+
|
14689
|
+
if (hunk.oldLines === 0) {
|
14690
|
+
hunk.oldStart += 1;
|
14691
|
+
}
|
14692
|
+
|
14693
|
+
if (hunk.newLines === 0) {
|
14694
|
+
hunk.newStart += 1;
|
14695
|
+
}
|
14696
|
+
|
14673
14697
|
var addCount = 0,
|
14674
14698
|
removeCount = 0;
|
14675
14699
|
|
@@ -14862,11 +14886,6 @@ function applyPatch(source, uniDiff) {
|
|
14862
14886
|
|
14863
14887
|
diffOffset += _hunk.newLines - _hunk.oldLines;
|
14864
14888
|
|
14865
|
-
if (_toPos < 0) {
|
14866
|
-
// Creating a new file
|
14867
|
-
_toPos = 0;
|
14868
|
-
}
|
14869
|
-
|
14870
14889
|
for (var j = 0; j < _hunk.lines.length; j++) {
|
14871
14890
|
var line = _hunk.lines[j],
|
14872
14891
|
operation = line.length > 0 ? line[0] : ' ',
|
@@ -15038,8 +15057,9 @@ function structuredPatch(oldFileName, newFileName, oldStr, newStr, oldHeader, ne
|
|
15038
15057
|
var newEOFNewline = /\n$/.test(newStr);
|
15039
15058
|
var noNlBeforeAdds = lines.length == 0 && curRange.length > hunk.oldLines;
|
15040
15059
|
|
15041
|
-
if (!oldEOFNewline && noNlBeforeAdds) {
|
15060
|
+
if (!oldEOFNewline && noNlBeforeAdds && oldStr.length > 0) {
|
15042
15061
|
// special case: old has no eol and no trailing context; no-nl can end up before adds
|
15062
|
+
// however, if the old file is empty, do not output the no-nl line
|
15043
15063
|
curRange.splice(hunk.oldLines, 0, '\');
|
15044
15064
|
}
|
15045
15065
|
|
@@ -15073,12 +15093,11 @@ function structuredPatch(oldFileName, newFileName, oldStr, newStr, oldHeader, ne
|
|
15073
15093
|
};
|
15074
15094
|
}
|
15075
15095
|
|
15076
|
-
function
|
15077
|
-
var diff = structuredPatch(oldFileName, newFileName, oldStr, newStr, oldHeader, newHeader, options);
|
15096
|
+
function formatPatch(diff) {
|
15078
15097
|
var ret = [];
|
15079
15098
|
|
15080
|
-
if (oldFileName == newFileName) {
|
15081
|
-
ret.push('Index: ' + oldFileName);
|
15099
|
+
if (diff.oldFileName == diff.newFileName) {
|
15100
|
+
ret.push('Index: ' + diff.oldFileName);
|
15082
15101
|
}
|
15083
15102
|
|
15084
15103
|
ret.push('===================================================================');
|
@@ -15086,7 +15105,18 @@ function createTwoFilesPatch(oldFileName, newFileName, oldStr, newStr, oldHeader
|
|
15086
15105
|
ret.push('+++ ' + diff.newFileName + (typeof diff.newHeader === 'undefined' ? '' : '\t' + diff.newHeader));
|
15087
15106
|
|
15088
15107
|
for (var i = 0; i < diff.hunks.length; i++) {
|
15089
|
-
var hunk = diff.hunks[i];
|
15108
|
+
var hunk = diff.hunks[i]; // Unified Diff Format quirk: If the chunk size is 0,
|
15109
|
+
// the first number is one lower than one would expect.
|
15110
|
+
// https://www.artima.com/weblogs/viewpost.jsp?thread=164293
|
15111
|
+
|
15112
|
+
if (hunk.oldLines === 0) {
|
15113
|
+
hunk.oldStart -= 1;
|
15114
|
+
}
|
15115
|
+
|
15116
|
+
if (hunk.newLines === 0) {
|
15117
|
+
hunk.newStart -= 1;
|
15118
|
+
}
|
15119
|
+
|
15090
15120
|
ret.push('@@ -' + hunk.oldStart + ',' + hunk.oldLines + ' +' + hunk.newStart + ',' + hunk.newLines + ' @@');
|
15091
15121
|
ret.push.apply(ret, hunk.lines);
|
15092
15122
|
}
|
@@ -15094,6 +15124,10 @@ function createTwoFilesPatch(oldFileName, newFileName, oldStr, newStr, oldHeader
|
|
15094
15124
|
return ret.join('\n') + '\n';
|
15095
15125
|
}
|
15096
15126
|
|
15127
|
+
function createTwoFilesPatch(oldFileName, newFileName, oldStr, newStr, oldHeader, newHeader, options) {
|
15128
|
+
return formatPatch(structuredPatch(oldFileName, newFileName, oldStr, newStr, oldHeader, newHeader, options));
|
15129
|
+
}
|
15130
|
+
|
15097
15131
|
function createPatch(fileName, oldStr, newStr, oldHeader, newHeader, options) {
|
15098
15132
|
return createTwoFilesPatch(fileName, fileName, oldStr, newStr, oldHeader, newHeader, options);
|
15099
15133
|
}
|
@@ -15578,34 +15612,32 @@ function escapeHTML(s) {
|
|
15578
15612
|
var index_es6 = /*#__PURE__*/Object.freeze({
|
15579
15613
|
__proto__: null,
|
15580
15614
|
Diff: Diff,
|
15581
|
-
diffChars: diffChars,
|
15582
|
-
diffWords: diffWords,
|
15583
|
-
diffWordsWithSpace: diffWordsWithSpace,
|
15584
|
-
diffLines: diffLines,
|
15585
|
-
diffTrimmedLines: diffTrimmedLines,
|
15586
|
-
diffSentences: diffSentences,
|
15587
|
-
diffCss: diffCss,
|
15588
|
-
diffJson: diffJson,
|
15589
|
-
diffArrays: diffArrays,
|
15590
|
-
structuredPatch: structuredPatch,
|
15591
|
-
createTwoFilesPatch: createTwoFilesPatch,
|
15592
|
-
createPatch: createPatch,
|
15593
15615
|
applyPatch: applyPatch,
|
15594
15616
|
applyPatches: applyPatches,
|
15595
|
-
|
15596
|
-
merge: merge,
|
15617
|
+
canonicalize: canonicalize,
|
15597
15618
|
convertChangesToDMP: convertChangesToDMP,
|
15598
15619
|
convertChangesToXML: convertChangesToXML,
|
15599
|
-
|
15620
|
+
createPatch: createPatch,
|
15621
|
+
createTwoFilesPatch: createTwoFilesPatch,
|
15622
|
+
diffArrays: diffArrays,
|
15623
|
+
diffChars: diffChars,
|
15624
|
+
diffCss: diffCss,
|
15625
|
+
diffJson: diffJson,
|
15626
|
+
diffLines: diffLines,
|
15627
|
+
diffSentences: diffSentences,
|
15628
|
+
diffTrimmedLines: diffTrimmedLines,
|
15629
|
+
diffWords: diffWords,
|
15630
|
+
diffWordsWithSpace: diffWordsWithSpace,
|
15631
|
+
merge: merge,
|
15632
|
+
parsePatch: parsePatch,
|
15633
|
+
structuredPatch: structuredPatch
|
15600
15634
|
});
|
15601
15635
|
|
15602
|
-
var require$$3 = getCjsExportFromNamespace(index_es6);
|
15603
|
-
|
15604
15636
|
// eslint-disable-next-line no-restricted-modules
|
15605
15637
|
|
15606
15638
|
|
15607
15639
|
const {
|
15608
|
-
|
15640
|
+
getStdin
|
15609
15641
|
} = thirdParty;
|
15610
15642
|
const {
|
15611
15643
|
createIgnorer,
|
@@ -15644,7 +15676,7 @@ function cliifyOptions(object, apiDetailedOptionMap) {
|
|
15644
15676
|
}
|
15645
15677
|
|
15646
15678
|
function diff(a, b) {
|
15647
|
-
return
|
15679
|
+
return index_es6.createTwoFilesPatch("", "", a, b, "", "", {
|
15648
15680
|
context: 2
|
15649
15681
|
});
|
15650
15682
|
}
|
@@ -15932,7 +15964,7 @@ function formatStdin(context) {
|
|
15932
15964
|
// ignore path, not the current working directory.
|
15933
15965
|
|
15934
15966
|
const relativeFilepath = context.argv["ignore-path"] ? path__default['default'].relative(path__default['default'].dirname(context.argv["ignore-path"]), filepath) : path__default['default'].relative(process.cwd(), filepath);
|
15935
|
-
|
15967
|
+
getStdin().then(input => {
|
15936
15968
|
if (relativeFilepath && ignorer.ignores(fixWindowsSlashes$1(relativeFilepath))) {
|
15937
15969
|
writeOutput(context, {
|
15938
15970
|
formatted: input
|
@@ -16421,7 +16453,7 @@ function updateContextArgv(context, plugins, pluginSearchDirs) {
|
|
16421
16453
|
const minimistOptions = createMinimistOptions(context.detailedOptions);
|
16422
16454
|
const argv = minimist_1(context.args, minimistOptions);
|
16423
16455
|
context.argv = argv;
|
16424
|
-
context.filePatterns = argv._;
|
16456
|
+
context.filePatterns = argv._.map(file => String(file));
|
16425
16457
|
}
|
16426
16458
|
|
16427
16459
|
function normalizeContextArgv(context, keys) {
|
@@ -16447,8 +16479,6 @@ var util$1 = {
|
|
16447
16479
|
normalizeDetailedOptionMap
|
16448
16480
|
};
|
16449
16481
|
|
16450
|
-
var require$$1 = getCjsExportFromNamespace(_package$1);
|
16451
|
-
|
16452
16482
|
pleaseUpgradeNode(require$$1); // eslint-disable-next-line no-restricted-modules
|
16453
16483
|
|
16454
16484
|
function run(args) {
|
@@ -16521,3 +16551,6 @@ var cli = {
|
|
16521
16551
|
};
|
16522
16552
|
|
16523
16553
|
cli.run(process.argv.slice(2));
|
16554
|
+
var prettier = {};
|
16555
|
+
|
16556
|
+
module.exports = prettier;
|