@putout/printer 14.8.0 → 15.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 +8 -0
- package/lib/tokenize/expressions/index.js +0 -4
- package/lib/tokenize/expressions/object-expression/object-expression.js +0 -1
- package/lib/tokenize/maybe/index.js +6 -6
- package/lib/tokenize/statements/block-statement/block-statement.js +0 -1
- package/package.json +4 -4
- package/lib/tokenize/expressions/array-expression/tuple-expression.js +0 -10
- package/lib/tokenize/expressions/object-expression/record-expression.js +0 -9
package/ChangeLog
CHANGED
|
@@ -1,3 +1,11 @@
|
|
|
1
|
+
2025.06.01, v15.0.0
|
|
2
|
+
|
|
3
|
+
feature:
|
|
4
|
+
- abb07ed @putout/printer: get rid of Record and Tuple (https://github.com/tc39/proposal-record-tuple/issues/394)
|
|
5
|
+
- 6a5ff0c @putout/printer: @putout/compare v18.0.0
|
|
6
|
+
- 9c147b2 @putout/printer: @putout/plugin-promises v18.0.0
|
|
7
|
+
- 0300161 @putout/printer: @putout/babel v4.0.1
|
|
8
|
+
|
|
1
9
|
2025.05.26, v14.8.0
|
|
2
10
|
|
|
3
11
|
feature:
|
|
@@ -39,8 +39,6 @@ const {BinaryExpression} = require('./binary-expression/binary-expression');
|
|
|
39
39
|
const {LogicalExpression} = require('./logical-expression/logical-expression');
|
|
40
40
|
const {ConditionalExpression} = require('./conditional-expression');
|
|
41
41
|
const {StaticBlock} = require('./class/static-block');
|
|
42
|
-
const {RecordExpression} = require('./object-expression/record-expression');
|
|
43
|
-
const {TupleExpression} = require('./array-expression/tuple-expression');
|
|
44
42
|
const {ImportExpression} = require('./import-expression');
|
|
45
43
|
const {ParenthesizedExpression} = require('./parenthesized-expression/parenthesized-expression');
|
|
46
44
|
|
|
@@ -77,6 +75,4 @@ module.exports = {
|
|
|
77
75
|
ThisExpression(path, {write}) {
|
|
78
76
|
write('this');
|
|
79
77
|
},
|
|
80
|
-
RecordExpression,
|
|
81
|
-
TupleExpression,
|
|
82
78
|
};
|
|
@@ -8,10 +8,10 @@ const maybeSatisfy = require('./satisfy');
|
|
|
8
8
|
const {
|
|
9
9
|
isProgram,
|
|
10
10
|
isFile,
|
|
11
|
-
File,
|
|
12
|
-
ExpressionStatement,
|
|
13
|
-
Program,
|
|
14
11
|
isStatement,
|
|
12
|
+
expressionStatement,
|
|
13
|
+
program,
|
|
14
|
+
file,
|
|
15
15
|
} = types;
|
|
16
16
|
|
|
17
17
|
const isFn = (a) => typeof a === 'function';
|
|
@@ -26,13 +26,13 @@ module.exports.maybeThrow = (a, path, b) => {
|
|
|
26
26
|
}));
|
|
27
27
|
};
|
|
28
28
|
|
|
29
|
-
const maybeStatement = (ast) => isStatement(ast) ? ast :
|
|
29
|
+
const maybeStatement = (ast) => isStatement(ast) ? ast : expressionStatement(ast);
|
|
30
30
|
|
|
31
|
-
const maybeProgram = (ast) => isProgram(ast) ? ast :
|
|
31
|
+
const maybeProgram = (ast) => isProgram(ast) ? ast : program([
|
|
32
32
|
maybeStatement(ast),
|
|
33
33
|
]);
|
|
34
34
|
|
|
35
|
-
module.exports.maybeFile = (ast) => isFile(ast) ? ast :
|
|
35
|
+
module.exports.maybeFile = (ast) => isFile(ast) ? ast : file(maybeProgram(ast));
|
|
36
36
|
|
|
37
37
|
module.exports.maybeVisitor = (plugin, path, printer, options) => {
|
|
38
38
|
if (isFn(plugin))
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@putout/printer",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "15.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,8 +33,8 @@
|
|
|
33
33
|
"report": "madrun report"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@putout/babel": "^
|
|
37
|
-
"@putout/compare": "^
|
|
36
|
+
"@putout/babel": "^4.0.1",
|
|
37
|
+
"@putout/compare": "^18.0.0",
|
|
38
38
|
"@putout/operate": "^13.0.0",
|
|
39
39
|
"@putout/operator-json": "^2.0.0",
|
|
40
40
|
"fullstore": "^3.0.0",
|
|
@@ -72,7 +72,7 @@
|
|
|
72
72
|
"@putout/eslint": "^4.1.0",
|
|
73
73
|
"@putout/plugin-minify": "^10.0.0",
|
|
74
74
|
"@putout/plugin-printer": "^5.0.0",
|
|
75
|
-
"@putout/plugin-promises": "^
|
|
75
|
+
"@putout/plugin-promises": "^18.0.0",
|
|
76
76
|
"@putout/plugin-react-hook-form": "^6.0.0",
|
|
77
77
|
"@putout/plugin-react-hooks": "^8.0.1",
|
|
78
78
|
"acorn": "^8.8.2",
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
const {ArrayExpression} = require('./array-expression');
|
|
4
|
-
const {maybeVisitor} = require('../../maybe');
|
|
5
|
-
|
|
6
|
-
module.exports.TupleExpression = (path, operations, semantics) => {
|
|
7
|
-
const {write} = operations;
|
|
8
|
-
write('#');
|
|
9
|
-
maybeVisitor(ArrayExpression, path, operations, semantics);
|
|
10
|
-
};
|