Latest Threat Research:SANDWORM_MODE: Shai-Hulud-Style npm Worm Hijacks CI Workflows and Poisons AI Toolchains.Details
Socket
Book a DemoInstallSign in
Socket

@putout/printer

Package Overview
Dependencies
Maintainers
1
Versions
748
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
16.5.0
to
16.6.0
+25
-4
lib/tokenize/state...xport-declaration/export-declaration.js

@@ -23,2 +23,3 @@ 'use strict';

isExportNamedDeclaration,
isExportDefaultSpecifier,
} = types;

@@ -51,2 +52,6 @@

module.exports.ExportDefaultSpecifier = (path, {print}) => {
print('__exported');
};
module.exports.ExportNamedDeclaration = {

@@ -93,5 +98,20 @@ beforeIf(path) {

print.space();
print('{');
if (specifiers.length) {
const [first, ...rest] = specifiers;
if (!specifiers.length) {
print('{}');
} else if (isExportDefaultSpecifier(first) && !rest.length) {
traverse(first);
} else {
if (isExportDefaultSpecifier(first)) {
traverse(first);
print(',');
print.space();
} else {
rest.unshift(first);
}
print('{');
indent.inc();

@@ -102,3 +122,3 @@ maybe.print.newline(isNewline);

for (const [i, spec] of specifiers.entries()) {
for (const [i, spec] of rest.entries()) {
const isType = spec.node.exportKind === 'type';

@@ -121,5 +141,5 @@ const isLast = i < lastIndex;

indent();
print('}');
}
print('}');
const source = path.get('source');

@@ -164,1 +184,2 @@

};
+1
-1
{
"name": "@putout/printer",
"version": "16.5.0",
"version": "16.6.0",
"type": "commonjs",

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

Sorry, the diff of this file is too big to display