Socket
Socket
Sign inDemoInstall

@prettier/plugin-ruby

Package Overview
Dependencies
Maintainers
13
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 3.2.1 to 3.2.2

9

CHANGELOG.md

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

## [3.2.2] - 2022-09-20
### Changed
- [#1276](https://github.com/prettier/plugin-ruby/pull/1276) - kddnewton - Fix the parsing for options being passed to the server process.
## [3.2.1] - 2022-09-19

@@ -1265,3 +1271,4 @@

[unreleased]: https://github.com/prettier/plugin-ruby/compare/v3.2.1...HEAD
[unreleased]: https://github.com/prettier/plugin-ruby/compare/v3.2.2...HEAD
[3.2.2]: https://github.com/prettier/plugin-ruby/compare/v3.2.1...v3.2.2
[3.2.1]: https://github.com/prettier/plugin-ruby/compare/v3.2.0...v3.2.1

@@ -1268,0 +1275,0 @@ [3.2.0]: https://github.com/prettier/plugin-ruby/compare/v3.1.2...v3.2.0

2

package.json
{
"name": "@prettier/plugin-ruby",
"version": "3.2.1",
"version": "3.2.2",
"description": "prettier plugin for the Ruby programming language",

@@ -5,0 +5,0 @@ "main": "src/plugin.js",

@@ -62,2 +62,22 @@ const { spawn, spawnSync } = require("child_process");

// Return the list of plugins that should be passed to the server process.
function getPlugins(opts) {
const plugins = new Set();
const rubyPlugins = opts.rubyPlugins.trim();
if (rubyPlugins.length > 0) {
rubyPlugins.split(",").forEach((plugin) => plugins.add(plugin.trim()));
}
if (opts.singleQuote) {
plugins.add("plugin/single_quotes");
}
if (opts.trailingComma !== "none") {
plugins.add("plugin/trailing_comma");
}
return Array.from(plugins);
}
// Create a file that will act as a communication mechanism, spawn a parser

@@ -118,16 +138,5 @@ // server with that filepath as an argument, then spawn another process that

const plugins = new Set(opts.rubyPlugins.split(","));
if (opts.singleQuote) {
plugins.add("plugin/single_quotes");
}
if (opts.trailingComma !== "none") {
plugins.add("plugin/trailing_comma");
}
const rubyPlugins = Array.from(plugins).join(",");
const server = spawn(
"ruby",
[serverRbPath, `--plugins=${rubyPlugins}`, filepath],
[serverRbPath, `--plugins=${getPlugins(opts).join(",")}`, filepath],
{

@@ -134,0 +143,0 @@ env: Object.assign({}, process.env, { LANG: getLang() }),

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