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

@putout/printer

Package Overview
Dependencies
Maintainers
1
Versions
612
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 1.40.1 to 1.40.2

15

lib/tokenize/comments.js

@@ -48,3 +48,3 @@ 'use strict';

module.exports.parseTrailingComments = (path, {print}) => {
module.exports.parseTrailingComments = (path, {write, maybe}) => {
const {trailingComments} = path.node;

@@ -58,6 +58,9 @@

for (const {type, value} of trailingComments) {
for (const {type, value, loc} of trailingComments) {
if (type === 'CommentLine') {
print.space();
print(`//${value}`);
const sameLine = isSameLine(path, loc);
maybe.write.space(sameLine);
maybe.indent(!sameLine);
write(`//${value}`);
maybe.write.newline(!sameLine);

@@ -72,1 +75,5 @@ continue;

}
function isSameLine(path, loc) {
return path.node.loc.start.line === loc.start.line;
}
{
"name": "@putout/printer",
"version": "1.40.1",
"version": "1.40.2",
"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