New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@huggingface/prettier-plugin-vertical-align

Package Overview
Dependencies
Maintainers
0
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@huggingface/prettier-plugin-vertical-align - npm Package Compare versions

Comparing version 0.0.12 to 0.0.13

6

dist/printer.js

@@ -36,3 +36,2 @@ import prettier from "prettier";

case "ObjectProperty": {
const shouldMoveCompletelyToNextLine = node.value.type === "LogicalExpression";
// console.log(node.value.type);

@@ -44,3 +43,3 @@ return group([

":" + " ".repeat(addedLength + 1),
shouldMoveCompletelyToNextLine
shouldMoveCompletelyToNextLine(node[valueField(node)])
? ifBreak(indent(group([line, path.call(_print, valueField(node))])), path.call(_print, valueField(node)))

@@ -62,6 +61,7 @@ : path.call(_print, valueField(node)),

if (isPropertyContainer(node)) {
// console.log("node", node);
// console.log("node", inspect(node, {depth: 10}));
const properties = nodeProperties(node)
.filter(isProperty)
.filter((node) => node.key.loc.start.line === node.key.loc.end.line && !node.shorthand);
.filter((node) => node.key.loc.start.line === node.key.loc.end.line && !node.shorthand && !node.method);
// Check props are not on the same line (we don't want to add extra spaces in that case)

@@ -68,0 +68,0 @@ if (properties.length > 1 && properties[1].loc.start.line !== properties[0].loc.start.line) {

{
"name": "@huggingface/prettier-plugin-vertical-align",
"packageManager": "pnpm@9.11.0",
"version": "0.0.12",
"version": "0.0.13",
"description": "",

@@ -6,0 +6,0 @@ "scripts": {

@@ -50,3 +50,2 @@ import type { AstPath, Printer } from "prettier";

case "ObjectProperty": {
const shouldMoveCompletelyToNextLine = node.value.type === "LogicalExpression";
// console.log(node.value.type);

@@ -58,3 +57,3 @@ return group([

":" + " ".repeat(addedLength + 1),
shouldMoveCompletelyToNextLine
shouldMoveCompletelyToNextLine(node[valueField(node)])
? ifBreak(indent(group([line, path.call(_print, valueField(node))])), path.call(_print, valueField(node)))

@@ -78,6 +77,7 @@ : path.call(_print, valueField(node)),

if (isPropertyContainer(node)) {
// console.log("node", node);
// console.log("node", inspect(node, {depth: 10}));
const properties: Node[] = nodeProperties(node)
.filter(isProperty)
.filter((node: Node) => node.key.loc.start.line === node.key.loc.end.line && !node.shorthand);
.filter((node: Node) => node.key.loc.start.line === node.key.loc.end.line && !node.shorthand && !node.method);

@@ -84,0 +84,0 @@ // Check props are not on the same line (we don't want to add extra spaces in that case)

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