prettier 0.22.0 → 1.1.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 +115 -8
- data/CONTRIBUTING.md +1 -1
- data/README.md +17 -14
- data/node_modules/prettier/index.js +54 -54
- data/package.json +10 -5
- data/src/embed.js +11 -7
- data/src/nodes/args.js +59 -79
- data/src/nodes/arrays.js +38 -50
- data/src/nodes/assign.js +2 -2
- data/src/nodes/calls.js +132 -50
- data/src/nodes/case.js +11 -7
- data/src/nodes/conditionals.js +4 -4
- data/src/nodes/hashes.js +59 -51
- data/src/nodes/heredocs.js +2 -2
- data/src/nodes/hooks.js +5 -3
- data/src/nodes/ints.js +0 -6
- data/src/nodes/lambdas.js +6 -22
- data/src/nodes/loops.js +67 -66
- data/src/nodes/methods.js +2 -0
- data/src/nodes/operators.js +24 -13
- data/src/nodes/params.js +15 -3
- data/src/nodes/regexp.js +38 -9
- data/src/nodes/rescue.js +2 -2
- data/src/nodes/statements.js +65 -45
- data/src/nodes/strings.js +12 -11
- data/src/parser.js +27 -12
- data/src/parser.rb +190 -54
- data/src/printer.js +16 -1
- data/src/ruby.js +15 -21
- data/src/toProc.js +2 -2
- data/src/utils.js +15 -3
- data/src/utils/printEmptyCollection.js +42 -0
- metadata +5 -46
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0110d43bf561f7af177d93dce16dd6c8802bff3eb5c6603f6b72460903186b43
|
4
|
+
data.tar.gz: 48dd261628c7127b3baca0c6934c21993b68831c6d545494967642f5783e3d16
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2caa7e2cb715c7a3c1124210b1a2efa064425ef4b2075abd84b7092e28eae67c66fc1aabf93cd6c5493b86c5c735fe9965c9f0f347be4b57f5690f74690d79b4
|
7
|
+
data.tar.gz: 16f4abe1b2ca8099660cd22a541bac6a220f661db879bf9742e85645abfe0cbf36146872c6dfe33af30bc5c8b303144720abe5233d4a1748390a7ff587e8c005
|
data/CHANGELOG.md
CHANGED
@@ -6,6 +6,99 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) a
|
|
6
6
|
|
7
7
|
## [Unreleased]
|
8
8
|
|
9
|
+
## [1.1.0] - 2020-12-20
|
10
|
+
|
11
|
+
### Added
|
12
|
+
|
13
|
+
- [@kddeisz] - Now that the comments are all fixed up, we can support `# prettier-ignore` comments.
|
14
|
+
|
15
|
+
### Changed
|
16
|
+
|
17
|
+
- [@rindek], [@kddeisz] - Do not remove parentheses when receiver looks like a constant.
|
18
|
+
- [@rindek], [@kddeisz] - Do not remove parentheses when using the special `call` syntax with no arguments.
|
19
|
+
- [@ykpythemind] - Do not change regexp bounds if the body has certain content.
|
20
|
+
- [@karanmandal], [@kddeisz] - Correctly print for loops.
|
21
|
+
- [@rafbm], [@kddeisz] - If there are method chains with arguments only at the end, we should group the method chain and the method args.
|
22
|
+
|
23
|
+
## [1.0.1] - 2020-12-12
|
24
|
+
|
25
|
+
### Changed
|
26
|
+
|
27
|
+
- [@steobrien], [@kddeisz] - Ensure leading comments in empty array and hash literals do not duplicate.
|
28
|
+
|
29
|
+
## [1.0.0] - 2020-12-11
|
30
|
+
|
31
|
+
### Changed
|
32
|
+
|
33
|
+
- [@kddeisz] - Do not unescape double quotes in a single quote string.
|
34
|
+
- [@kddeisz] - Only force braces on regexp for spaces and equals if it's inside a command or command_call.
|
35
|
+
- [@kddeisz] - Leave Sorbet type annotations in place.
|
36
|
+
- [@kddeisz] - Don't group hash contents, just allow them to break with their parent node.
|
37
|
+
- [@kddeisz] - Honor the UTF-8 lang passed in through ENV vars.
|
38
|
+
|
39
|
+
## [1.0.0-rc2] - 2020-12-10
|
40
|
+
|
41
|
+
### Changed
|
42
|
+
|
43
|
+
- [@kddeisz] - Print hashes with consistent keys (e.g., if one key cannot be a hash label, use all hash rockets).
|
44
|
+
- [@kddeisz] - Respect using `o` or not using `o` for octal numbers.
|
45
|
+
- [@kddeisz] - Ensure `when` clauses with multiple predicates that can be split into multiple lines are split correctly.
|
46
|
+
- [@kddeisz] - Ensure hash literal is split correctly when only its contents would fit on one line.
|
47
|
+
- [@kddeisz] - Simplify `toProc` checks by not calling if the option is disabled.
|
48
|
+
- [@johncsnyder], [@kddeisz] - Add `method_add_block` to the potential like of method calls that can be chained.
|
49
|
+
- [@kddeisz] - Add the `rubyArrayLiteral` option for disabling automatically turning into array literals.
|
50
|
+
|
51
|
+
## [1.0.0-rc1] - 2020-12-09
|
52
|
+
|
53
|
+
### Changed
|
54
|
+
|
55
|
+
- [@kddeisz] - Rename options to prep for v1.0 release.
|
56
|
+
- `addTrailingCommas` -> `trailingComma`, `"es5"` means `true`
|
57
|
+
- `inlineConditionals` and `inlineLoops` -> `rubyModifier`
|
58
|
+
- `preferHashLabels` -> `rubyHashLabel`
|
59
|
+
- `preferSingleQuotes` -> `rubySingleQuote`
|
60
|
+
- `toProcTransform` -> `rubyToProc`
|
61
|
+
- [@andyw8], [@kddeisz] - Fix for Ruby `2.5.1` dyna_symbols. Turns out they were previously incorrectly reported as `xstring` nodes.
|
62
|
+
- [@andyw8], [@kddeisz] - Fix for plain `rescue` nodes with only comments in the body.
|
63
|
+
- [@andyw8], [@kddeisz] - Move declaration-type comments up to the line in the original source, as in:
|
64
|
+
|
65
|
+
```ruby
|
66
|
+
def foo # :nodoc:
|
67
|
+
bar
|
68
|
+
end
|
69
|
+
```
|
70
|
+
|
71
|
+
The comment in the above example should stay in place.
|
72
|
+
|
73
|
+
- [@janklimo] - Respect special call syntax, e.g., `a.(1, 2, 3)` should remain the same.
|
74
|
+
- [@kddeisz] - Fix up a bug with `ensure` being used in a `bodystmt` and not a `begin`.
|
75
|
+
- [@kddeisz] - Fix up a bug with negative ranges, e.g., `-4..-3`.
|
76
|
+
- [@kddeisz] - Fix up a bug with operator aliases, e.g., `alias << push`.
|
77
|
+
- [@kddeisz] - Fix up a bug with calls and unary nodes, e.g., `!!foo&.bar`.
|
78
|
+
- [@kddeisz] - Fix up a bug with multiple rescue clauses and comments, e.g.,
|
79
|
+
|
80
|
+
```ruby
|
81
|
+
begin
|
82
|
+
|
83
|
+
rescue Foo, Bar
|
84
|
+
# comment
|
85
|
+
end
|
86
|
+
```
|
87
|
+
|
88
|
+
- [@kddeisz] - Handle string literals that start with `%Q`.
|
89
|
+
- [@kddeisz] - Handle question method methods in the predicate of an if with a comment in the body.
|
90
|
+
- [@kddeisz] - Fix bare `break` with comments immediately after.
|
91
|
+
- [@kddeisz] - Fix for heredocs with comments immediately after the declaration.
|
92
|
+
- [@kddeisz] - Fix for comments when you're defining a method whose name overlaps with a keyword.
|
93
|
+
- [@kddeisz] - Don't automatically indent inside interpolated expressions from within a heredoc.
|
94
|
+
- [@kddeisz] - Don't convert into string literal arrays if the elements have brackets.
|
95
|
+
- [@kddeisz] - Ensure you break the parent when there is an assignment in the predicate of a loop.
|
96
|
+
- [@kddeisz] - Fix up a bug with keyword aliases, e.g., `alias in within`.
|
97
|
+
- [@kddeisz] - Force using braces for regex if a regex starts with a blank space.
|
98
|
+
- [@kddeisz] - Force using braces for regex if a regex starts with an equals sign.
|
99
|
+
- [@kddeisz] - Fix up a bug with constant aliases, e.g., `alias in IN`.
|
100
|
+
- [@andyw8], [@kddeisz] - Ensure `rescue` comments stay on the same line as their declaration.
|
101
|
+
|
9
102
|
# [0.22.0] - 2020-12-08
|
10
103
|
|
11
104
|
### Changed
|
@@ -189,7 +282,8 @@ will now be printed as:
|
|
189
282
|
```ruby
|
190
283
|
Config::Download.new(
|
191
284
|
'prettier',
|
192
|
-
filename: 'prettier.yml',
|
285
|
+
filename: 'prettier.yml',
|
286
|
+
url: 'https://raw.githubusercontent.com/...'
|
193
287
|
).perform
|
194
288
|
```
|
195
289
|
|
@@ -877,7 +971,12 @@ would previously result in `array[]`, but now prints properly.
|
|
877
971
|
|
878
972
|
- Initial release 🎉
|
879
973
|
|
880
|
-
[unreleased]: https://github.com/prettier/plugin-ruby/compare/
|
974
|
+
[unreleased]: https://github.com/prettier/plugin-ruby/compare/v1.1.0...HEAD
|
975
|
+
[1.1.0]: https://github.com/prettier/plugin-ruby/compare/v1.0.1...v1.1.0
|
976
|
+
[1.0.1]: https://github.com/prettier/plugin-ruby/compare/v1.0.0...v1.0.1
|
977
|
+
[1.0.0]: https://github.com/prettier/plugin-ruby/compare/v1.0.0-rc2...v1.0.0
|
978
|
+
[1.0.0-rc2]: https://github.com/prettier/plugin-ruby/compare/v1.0.0-rc1...v1.0.0-rc2
|
979
|
+
[1.0.0-rc1]: https://github.com/prettier/plugin-ruby/compare/v0.22.0...v1.0.0-rc1
|
881
980
|
[0.22.0]: https://github.com/prettier/plugin-ruby/compare/v0.21.0...v0.22.0
|
882
981
|
[0.21.0]: https://github.com/prettier/plugin-ruby/compare/v0.20.1...v0.21.0
|
883
982
|
[0.20.1]: https://github.com/prettier/plugin-ruby/compare/v0.20.0...v0.20.1
|
@@ -930,6 +1029,7 @@ would previously result in `array[]`, but now prints properly.
|
|
930
1029
|
[@alanfoster]: https://github.com/AlanFoster
|
931
1030
|
[@alse]: https://github.com/alse
|
932
1031
|
[@andrewraycode]: https://github.com/AndrewRayCode
|
1032
|
+
[@andyw8]: https://github.com/andyw8
|
933
1033
|
[@ashfurrow]: https://github.com/ashfurrow
|
934
1034
|
[@awinograd]: https://github.com/awinograd
|
935
1035
|
[@bugthing]: https://github.com/bugthing
|
@@ -937,12 +1037,13 @@ would previously result in `array[]`, but now prints properly.
|
|
937
1037
|
[@christoomey]: https://github.com/christoomey
|
938
1038
|
[@cldevs]: https://github.com/cldevs
|
939
1039
|
[@codingitwrong]: https://github.com/CodingItWrong
|
1040
|
+
[@coiti]: https://github.com/coiti
|
940
1041
|
[@deecewan]: https://github.com/deecewan
|
941
1042
|
[@dudeofawesome]: https://github.com/dudeofawesome
|
942
1043
|
[@eins78]: https://github.com/eins78
|
943
|
-
[@ftes]: https://github.com/ftes
|
944
1044
|
[@flyerhzm]: https://github.com/flyerhzm
|
945
1045
|
[@fruetel]: https://github.com/Fruetel
|
1046
|
+
[@ftes]: https://github.com/ftes
|
946
1047
|
[@gin0606]: https://github.com/gin0606
|
947
1048
|
[@github0013]: https://github.com/github0013
|
948
1049
|
[@glejeune]: https://github.com/glejeune
|
@@ -951,12 +1052,15 @@ would previously result in `array[]`, but now prints properly.
|
|
951
1052
|
[@jakeprime]: https://github.com/jakeprime
|
952
1053
|
[@jamescostian]: https://github.com/jamescostian
|
953
1054
|
[@janklimo]: https://github.com/janklimo
|
1055
|
+
[@jbielick]: https://github.com/jbielick
|
954
1056
|
[@joeyjoejoejr]: https://github.com/joeyjoejoejr
|
1057
|
+
[@johncsnyder]: https://github.com/johncsnyder
|
955
1058
|
[@johnschoeman]: https://github.com/johnschoeman
|
956
1059
|
[@joshuakgoldberg]: https://github.com/JoshuaKGoldberg
|
957
1060
|
[@jpickwell]: https://github.com/jpickwell
|
958
1061
|
[@jrdioko]: https://github.com/jrdioko
|
959
1062
|
[@jviney]: https://github.com/jviney
|
1063
|
+
[@karanmandal]: https://github.com/karanmandal
|
960
1064
|
[@kddeisz]: https://github.com/kddeisz
|
961
1065
|
[@kmcq]: https://github.com/kmcq
|
962
1066
|
[@krachtstefan]: https://github.com/krachtstefan
|
@@ -966,18 +1070,21 @@ would previously result in `array[]`, but now prints properly.
|
|
966
1070
|
[@matt-wratt]: https://github.com/matt-wratt
|
967
1071
|
[@meleyal]: https://github.com/meleyal
|
968
1072
|
[@mmainz]: https://github.com/mmainz
|
1073
|
+
[@mmcnl]: https://github.com/mmcnl
|
969
1074
|
[@noahtheduke]: https://github.com/NoahTheDuke
|
970
1075
|
[@overload119]: https://github.com/Overload119
|
971
1076
|
[@petevk]: https://github.com/petevk
|
972
1077
|
[@pje]: https://github.com/pje
|
1078
|
+
[@rafbm]: https://github.com/rafbm
|
1079
|
+
[@rindek]: https://github.com/rindek
|
973
1080
|
[@rosskinsella]: https://github.com/RossKinsella
|
1081
|
+
[@rsullivan00]: https://github.com/Rsullivan00
|
1082
|
+
[@ryan-hunter-pc]: https://github.com/ryan-hunter-pc
|
974
1083
|
[@shaydavidson]: https://github.com/ShayDavidson
|
1084
|
+
[@steobrien]: https://github.com/steobrien
|
1085
|
+
[@sviccari]: https://github.com/SViccari
|
975
1086
|
[@tobyndockerill]: https://github.com/tobyndockerill
|
976
1087
|
[@uri]: https://github.com/uri
|
977
1088
|
[@xipgroc]: https://github.com/xipgroc
|
1089
|
+
[@ykpythemind]: https://github.com/ykpythemind
|
978
1090
|
[@yuki24]: https://github.com/yuki24
|
979
|
-
[@rsullivan00]: https://github.com/Rsullivan00
|
980
|
-
[@steobrien]: https://github.com/steobrien
|
981
|
-
[@jbielick]: https://github.com/jbielick
|
982
|
-
[@coiti]: https://github.com/coiti
|
983
|
-
[@johncsnyder]: https://github.com/johncsnyder
|
data/CONTRIBUTING.md
CHANGED
@@ -129,7 +129,7 @@ In order to support all preferences, the Ruby options need to be distinct from t
|
|
129
129
|
|
130
130
|
### What versions of Ruby are supported?
|
131
131
|
|
132
|
-
|
132
|
+
We support all Ruby versions that are under security maintenance or better (https://www.ruby-lang.org/en/downloads/branches/). This means at the moment we support back to Ruby 2.5. This is not to say that prettier can't parse and print code that was written while running earlier versions of Ruby, it's just that the Ruby process running prettier (whatever `ruby` resolves to when the process runs) must be >= 2.5.
|
133
133
|
|
134
134
|
### Do you support ERB files (.html.erb, .js.erb, etc.)?
|
135
135
|
|
data/README.md
CHANGED
@@ -122,31 +122,31 @@ The `prettier` executable is now installed and ready for use:
|
|
122
122
|
|
123
123
|
Below are the options (from [`src/ruby.js`](src/ruby.js)) that `@prettier/plugin-ruby` currently supports:
|
124
124
|
|
125
|
-
| API Option
|
126
|
-
|
|
127
|
-
| `printWidth`
|
128
|
-
| `requirePragma`
|
129
|
-
| `
|
130
|
-
| `
|
131
|
-
| `
|
132
|
-
| `
|
133
|
-
| `
|
134
|
-
| `
|
135
|
-
| `
|
125
|
+
| API Option | CLI Option | Default | Description |
|
126
|
+
| ------------------ | ---------------------- | :-----: | ------------------------------------------------------------------------------------------------------------------------------------ |
|
127
|
+
| `printWidth` | `--print-width` | `80` | Same as in Prettier ([see prettier docs](https://prettier.io/docs/en/options.html#print-width)). |
|
128
|
+
| `requirePragma` | `--require-pragma` | `false` | Same as in Prettier ([see prettier docs](https://prettier.io/docs/en/options.html#require-pragma)). |
|
129
|
+
| `rubyArrayLiteral` | `--ruby-array-literal` | `true` | When possible, favor the use of string and symbol array literals. |
|
130
|
+
| `rubyHashLabel` | `--ruby-hash-label` | `true` | When possible, uses the shortened hash key syntax, as opposed to hash rockets. |
|
131
|
+
| `rubyModifier` | `--ruby-modifier` | `true` | When it fits on one line, allows while and until statements to use the modifier form. |
|
132
|
+
| `rubySingleQuote` | `--ruby-single-quote` | `true` | When double quotes are not necessary for interpolation, prefers the use of single quotes for string literals. |
|
133
|
+
| `rubyToProc` | `--ruby-to-proc` | `false` | When possible, convert blocks to the more concise `Symbol#to_proc` syntax. |
|
134
|
+
| `tabWidth` | `--tab-width` | `2` | Same as in Prettier ([see prettier docs](https://prettier.io/docs/en/options.html#tab-width)). |
|
135
|
+
| `trailingComma` | `--trailing-comma` | `"es5"` | Same as in Prettier ([see prettier docs](https://prettier.io/docs/en/options.html#trailing-comma)). `"es5"` is equivalent to `true`. |
|
136
136
|
|
137
137
|
Any of these can be added to your existing [prettier configuration
|
138
138
|
file](https://prettier.io/docs/en/configuration.html). For example:
|
139
139
|
|
140
140
|
```json
|
141
141
|
{
|
142
|
-
"
|
142
|
+
"rubySingleQuote": false
|
143
143
|
}
|
144
144
|
```
|
145
145
|
|
146
146
|
Or, they can be passed to `prettier` as arguments:
|
147
147
|
|
148
148
|
```bash
|
149
|
-
prettier --
|
149
|
+
prettier --ruby-single-quote false --write '**/*.rb'
|
150
150
|
```
|
151
151
|
|
152
152
|
## Contributing
|
@@ -181,7 +181,7 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
|
|
181
181
|
</tr>
|
182
182
|
<tr>
|
183
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>
|
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> <a href="https://github.com/prettier/plugin-ruby/issues?q=author%3Aandyw8" title="Bug reports">🐛</a></td>
|
185
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
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
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>
|
@@ -227,6 +227,9 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
|
|
227
227
|
<tr>
|
228
228
|
<td align="center"><a href="https://github.com/mmcnl"><img src="https://avatars2.githubusercontent.com/u/1498727?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Matt McNeil</b></sub></a><br /><a href="https://github.com/prettier/plugin-ruby/issues?q=author%3Ammcnl" title="Bug reports">🐛</a></td>
|
229
229
|
<td align="center"><a href="https://github.com/johncsnyder"><img src="https://avatars2.githubusercontent.com/u/9882099?v=4?s=100" width="100px;" alt=""/><br /><sub><b>John Snyder</b></sub></a><br /><a href="https://github.com/prettier/plugin-ruby/issues?q=author%3Ajohncsnyder" title="Bug reports">🐛</a></td>
|
230
|
+
<td align="center"><a href="https://github.com/rindek"><img src="https://avatars1.githubusercontent.com/u/881209?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Jacek Jakubik</b></sub></a><br /><a href="https://github.com/prettier/plugin-ruby/issues?q=author%3Arindek" title="Bug reports">🐛</a></td>
|
231
|
+
<td align="center"><a href="https://twitter.com/ykpythemind"><img src="https://avatars2.githubusercontent.com/u/22209702?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Yukito Ito</b></sub></a><br /><a href="https://github.com/prettier/plugin-ruby/issues?q=author%3Aykpythemind" title="Bug reports">🐛</a> <a href="https://github.com/prettier/plugin-ruby/commits?author=ykpythemind" title="Code">💻</a></td>
|
232
|
+
<td align="center"><a href="https://studyfied.com/"><img src="https://avatars2.githubusercontent.com/u/45869605?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Karan Mandal</b></sub></a><br /><a href="https://github.com/prettier/plugin-ruby/issues?q=author%3Akaranmandal" title="Bug reports">🐛</a></td>
|
230
233
|
</tr>
|
231
234
|
</table>
|
232
235
|
|
@@ -5249,19 +5249,19 @@ var errors = {
|
|
5249
5249
|
UndefinedParserError
|
5250
5250
|
};
|
5251
5251
|
|
5252
|
-
/*! *****************************************************************************
|
5253
|
-
Copyright (c) Microsoft Corporation.
|
5254
|
-
|
5255
|
-
Permission to use, copy, modify, and/or distribute this software for any
|
5256
|
-
purpose with or without fee is hereby granted.
|
5257
|
-
|
5258
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
5259
|
-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
5260
|
-
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
5261
|
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
5262
|
-
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
5263
|
-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
5264
|
-
PERFORMANCE OF THIS SOFTWARE.
|
5252
|
+
/*! *****************************************************************************
|
5253
|
+
Copyright (c) Microsoft Corporation.
|
5254
|
+
|
5255
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
5256
|
+
purpose with or without fee is hereby granted.
|
5257
|
+
|
5258
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
5259
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
5260
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
5261
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
5262
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
5263
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
5264
|
+
PERFORMANCE OF THIS SOFTWARE.
|
5265
5265
|
***************************************************************************** */
|
5266
5266
|
|
5267
5267
|
/* global Reflect, Promise */
|
@@ -14638,7 +14638,6 @@ function printAstToDoc(ast, options, alignmentSize = 0) {
|
|
14638
14638
|
} // We let JSXElement print its comments itself because it adds () around
|
14639
14639
|
// UnionTypeAnnotation has to align the child without the comments
|
14640
14640
|
|
14641
|
-
|
14642
14641
|
let res;
|
14643
14642
|
|
14644
14643
|
if (printer.willPrintOwnComments && printer.willPrintOwnComments(path, options)) {
|
@@ -14675,6 +14674,7 @@ function printPrettierIgnoredNode(node, options) {
|
|
14675
14674
|
locStart,
|
14676
14675
|
locEnd
|
14677
14676
|
} = options;
|
14677
|
+
|
14678
14678
|
const start = locStart(node);
|
14679
14679
|
const end = locEnd(node);
|
14680
14680
|
|
@@ -24808,11 +24808,11 @@ var ini = createCommonjsModule(function (module, exports) {
|
|
24808
24808
|
});
|
24809
24809
|
|
24810
24810
|
var fs = __importStar(fs__default['default']);
|
24811
|
-
/**
|
24812
|
-
* define the possible values:
|
24813
|
-
* section: [section]
|
24814
|
-
* param: key=value
|
24815
|
-
* comment: ;this is a comment
|
24811
|
+
/**
|
24812
|
+
* define the possible values:
|
24813
|
+
* section: [section]
|
24814
|
+
* param: key=value
|
24815
|
+
* comment: ;this is a comment
|
24816
24816
|
*/
|
24817
24817
|
|
24818
24818
|
|
@@ -24821,9 +24821,9 @@ var ini = createCommonjsModule(function (module, exports) {
|
|
24821
24821
|
param: /^\s*([\w\.\-\_]+)\s*[=:]\s*(.*?)\s*([#;].*)?$/,
|
24822
24822
|
comment: /^\s*[#;].*$/
|
24823
24823
|
};
|
24824
|
-
/**
|
24825
|
-
* Parses an .ini file
|
24826
|
-
* @param file The location of the .ini file
|
24824
|
+
/**
|
24825
|
+
* Parses an .ini file
|
24826
|
+
* @param file The location of the .ini file
|
24827
24827
|
*/
|
24828
24828
|
|
24829
24829
|
function parse(file) {
|
@@ -29644,8 +29644,8 @@ var path_1 = createCommonjsModule(function (module, exports) {
|
|
29644
29644
|
const LEADING_DOT_SEGMENT_CHARACTERS_COUNT = 2; // ./ or .\\
|
29645
29645
|
|
29646
29646
|
const UNESCAPED_GLOB_SYMBOLS_RE = /(\\?)([()*?[\]{|}]|^!|[!+@](?=\())/g;
|
29647
|
-
/**
|
29648
|
-
* Designed to work only with simple paths: `dir\\file`.
|
29647
|
+
/**
|
29648
|
+
* Designed to work only with simple paths: `dir\\file`.
|
29649
29649
|
*/
|
29650
29650
|
|
29651
29651
|
function unixify(filepath) {
|
@@ -34268,17 +34268,17 @@ var pattern = createCommonjsModule(function (module, exports) {
|
|
34268
34268
|
exports.isStaticPattern = isStaticPattern;
|
34269
34269
|
|
34270
34270
|
function isDynamicPattern(pattern, options = {}) {
|
34271
|
-
/**
|
34272
|
-
* A special case with an empty string is necessary for matching patterns that start with a forward slash.
|
34273
|
-
* An empty string cannot be a dynamic pattern.
|
34274
|
-
* For example, the pattern `/lib/*` will be spread into parts: '', 'lib', '*'.
|
34271
|
+
/**
|
34272
|
+
* A special case with an empty string is necessary for matching patterns that start with a forward slash.
|
34273
|
+
* An empty string cannot be a dynamic pattern.
|
34274
|
+
* For example, the pattern `/lib/*` will be spread into parts: '', 'lib', '*'.
|
34275
34275
|
*/
|
34276
34276
|
if (pattern === '') {
|
34277
34277
|
return false;
|
34278
34278
|
}
|
34279
|
-
/**
|
34280
|
-
* When the `caseSensitiveMatch` option is disabled, all patterns must be marked as dynamic, because we cannot check
|
34281
|
-
* filepath directly (without read directory).
|
34279
|
+
/**
|
34280
|
+
* When the `caseSensitiveMatch` option is disabled, all patterns must be marked as dynamic, because we cannot check
|
34281
|
+
* filepath directly (without read directory).
|
34282
34282
|
*/
|
34283
34283
|
|
34284
34284
|
|
@@ -34389,17 +34389,17 @@ var pattern = createCommonjsModule(function (module, exports) {
|
|
34389
34389
|
} = picomatch$1.scan(pattern, Object.assign(Object.assign({}, options), {
|
34390
34390
|
parts: true
|
34391
34391
|
}));
|
34392
|
-
/**
|
34393
|
-
* The scan method returns an empty array in some cases.
|
34394
|
-
* See micromatch/picomatch#58 for more details.
|
34392
|
+
/**
|
34393
|
+
* The scan method returns an empty array in some cases.
|
34394
|
+
* See micromatch/picomatch#58 for more details.
|
34395
34395
|
*/
|
34396
34396
|
|
34397
34397
|
if (parts.length === 0) {
|
34398
34398
|
parts = [pattern];
|
34399
34399
|
}
|
34400
|
-
/**
|
34401
|
-
* The scan method does not return an empty part for the pattern with a forward slash.
|
34402
|
-
* This is another part of micromatch/picomatch#58.
|
34400
|
+
/**
|
34401
|
+
* The scan method does not return an empty part for the pattern with a forward slash.
|
34402
|
+
* This is another part of micromatch/picomatch#58.
|
34403
34403
|
*/
|
34404
34404
|
|
34405
34405
|
|
@@ -34804,8 +34804,8 @@ var constants$5 = createCommonjsModule(function (module, exports) {
|
|
34804
34804
|
const SUPPORTED_MINOR_VERSION = 10;
|
34805
34805
|
const IS_MATCHED_BY_MAJOR = MAJOR_VERSION > SUPPORTED_MAJOR_VERSION;
|
34806
34806
|
const IS_MATCHED_BY_MAJOR_AND_MINOR = MAJOR_VERSION === SUPPORTED_MAJOR_VERSION && MINOR_VERSION >= SUPPORTED_MINOR_VERSION;
|
34807
|
-
/**
|
34808
|
-
* IS `true` for Node.js 10.10 and greater.
|
34807
|
+
/**
|
34808
|
+
* IS `true` for Node.js 10.10 and greater.
|
34809
34809
|
*/
|
34810
34810
|
|
34811
34811
|
exports.IS_SUPPORT_READDIR_WITH_FILE_TYPES = IS_MATCHED_BY_MAJOR || IS_MATCHED_BY_MAJOR_AND_MINOR;
|
@@ -35894,9 +35894,9 @@ var matcher = createCommonjsModule(function (module, exports) {
|
|
35894
35894
|
}
|
35895
35895
|
|
35896
35896
|
_fillStorage() {
|
35897
|
-
/**
|
35898
|
-
* The original pattern may include `{,*,**,a/*}`, which will lead to problems with matching (unresolved level).
|
35899
|
-
* So, before expand patterns with brace expansion into separated patterns.
|
35897
|
+
/**
|
35898
|
+
* The original pattern may include `{,*,**,a/*}`, which will lead to problems with matching (unresolved level).
|
35899
|
+
* So, before expand patterns with brace expansion into separated patterns.
|
35900
35900
|
*/
|
35901
35901
|
const patterns = utils$3.pattern.expandPatternsWithBraceExpansion(this._patterns);
|
35902
35902
|
|
@@ -35958,12 +35958,12 @@ var partial = createCommonjsModule(function (module, exports) {
|
|
35958
35958
|
|
35959
35959
|
for (const pattern of patterns) {
|
35960
35960
|
const section = pattern.sections[0];
|
35961
|
-
/**
|
35962
|
-
* In this case, the pattern has a globstar and we must read all directories unconditionally,
|
35963
|
-
* but only if the level has reached the end of the first group.
|
35964
|
-
*
|
35965
|
-
* fixtures/{a,b}/**
|
35966
|
-
* ^ true/false ^ always true
|
35961
|
+
/**
|
35962
|
+
* In this case, the pattern has a globstar and we must read all directories unconditionally,
|
35963
|
+
* but only if the level has reached the end of the first group.
|
35964
|
+
*
|
35965
|
+
* fixtures/{a,b}/**
|
35966
|
+
* ^ true/false ^ always true
|
35967
35967
|
*/
|
35968
35968
|
|
35969
35969
|
if (!pattern.complete && levels > section.length) {
|
@@ -36045,8 +36045,8 @@ var deep = createCommonjsModule(function (module, exports) {
|
|
36045
36045
|
}
|
36046
36046
|
|
36047
36047
|
_isSkippedByDeep(basePath, entryPath) {
|
36048
|
-
/**
|
36049
|
-
* Avoid unnecessary depth calculations when it doesn't matter.
|
36048
|
+
/**
|
36049
|
+
* Avoid unnecessary depth calculations when it doesn't matter.
|
36050
36050
|
*/
|
36051
36051
|
if (this._settings.deep === Infinity) {
|
36052
36052
|
return false;
|
@@ -36534,10 +36534,10 @@ async function FastGlob(source, options) {
|
|
36534
36534
|
function stream(source, options) {
|
36535
36535
|
assertPatternsInput(source);
|
36536
36536
|
const works = getWorks(source, stream$5.default, options);
|
36537
|
-
/**
|
36538
|
-
* The stream returned by the provider cannot work with an asynchronous iterator.
|
36539
|
-
* To support asynchronous iterators, regardless of the number of tasks, we always multiplex streams.
|
36540
|
-
* This affects performance (+25%). I don't see best solution right now.
|
36537
|
+
/**
|
36538
|
+
* The stream returned by the provider cannot work with an asynchronous iterator.
|
36539
|
+
* To support asynchronous iterators, regardless of the number of tasks, we always multiplex streams.
|
36540
|
+
* This affects performance (+25%). I don't see best solution right now.
|
36541
36541
|
*/
|
36542
36542
|
|
36543
36543
|
return utils$3.stream.merge(works);
|