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
604
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.55.0 to 1.56.0

lib/tokenize/jsx/jsx-fragment.js

17

lib/tokenize/expressions/functions/function-declaration.js
'use strict';
const {hasPrevNewline} = require('../../mark');
const isFirst = (path) => !path.getPrevSibling().node;
const {markAfter} = require('../../mark');
const {isNext} = require('../../is');
module.exports.FunctionDeclaration = {
beforeIf(path) {
return !isFirst(path) && !hasPrevNewline(path) && !path.parentPath.isExportDeclaration();
},
before(path, {write}) {
write('\n');
},
print(path, {print, maybe}) {

@@ -35,2 +29,9 @@ const {async} = path.node;

},
afterSatisfy: () => [
isNext,
],
after(path, {write}) {
write.newline();
markAfter(path);
},
};

@@ -7,4 +7,6 @@ 'use strict';

const {JSXOpeningElement} = require('./jsx-opening-element');
const fragments = require('./jsx-fragment');
module.exports = {
...fragments,
JSXElement,

@@ -11,0 +13,0 @@ JSXAttribute,

'use strict';
const {
isNewlineBetweenStatements,
isNext,
} = require('../is');
const {isNext} = require('../is');
const {isMarkedAfter} = require('../mark');
const notClass = (path) => {

@@ -18,13 +13,2 @@ if (!isNext(path))

module.exports.ExportDefaultDeclaration = {
beforeIf(path) {
const prev = path.getPrevSibling();
if (isMarkedAfter(prev))
return false;
return isNewlineBetweenStatements(prev);
},
before(path, {print}) {
print.newline();
},
print(path, {print, traverse, maybe}) {

@@ -31,0 +15,0 @@ const declaration = path.get('declaration');

{
"name": "@putout/printer",
"version": "1.55.0",
"version": "1.56.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