Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@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 4.0.0 to 4.0.1

9

CHANGELOG.md

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

## [4.0.1] - 2023-07-08
### Changed
- [#1363](https://github.com/prettier/plugin-ruby/pull/1363) - mscrivo, kddnewton - Ensure all data is read from socket before attempting to parse to JSON.
## [4.0.0] - 2023-07-06

@@ -1283,3 +1289,4 @@

[unreleased]: https://github.com/prettier/plugin-ruby/compare/v4.0.0...HEAD
[unreleased]: https://github.com/prettier/plugin-ruby/compare/v4.0.1...HEAD
[4.0.1]: https://github.com/prettier/plugin-ruby/compare/v4.0.0...v4.0.1
[4.0.0]: https://github.com/prettier/plugin-ruby/compare/v3.2.2...v4.0.0

@@ -1286,0 +1293,0 @@ [3.2.2]: https://github.com/prettier/plugin-ruby/compare/v3.2.1...v3.2.2

2

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

@@ -5,0 +5,0 @@ "type": "module",

@@ -143,6 +143,3 @@ import { spawn } from "child_process";

// Formats and sends a request to the parser server. We use netcat (or something
// like it) here since Prettier requires the results of `parse` to be
// synchronous and Node.js does not offer a mechanism for synchronous socket
// requests.
// Formats and sends an asynchronous request to the parser server.
async function parse(parser, source, opts) {

@@ -156,7 +153,15 @@ if (!connectionOptions) {

const socket = new net.Socket();
let chunks = "";
socket.on("error", reject);
socket.on("error", (error) => {
reject(error);
});
socket.on("data", (data) => {
const response = JSON.parse(data.toString("utf-8"));
chunks += data.toString("utf-8");
});
socket.on("end", () => {
const response = JSON.parse(chunks);
if (response.error) {

@@ -163,0 +168,0 @@ const error = new Error(response.error);

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