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

@putout/printer

Package Overview
Dependencies
Maintainers
1
Versions
623
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@putout/printer - npm Package Compare versions

Comparing version 6.8.2 to 6.9.0

22

lib/tokenize/comment/parse-trailing-comments.js

@@ -16,2 +16,19 @@ 'use strict';

const isTrailingIsLeading = (path) => path.node.trailingComments === path.getNextSibling().node?.leadingComments;
function isCommentOnNextLine(path) {
const {
loc,
trailingComments,
} = path.node;
if (isTrailingIsLeading(path))
return false;
const [comment] = trailingComments;
const {line} = comment.loc.start;
return line === loc.start.line + 1;
}
module.exports.parseTrailingComments = (path, {write, maybe}, semantics) => {

@@ -33,6 +50,8 @@ if (!semantics.comments)

const sameLine = isSameLine(path, loc);
const commentOnNextLine = isCommentOnNextLine(path);
if (type === 'CommentLine') {
maybe.write.breakline(commentOnNextLine);
maybe.write.space(sameLine);
maybe.indent(!sameLine);
maybe.indent(!sameLine && !commentOnNextLine);

@@ -58,1 +77,2 @@ if (hasBody(path)) {

};
'use strict';
const {hasTrailingComment} = require('../is');
module.exports.SpreadElement = (path, printer) => {

@@ -5,0 +6,0 @@ const {print} = printer;

2

package.json
{
"name": "@putout/printer",
"version": "6.8.2",
"version": "6.9.0",
"type": "commonjs",

@@ -5,0 +5,0 @@ "author": "coderaiser <mnemonic.enemy@gmail.com> (https://github.com/coderaiser)",

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