@putout/printer 18.18.0 → 18.19.0

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,9 @@
1
+ 2026.06.19, v18.19.0
2
+
3
+ feature:
4
+ - ec918867 @putout/printer: @babel/parser v8.0.0
5
+ - 339814ed @putout/printer: TSImportEqualsDeclaration: newline
6
+
1
7
  2026.06.10, v18.18.0
2
8
 
3
9
  feature:
@@ -1,4 +1,3 @@
1
- import {isNext} from '#is';
2
1
  import {printParams} from '#print-params';
3
2
  import {maybePrintTypeAnnotation} from '../maybe/maybe-type-annotation.js';
4
3
 
@@ -12,6 +11,7 @@ export {TSDeclareFunction} from './function/ts-declare-function.js';
12
11
  export {TSDeclareMethod} from './function/ts-declare-method.js';
13
12
  export {TSModuleDeclaration, TSModuleBlock} from './namespace/ts-module-declaration.js';
14
13
  export {TSInterfaceDeclaration} from './interface/ts-interface-declaration.js';
14
+ export {TSImportEqualsDeclaration} from './ts-import-equals-declaration/ts-import-equals-declaration.js';
15
15
  export {TSAsExpression} from './ts-as-expression/ts-as-expression.js';
16
16
  export {TSInterfaceBody} from './interface/ts-interface-body.js';
17
17
  export {TSIntersectionType} from './ts-intersection-type.js';
@@ -151,17 +151,6 @@ export const TSTypePredicate = (path, {print}) => {
151
151
  print('__typeAnnotation');
152
152
  };
153
153
 
154
- export const TSImportEqualsDeclaration = (path, {print, maybe}) => {
155
- maybe.print(path.node.isExport, 'export ');
156
- print('import ');
157
- print('__id');
158
- print.space();
159
- print('=');
160
- print.space();
161
- print('__moduleReference');
162
- print(';');
163
- maybe.print.newline(isNext(path));
164
- };
165
154
  export const TSExternalModuleReference = (path, {print}) => {
166
155
  print('require(');
167
156
  print('__expression');
@@ -0,0 +1,15 @@
1
+ import {isLast} from '#is';
2
+
3
+ export const TSImportEqualsDeclaration = (path, {print, maybe}) => {
4
+ maybe.print(path.node.isExport, 'export ');
5
+ print('import ');
6
+ print('__id');
7
+ print.space();
8
+ print('=');
9
+ print.space();
10
+ print('__moduleReference');
11
+ print(';');
12
+
13
+ if (!isLast(path) && !isLast(path.parentPath))
14
+ print.newline();
15
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@putout/printer",
3
- "version": "18.18.0",
3
+ "version": "18.19.0",
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",
@@ -76,7 +76,7 @@
76
76
  "#comments": "./lib/tokenize/comments/comments.js"
77
77
  },
78
78
  "devDependencies": {
79
- "@babel/parser": "^7.28.5",
79
+ "@babel/parser": "^8.0.0",
80
80
  "@putout/eslint": "^6.0.0",
81
81
  "@putout/eslint-flat": "^4.0.0",
82
82
  "@putout/plugin-minify": "^12.0.0",