@putout/printer 18.0.2 → 18.0.4

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,13 @@
1
+ 2026.03.04, v18.0.4
2
+
3
+ feature:
4
+ - e81d579 @putout/printer: type-checker: export
5
+
6
+ 2026.03.04, v18.0.3
7
+
8
+ fix:
9
+ - fd62a6d @putout/printer: is: isParentBlockLike -> isInsideBlockLike
10
+
1
11
  2026.03.04, v18.0.2
2
12
 
3
13
  feature:
@@ -107,4 +107,3 @@ export const ClassDeclaration = {
107
107
  }
108
108
  },
109
109
  };
110
-
@@ -21,7 +21,7 @@ const {
21
21
  export const isInsideProgram = (path) => isProgram(path.parentPath);
22
22
  export const isInsideBlock = (path) => isBlockStatement(path.parentPath);
23
23
 
24
- export const isParentBlockLike = createTypeChecker('path.parentPath', [
24
+ export const isInsideBlockLike = createTypeChecker('path.parentPath', [
25
25
  'Program',
26
26
  'BlockStatement',
27
27
  'TSModuleBlock',
@@ -31,7 +31,12 @@ const isTopLevelWithNoNext = (path) => {
31
31
  };
32
32
 
33
33
  const isInsideDoWhile = ({parentPath}) => isDoWhileStatement(parentPath);
34
- const isMethodOrArrow = createTypeChecker(['ArrowFunctionExpression', 'ObjectMethod']);
34
+
35
+ const isMethodOrArrow = createTypeChecker([
36
+ 'ArrowFunctionExpression',
37
+ 'ObjectMethod',
38
+ ]);
39
+
35
40
  const isInsideFn = (path) => path.find(isMethodOrArrow);
36
41
 
37
42
  const isInsideIfWithoutElseInsideFn = createTypeChecker([
@@ -7,7 +7,7 @@ import {
7
7
  isNewlineBetweenSiblings,
8
8
  exists,
9
9
  noTrailingComment,
10
- isParentBlockLike,
10
+ isInsideBlockLike,
11
11
  isInsideIf,
12
12
  isInsideBlock,
13
13
  isInsideExport,
@@ -54,7 +54,7 @@ export const VariableDeclaration = {
54
54
  print: maybeDeclare((path, {maybe, store, write, traverse, print, indent}, semantics) => {
55
55
  const {maxVariablesInOneLine} = semantics;
56
56
 
57
- maybe.indent(isParentBlockLike(path));
57
+ maybe.indent(isInsideBlockLike(path));
58
58
 
59
59
  write(path.node.kind);
60
60
  maybeSpaceAfterKeyword(path, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@putout/printer",
3
- "version": "18.0.2",
3
+ "version": "18.0.4",
4
4
  "type": "module",
5
5
  "author": "coderaiser <mnemonic.enemy@gmail.com> (https://github.com/coderaiser)",
6
6
  "description": "Simplest possible opinionated Babel AST printer for 🐊Putout",
@@ -9,7 +9,8 @@
9
9
  "exports": {
10
10
  ".": "./lib/printer.js",
11
11
  "./is": "./lib/tokenize/is.js",
12
- "./params": "./lib/tokenize/expressions/function/params.js"
12
+ "./params": "./lib/tokenize/expressions/function/params.js",
13
+ "./type-checker": "./lib/tokenize/type-checker/type-checker.js"
13
14
  },
14
15
  "repository": {
15
16
  "type": "git",