@putout/printer 15.28.0 → 16.0.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 +10 -0
- package/lib/tokenize/expressions/import-expression.js +2 -2
- package/lib/tokenize/statements/import-declaration/import-attribute.js +2 -11
- package/lib/tokenize/statements/import-declaration/import-declaration.js +3 -2
- package/lib/tokenize/typescript/ts-import-type.js +2 -4
- package/package.json +5 -5
package/ChangeLog
CHANGED
|
@@ -1,3 +1,13 @@
|
|
|
1
|
+
2025.11.28, v16.0.0
|
|
2
|
+
|
|
3
|
+
feature:
|
|
4
|
+
- 8464bc8 @putout/printer: TSImportType: argument -> source
|
|
5
|
+
- 79e538a @putout/printer: ImportDeclaration: drop support of assertions
|
|
6
|
+
- 4a62b80 @putout/printer: @putout/operate v15.0.0
|
|
7
|
+
- 1876784 @putout/printer: @putout/compare v19.0.1
|
|
8
|
+
- 0a777ac @putout/printer: eslint-plugin-putout v29.0.0
|
|
9
|
+
- b0874ca @putout/printer: @putout/babel v5.0.0
|
|
10
|
+
|
|
1
11
|
2025.11.27, v15.28.0
|
|
2
12
|
|
|
3
13
|
feature:
|
|
@@ -3,12 +3,12 @@
|
|
|
3
3
|
module.exports.ImportExpression = createImportExpression;
|
|
4
4
|
module.exports.createImportExpression = createImportExpression;
|
|
5
5
|
|
|
6
|
-
function createImportExpression(path, printer
|
|
6
|
+
function createImportExpression(path, printer) {
|
|
7
7
|
const {print, maybe} = printer;
|
|
8
8
|
const {options} = path.node;
|
|
9
9
|
|
|
10
10
|
print('import(');
|
|
11
|
-
print(
|
|
11
|
+
print('__source');
|
|
12
12
|
|
|
13
13
|
maybe.print(options, ',');
|
|
14
14
|
maybe.print.space(options);
|
|
@@ -8,16 +8,7 @@ module.exports.ImportAttribute = (path, {print}) => {
|
|
|
8
8
|
print(',');
|
|
9
9
|
};
|
|
10
10
|
|
|
11
|
-
module.exports.
|
|
12
|
-
if (isAssertions(path))
|
|
13
|
-
return printAttributes(path, 'assert', printer);
|
|
14
|
-
|
|
15
|
-
printAttributes(path, 'with', printer);
|
|
16
|
-
};
|
|
17
|
-
|
|
18
|
-
const isAssertions = (path) => path.node.extra?.deprecatedAssertSyntax;
|
|
19
|
-
|
|
20
|
-
function printAttributes(path, keyword, {write, traverse, indent}) {
|
|
11
|
+
module.exports.printAttributes = (path, keyword, {write, traverse, indent}) => {
|
|
21
12
|
const attributes = path.get('attributes');
|
|
22
13
|
|
|
23
14
|
if (!attributes.length)
|
|
@@ -38,4 +29,4 @@ function printAttributes(path, keyword, {write, traverse, indent}) {
|
|
|
38
29
|
|
|
39
30
|
indent.dec();
|
|
40
31
|
write('}');
|
|
41
|
-
}
|
|
32
|
+
};
|
|
@@ -6,8 +6,8 @@ const {markAfter} = require('../../mark');
|
|
|
6
6
|
const {isLast, isNext} = require('../../is');
|
|
7
7
|
|
|
8
8
|
const {
|
|
9
|
-
maybePrintAttributes,
|
|
10
9
|
ImportAttribute,
|
|
10
|
+
printAttributes,
|
|
11
11
|
} = require('./import-attribute');
|
|
12
12
|
|
|
13
13
|
const {
|
|
@@ -102,7 +102,8 @@ module.exports.ImportDeclaration = {
|
|
|
102
102
|
print.space();
|
|
103
103
|
|
|
104
104
|
print('__source');
|
|
105
|
-
|
|
105
|
+
printAttributes(path, 'with', printer);
|
|
106
|
+
|
|
106
107
|
print(';');
|
|
107
108
|
|
|
108
109
|
if (isNext(path))
|
|
@@ -2,8 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
const {createImportExpression} = require('../expressions/import-expression');
|
|
4
4
|
|
|
5
|
-
module.exports.TSImportType = (path, printer
|
|
6
|
-
createImportExpression(path, printer
|
|
7
|
-
source: 'argument',
|
|
8
|
-
});
|
|
5
|
+
module.exports.TSImportType = (path, printer) => {
|
|
6
|
+
createImportExpression(path, printer);
|
|
9
7
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@putout/printer",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "16.0.0",
|
|
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",
|
|
@@ -33,9 +33,9 @@
|
|
|
33
33
|
"report": "madrun report"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@putout/babel": "^
|
|
37
|
-
"@putout/compare": "^
|
|
38
|
-
"@putout/operate": "^
|
|
36
|
+
"@putout/babel": "^5.0.0",
|
|
37
|
+
"@putout/compare": "^19.0.1",
|
|
38
|
+
"@putout/operate": "^15.0.0",
|
|
39
39
|
"@putout/operator-json": "^2.0.0",
|
|
40
40
|
"fullstore": "^3.0.0",
|
|
41
41
|
"just-snake-case": "^3.2.0",
|
|
@@ -81,7 +81,7 @@
|
|
|
81
81
|
"check-dts": "^0.9.0",
|
|
82
82
|
"escover": "^4.0.1",
|
|
83
83
|
"eslint": "^9.0.0",
|
|
84
|
-
"eslint-plugin-putout": "^
|
|
84
|
+
"eslint-plugin-putout": "^29.0.0",
|
|
85
85
|
"estree-to-babel": "^11.0.2",
|
|
86
86
|
"goldstein": "^6.0.1",
|
|
87
87
|
"just-kebab-case": "^4.2.0",
|