prettier 3.1.2 → 3.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +21 -1
- data/README.md +8 -6
- data/lib/prettier/rake/task.rb +1 -1
- data/lib/prettier.rb +2 -1
- data/node_modules/prettier/cli.js +7352 -4602
- data/node_modules/prettier/doc.js +111 -99
- data/node_modules/prettier/index.js +713 -2657
- data/node_modules/prettier/package.json +3 -6
- data/node_modules/prettier/parser-angular.js +1 -1
- data/node_modules/prettier/parser-babel.js +19 -19
- data/node_modules/prettier/parser-espree.js +19 -19
- data/node_modules/prettier/parser-flow.js +30 -21
- data/node_modules/prettier/parser-glimmer.js +15 -15
- data/node_modules/prettier/parser-graphql.js +1 -1
- data/node_modules/prettier/parser-html.js +20 -20
- data/node_modules/prettier/parser-markdown.js +48 -48
- data/node_modules/prettier/parser-meriyah.js +14 -14
- data/node_modules/prettier/parser-postcss.js +42 -42
- data/node_modules/prettier/parser-typescript.js +65 -65
- data/node_modules/prettier/parser-yaml.js +11 -11
- data/node_modules/prettier/third-party.js +1 -1
- data/package.json +2 -2
- data/rubocop.yml +7 -7
- data/src/parseSync.js +13 -2
- data/src/plugin.js +3 -1
- data/src/server.rb +30 -8
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 32366c0f21ecd68aa457ffa258101c877877a7154f3603eb2f26c7d51865937f
|
4
|
+
data.tar.gz: 06f87e22a36daf12111981b031a63d120c50ec24c30be2056f73b96d2b4a4e96
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ccede4bd64194b7ca7de7b08e9957b78635813cacdad577b1a2c9e0041cde2281ef6175175d3c100086fe2895394437828cb52e79ac9ca534c32c486ca400935
|
7
|
+
data.tar.gz: 5b54c65167a99225f69569e3537e7a74d800ef675bc9b2a5c2eca69f126d937ba7c80b1909c7dfc68c1027d6537db765496810aa8b594b1686cb2409a34ad7d8
|
data/CHANGELOG.md
CHANGED
@@ -6,6 +6,24 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) a
|
|
6
6
|
|
7
7
|
## [Unreleased]
|
8
8
|
|
9
|
+
## [3.2.1] - 2022-09-19
|
10
|
+
|
11
|
+
### Changed
|
12
|
+
|
13
|
+
- [#1274](https://github.com/prettier/plugin-ruby/pull/1274) - kddnewton - Support the next version of `syntax_tree-haml`.
|
14
|
+
|
15
|
+
## [3.2.0] - 2022-07-22
|
16
|
+
|
17
|
+
### Added
|
18
|
+
|
19
|
+
- [#1250](https://github.com/prettier/plugin-ruby/issues/1250) - alexf101, kddnewton - Respect the `tabWidth` option.
|
20
|
+
|
21
|
+
### Changed
|
22
|
+
|
23
|
+
- [#1255](https://github.com/prettier/plugin-ruby/pull/1255) - soberstadt - The rake task now runs check if write is false.
|
24
|
+
- [#1237](https://github.com/prettier/plugin-ruby/issues/1237) - boris-petrov - Disable the style rules associated with quotes.
|
25
|
+
- [#1248](https://github.com/prettier/plugin-ruby/pull/1248) - mhssmnn - Fix process waiting on STDIN.
|
26
|
+
|
9
27
|
## [3.1.2] - 2022-05-13
|
10
28
|
|
11
29
|
### Changed
|
@@ -1243,7 +1261,9 @@ would previously result in `array[]`, but now prints properly.
|
|
1243
1261
|
|
1244
1262
|
- Initial release 🎉
|
1245
1263
|
|
1246
|
-
[unreleased]: https://github.com/prettier/plugin-ruby/compare/v3.1
|
1264
|
+
[unreleased]: https://github.com/prettier/plugin-ruby/compare/v3.2.1...HEAD
|
1265
|
+
[3.2.1]: https://github.com/prettier/plugin-ruby/compare/v3.2.0...v3.2.1
|
1266
|
+
[3.2.0]: https://github.com/prettier/plugin-ruby/compare/v3.1.2...v3.2.0
|
1247
1267
|
[3.1.2]: https://github.com/prettier/plugin-ruby/compare/v3.1.1...v3.1.2
|
1248
1268
|
[3.1.1]: https://github.com/prettier/plugin-ruby/compare/v3.1.0...v3.1.1
|
1249
1269
|
[3.1.0]: https://github.com/prettier/plugin-ruby/compare/v3.0.0...v3.1.0
|
data/README.md
CHANGED
@@ -134,12 +134,14 @@ The `prettier` executable is now installed and ready for use:
|
|
134
134
|
|
135
135
|
Below are the options (from [`src/plugin.js`](src/plugin.js)) that `@prettier/plugin-ruby` currently supports:
|
136
136
|
|
137
|
-
| API Option | CLI Option | Default | Description
|
138
|
-
| --------------- | ------------------ | :-----: |
|
139
|
-
| `printWidth` | `--print-width` | `80` | Same as in Prettier ([see prettier docs](https://prettier.io/docs/en/options.html#print-width)).
|
140
|
-
| `requirePragma` | `--require-pragma` | `false` | Same as in Prettier ([see prettier docs](https://prettier.io/docs/en/options.html#require-pragma)).
|
141
|
-
| `rubyPlugins` | `--ruby-plugins` | `""` | The comma-separated list of plugins to require. See [Syntax Tree](https://github.com/ruby-syntax-tree/syntax_tree#plugins).
|
142
|
-
| `tabWidth` | `--tab-width` | `2` | Same as in Prettier ([see prettier docs](https://prettier.io/docs/en/options.html#tab-width)).
|
137
|
+
| API Option | CLI Option | Default | Description |
|
138
|
+
| --------------- | ------------------ | :-----: | --------------------------------------------------------------------------------------------------------------------------------------------------- |
|
139
|
+
| `printWidth` | `--print-width` | `80` | Same as in Prettier ([see prettier docs](https://prettier.io/docs/en/options.html#print-width)). |
|
140
|
+
| `requirePragma` | `--require-pragma` | `false` | Same as in Prettier ([see prettier docs](https://prettier.io/docs/en/options.html#require-pragma)). |
|
141
|
+
| `rubyPlugins` | `--ruby-plugins` | `""` | The comma-separated list of plugins to require. See [Syntax Tree](https://github.com/ruby-syntax-tree/syntax_tree#plugins). |
|
142
|
+
| `tabWidth` | `--tab-width` | `2` | Same as in Prettier ([see prettier docs](https://prettier.io/docs/en/options.html#tab-width)). |
|
143
|
+
| `singleQuote` | `--single-quote` | `false` | Same as in Prettier ([see prettier docs](https://prettier.io/docs/en/options.html#quotes)). |
|
144
|
+
| `trailingComma` | `--trailing-comma` | `es5` | Almost same as in Prettier ([see prettier docs](https://prettier.io/docs/en/options.html#trailing-commas)). Will be on for any value except `none`. |
|
143
145
|
|
144
146
|
Any of these can be added to your existing [prettier configuration
|
145
147
|
file](https://prettier.io/docs/en/configuration.html). For example:
|
data/lib/prettier/rake/task.rb
CHANGED
data/lib/prettier.rb
CHANGED
@@ -11,9 +11,10 @@ module Prettier
|
|
11
11
|
def self.run(args)
|
12
12
|
quoted = args.map { |arg| arg.start_with?("-") ? arg : "\"#{arg}\"" }
|
13
13
|
command = "node #{BINARY} --plugin \"#{PLUGIN}\" #{quoted.join(" ")}"
|
14
|
+
opts = STDIN.tty? ? {} : { stdin_data: STDIN }
|
14
15
|
|
15
16
|
stdout, stderr, status =
|
16
|
-
Open3.capture3({ "RBPRETTIER" => "1" }, command,
|
17
|
+
Open3.capture3({ "RBPRETTIER" => "1" }, command, opts)
|
17
18
|
STDOUT.puts(stdout)
|
18
19
|
|
19
20
|
# If we completed successfully, then just exit out.
|