@putout/printer 12.21.0 → 12.22.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/ChangeLog CHANGED
@@ -1,3 +1,15 @@
1
+ 2025.02.05, v12.22.1
2
+
3
+ feature:
4
+ - edce5cd @putout/printer: MemberExpression: chain: route
5
+ - b7a6088 @putout/printer: eslint-plugin-putout v24.0.0
6
+ - 9882d47 @putout/printer: putout v38.0.0
7
+
8
+ 2025.01.29, v12.22.0
9
+
10
+ feature:
11
+ - c0cf5fd @putout/printer: ContinueStatement: inside LabeledStatement
12
+
1
13
  2025.01.29, v12.21.0
2
14
 
3
15
  feature:
@@ -22,7 +22,7 @@ module.exports.isLooksLikeChain = (path) => {
22
22
  if (isExcludedFromChain(root))
23
23
  return false;
24
24
 
25
- if (properties.find(isPathGet))
25
+ if (isPathGet(properties))
26
26
  return false;
27
27
 
28
28
  if (properties.find(hasComment))
@@ -43,7 +43,7 @@ module.exports.isLooksLikeChain = (path) => {
43
43
  return calls.length > 1;
44
44
  };
45
45
 
46
- const isPathGet = (property) => {
46
+ const isPathGet = ([property]) => {
47
47
  return isCallExpression(property, {
48
48
  name: 'get',
49
49
  });
@@ -1,9 +1,11 @@
1
1
  'use strict';
2
2
 
3
- module.exports.ContinueStatement = (path, {indent, print, maybe, write}) => {
3
+ const {isInsideLabel} = require('../../is');
4
+
5
+ module.exports.ContinueStatement = (path, {print, maybe, write}) => {
4
6
  const {label} = path.node;
5
7
 
6
- indent();
8
+ maybe.indent(!isInsideLabel(path));
7
9
  print('continue');
8
10
 
9
11
  maybe.print.space(label);
@@ -20,7 +20,7 @@ const {ExportDefaultDeclaration} = require('./export-declaration/export-default-
20
20
  const {BreakStatement} = require('./break-statement/break-statement');
21
21
  const {DoWhileStatement} = require('./do-while-statement');
22
22
  const {Program} = require('./program/program');
23
- const {ContinueStatement} = require('./continue-statement');
23
+ const {ContinueStatement} = require('./continue-statement/continue-statement');
24
24
  const {LabeledStatement} = require('./labeled-statement/labeled-statement');
25
25
 
26
26
  const {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@putout/printer",
3
- "version": "12.21.0",
3
+ "version": "12.22.1",
4
4
  "type": "commonjs",
5
5
  "author": "coderaiser <mnemonic.enemy@gmail.com> (https://github.com/coderaiser)",
6
6
  "description": "Simplest possible opinionated Babel AST printer for 🐊Putout",
@@ -76,7 +76,7 @@
76
76
  "check-dts": "^0.8.0",
77
77
  "escover": "^4.0.1",
78
78
  "eslint": "^9.0.0",
79
- "eslint-plugin-putout": "^23.0.0",
79
+ "eslint-plugin-putout": "^24.0.0",
80
80
  "estree-to-babel": "^10.0.0",
81
81
  "goldstein": "^5.14.0",
82
82
  "just-kebab-case": "^4.2.0",
@@ -84,7 +84,7 @@
84
84
  "mock-require": "^3.0.3",
85
85
  "montag": "^1.0.0",
86
86
  "nodemon": "^3.0.1",
87
- "putout": "^37.0.1",
87
+ "putout": "^38.0.0",
88
88
  "redlint": "^3.16.0",
89
89
  "samadhi": "^2.8.0",
90
90
  "supertape": "^10.0.0",