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

@putout/printer

Package Overview
Dependencies
Maintainers
0
Versions
600
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 11.9.0 to 11.10.0

6

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

@@ -92,3 +92,7 @@ 'use strict';

const propIs = isProperty(path);
const isIndent = isFirst(path) || !looksLikeSwitchCase && !path.isClassMethod() && !insideFn && !propIs;
const isIndent = isFirst(path)
|| !looksLikeSwitchCase
&& !path.isClassMethod()
&& !insideFn
&& !propIs;

@@ -95,0 +99,0 @@ for (const {type, value} of leadingComments) {

51

lib/tokenize/statements/export-declaration/export-declaration.js

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

module.exports.ExportNamedDeclaration = {
print(path, {print, traverse, write, indent, maybe}) {
print(path, {print, traverse, indent, maybe}) {
const {exportKind} = path.node;

@@ -46,3 +46,3 @@ const specifiers = path.get('specifiers');

indent();
write('export');
print('export');

@@ -66,35 +66,39 @@ if (exportKind === 'type' && specifiers.length)

if (specifiers.length) {
if (specifiers && !path.node.declaration) {
print.space();
write('{');
indent.inc();
maybe.write.newline(isNewline);
print('{');
const lastIndex = n - 1;
for (const [i, spec] of specifiers.entries()) {
const isType = spec.node.exportKind === 'type';
maybe.indent(isNewline);
maybe.write(isType, 'type ');
traverse(spec);
if (specifiers.length) {
indent.inc();
maybe.print.newline(isNewline);
if (i < lastIndex && !isNewline)
write(', ');
const lastIndex = n - 1;
maybe.write(isNewline, ',');
maybe.write.newline(isNewline);
for (const [i, spec] of specifiers.entries()) {
const isType = spec.node.exportKind === 'type';
maybe.indent(isNewline);
maybe.print(isType, 'type ');
traverse(spec);
if (i < lastIndex && !isNewline)
print(', ');
maybe.print(isNewline, ',');
maybe.print.newline(isNewline);
}
indent.dec();
indent();
}
indent.dec();
indent();
write('}');
print('}');
const source = path.get('source');
if (exists(source)) {
write(' from ');
print(' from ');
traverse(source);
}
write(';');
maybe.write.newline(isNext(path) || isInsideNamespace(path));
print(';');
maybe.print.newline(isNext(path) || isInsideNamespace(path));

@@ -121,1 +125,2 @@ return;

};
{
"name": "@putout/printer",
"version": "11.9.0",
"version": "11.10.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