@putout/printer 18.49.1 → 18.49.3

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.11.09, v18.49.3
2
+
3
+ feature:
4
+ - 26765033 @putout/printer: isStatementNotExpression: apply type checker
5
+
6
+ 2026.11.08, v18.49.2
7
+
8
+ fix:
9
+ - 669f5530 revert: jsx: " -> &quot - move to operator-jsx
10
+
1
11
  2026.11.07, v18.49.1
2
12
 
3
13
  fix:
@@ -2,7 +2,7 @@ export const StringLiteral = (path, {write}, semantics) => {
2
2
  const {value, raw = `'${value}'`} = path.node;
3
3
 
4
4
  if (path.parentPath.isJSXAttribute()) {
5
- write(`"${value.replaceAll('"', '"')}"`);
5
+ write(`"${value}"`);
6
6
  return;
7
7
  }
8
8
 
@@ -16,23 +16,14 @@ import {
16
16
  const {
17
17
  isBlockStatement,
18
18
  isStatement,
19
- isExpressionStatement,
20
- isReturnStatement,
21
- isContinueStatement,
22
19
  } = types;
23
20
 
24
- const isStatementNotExpression = (path) => {
25
- if (isBlockStatement(path))
26
- return false;
27
-
28
- if (isReturnStatement(path))
29
- return false;
30
-
31
- if (isContinueStatement(path))
32
- return false;
33
-
34
- return !isExpressionStatement(path);
35
- };
21
+ const isStatementNotExpression = createTypeChecker([
22
+ '-: -> BlockStatement',
23
+ '-: -> ReturnStatement',
24
+ '-: -> ContinueStatement',
25
+ '+: -> !ExpressionStatement',
26
+ ]);
36
27
 
37
28
  const isInsideNestedBody = createTypeChecker([
38
29
  ['-: -> !', isInsideBlock],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@putout/printer",
3
- "version": "18.49.1",
3
+ "version": "18.49.3",
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",