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
641
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 12.19.1 to 12.20.0

lib/tokenize/statements/break-statement/break-statement.js

2

lib/tokenize/is.js

@@ -131,2 +131,4 @@ 'use strict';

module.exports.isInsideIf = (path) => path.parentPath?.isIfStatement();
module.exports.isNewlineBetweenSiblings = (path) => {

@@ -133,0 +135,0 @@ const endCurrent = path.node?.loc?.end?.line;

3

lib/tokenize/statements/debugger-statement.js
'use strict';
const {isNext} = require('../is');
const {isNext, isInsideIf} = require('../is');
const isInsideBlock = (path) => path.parentPath.isBlockStatement();
const isInsideIf = (path) => path.parentPath.isIfStatement();

@@ -7,0 +6,0 @@ module.exports.DebuggerStatement = {

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

const {markAfter} = require('../../mark');
const {exists, isNext} = require('../../is');
const {
exists,
isNext,
isInsideIf,
} = require('../../is');

@@ -24,3 +28,2 @@ const {

const isInsideIf = (path) => path.parentPath.parentPath?.isIfStatement();
const isEmptyBody = (path) => !path.node.body.length;

@@ -45,3 +48,4 @@

print: (path, {indent, print, maybe, write, traverse}) => {
const partOfAlternate = path.parentPath.get('alternate');
const {parentPath} = path;
const partOfAlternate = parentPath.get('alternate');

@@ -66,3 +70,3 @@ if (path !== partOfAlternate)

if (isInsideIf(path) || isInsideNestedBody(path))
if (isInsideIf(path.parentPath) || isInsideNestedBody(path))
maybe.print.newline(isEmptyBody(consequent));

@@ -69,0 +73,0 @@ } else {

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

const {ExportDefaultDeclaration} = require('./export-declaration/export-default-declaration');
const {BreakStatement} = require('./break-statement');
const {BreakStatement} = require('./break-statement/break-statement');
const {DoWhileStatement} = require('./do-while-statement');

@@ -23,0 +23,0 @@ const {Program} = require('./program/program');

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