Socket
Socket
Sign inDemoInstall

@prettier/plugin-ruby

Package Overview
Dependencies
Maintainers
12
Versions
78
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@prettier/plugin-ruby - npm Package Compare versions

Comparing version 2.1.0 to 3.0.0

src/getInfo.js

30

CHANGELOG.md

@@ -9,2 +9,19 @@ # Changelog

## [3.0.0] - 2022-05-04
### Added
- [#1190](https://github.com/prettier/plugin-ruby/pull/1190) - kddnewton - Encoding for source files is now guessed in a much better way.
### Changed
- [#1198](https://github.com/prettier/plugin-ruby/issues/1198) - pas-f, kddnewton - Fix crashes on JRuby with do blocks.
- [#1131](https://github.com/prettier/plugin-ruby/issues/1131) - hyrious, kddnewton - Ensure zombie processes are not left around when the server exits.
- [#1206](https://github.com/prettier/plugin-ruby/pull/1206) - kddnewton - Switch back to plain JavaScript for development.
- [#1190](https://github.com/prettier/plugin-ruby/pull/1190) - kddnewton - Switch over to using Syntax Tree for the backend.
### Removed
- [#1190](https://github.com/prettier/plugin-ruby/pull/1190) - kddnewton - The configuration options have been removed. Instead, configuration is to be done through modifying Syntax Tree.
## [2.1.0] - 2022-04-04

@@ -320,3 +337,2 @@

begin
rescue Foo, Bar

@@ -477,3 +493,4 @@ # comment

```ruby
def foo(**nil); end
def foo(**nil)
end
```

@@ -524,5 +541,5 @@

Config::Download.new(
'prettier',
filename: 'prettier.yml',
url: 'https://raw.githubusercontent.com/...'
"prettier",
filename: "prettier.yml",
url: "https://raw.githubusercontent.com/..."
).perform

@@ -1215,3 +1232,4 @@ ```

[unreleased]: https://github.com/prettier/plugin-ruby/compare/v2.1.0...HEAD
[unreleased]: https://github.com/prettier/plugin-ruby/compare/v3.0.0...HEAD
[3.0.0]: https://github.com/prettier/plugin-ruby/compare/v2.1.0...v3.0.0
[2.1.0]: https://github.com/prettier/plugin-ruby/compare/v2.0.0...v2.1.0

@@ -1218,0 +1236,0 @@ [2.0.0]: https://github.com/prettier/plugin-ruby/compare/v2.0.0-rc4...v2.0.0

32

package.json
{
"name": "@prettier/plugin-ruby",
"version": "2.1.0",
"version": "3.0.0",
"description": "prettier plugin for the Ruby programming language",
"main": "dist/plugin.js",
"main": "src/plugin.js",
"scripts": {
"checkFormat": "prettier --check '**/*'",
"lint": "eslint --cache .",
"prepublishOnly": "tsc -p tsconfig.build.json && cp src/parser/getInfo.js dist/parser && cp src/parser/netcat.js dist/parser && cp src/parser/server.rb dist/parser && cp src/haml/parser.rb dist/haml && cp src/rbs/parser.rb dist/rbs && cp src/ruby/parser.rb dist/ruby",
"test": "jest"

@@ -26,15 +25,7 @@ },

"devDependencies": {
"@types/jest": "^27.0.1",
"@types/node": "^17.0.0",
"@types/prettier": "^2.4.2",
"@typescript-eslint/eslint-plugin": "^5.18.0",
"@typescript-eslint/parser": "^5.18.0",
"eslint": "^8.1.0",
"eslint-config-prettier": "^8.0.0",
"husky": "^7.0.0",
"jest": "^27.0.1",
"pretty-quick": "^3.1.2",
"ts-jest": "^27.0.5",
"ts-node": "^10.2.1",
"typescript": "^4.5.2"
"jest": "^28.0.1",
"pretty-quick": "^3.1.2"
},

@@ -44,3 +35,2 @@ "eslintConfig": {

"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"prettier"

@@ -53,17 +43,13 @@ ],

},
"parser": "@typescript-eslint/parser",
"rules": {
"no-unused-vars": "off",
"@typescript-eslint/explicit-module-boundary-types": "off",
"@typescript-eslint/no-explicit-any": "off"
"no-unused-vars": "off"
}
},
"jest": {
"globalSetup": "./test/js/globalSetup.ts",
"globalTeardown": "./test/js/globalTeardown.ts",
"preset": "ts-jest",
"globalSetup": "./test/js/globalSetup.js",
"globalTeardown": "./test/js/globalTeardown.js",
"setupFilesAfterEnv": [
"./test/js/setupTests.ts"
"./test/js/setupTests.js"
],
"testRegex": ".test.ts$"
"testRegex": ".test.js$"
},

@@ -70,0 +56,0 @@ "husky": {

@@ -62,5 +62,5 @@ <div align="center">

a, s = [], $*[0]
s.each_byte { |b| a << ('%036b' % d[b.chr.to_i]).scan(/\d{6}/) }
s.each_byte { |b| a << ("%036b" % d[b.chr.to_i]).scan(/\d{6}/) }
a.transpose.each do |a|
a.join.each_byte { |i| print i == 49 ? ($*[1] || '#') : 32.chr }
a.join.each_byte { |i| print i == 49 ? ($*[1] || "#") : 32.chr }
puts

@@ -87,3 +87,3 @@ end

```ruby
gem 'prettier'
gem "prettier"
```

@@ -123,2 +123,8 @@

You'll also need to add the necessary Ruby dependencies. You can do this by running:
```bash
gem install syntax_tree syntax_tree-haml syntax_tree-rbs
```
The `prettier` executable is now installed and ready for use:

@@ -134,13 +140,7 @@

| API Option | CLI Option | Default | Description |
| ------------------ | ---------------------- | :------: | ------------------------------------------------------------------------------------------------------------------------------------ |
| `printWidth` | `--print-width` | `80` | Same as in Prettier ([see prettier docs](https://prettier.io/docs/en/options.html#print-width)). |
| `requirePragma` | `--require-pragma` | `false` | Same as in Prettier ([see prettier docs](https://prettier.io/docs/en/options.html#require-pragma)). |
| `rubyArrayLiteral` | `--ruby-array-literal` | `true` | When possible, favor the use of string and symbol array literals. |
| `rubyHashLabel` | `--ruby-hash-label` | `true` | When possible, uses the shortened hash key syntax, as opposed to hash rockets. |
| `rubyModifier` | `--ruby-modifier` | `true` | When it fits on one line, allows while and until statements to use the modifier form. |
| `rubySingleQuote` | `--ruby-single-quote` | `true` | When double quotes are not necessary for interpolation, prefers the use of single quotes for string literals. |
| `rubyToProc` | `--ruby-to-proc` | `false` | When possible, convert blocks to the more concise `Symbol#to_proc` syntax. |
| `tabWidth` | `--tab-width` | `2` | Same as in Prettier ([see prettier docs](https://prettier.io/docs/en/options.html#tab-width)). |
| `trailingComma` | `--trailing-comma` | `"none"` | Same as in Prettier ([see prettier docs](https://prettier.io/docs/en/options.html#trailing-comma)). `"es5"` is equivalent to `true`. |
| API Option | CLI Option | Default | Description |
| --------------- | ------------------ | :-----: | --------------------------------------------------------------------------------------------------- |
| `printWidth` | `--print-width` | `80` | Same as in Prettier ([see prettier docs](https://prettier.io/docs/en/options.html#print-width)). |
| `requirePragma` | `--require-pragma` | `false` | Same as in Prettier ([see prettier docs](https://prettier.io/docs/en/options.html#require-pragma)). |
| `tabWidth` | `--tab-width` | `2` | Same as in Prettier ([see prettier docs](https://prettier.io/docs/en/options.html#tab-width)). |

@@ -152,3 +152,3 @@ Any of these can be added to your existing [prettier configuration

{
"rubySingleQuote": false
"tabWidth": 4
}

@@ -160,3 +160,3 @@ ```

```bash
bundle exec rbprettier --ruby-single-quote false --write '**/*'
bundle exec rbprettier --tab-width 4 --write '**/*'
```

@@ -163,0 +163,0 @@

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc