@putout/printer 1.81.4 → 1.82.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/functions/function-declaration.js +6 -4
- package/lib/tokenize/expressions/object-pattern.js +0 -1
- package/lib/tokenize/statements/export-declaration/export-all-declaration.js +7 -0
- package/lib/tokenize/statements/{export-declarations.js → export-declaration/export-declaration.js} +2 -2
- package/lib/tokenize/statements/{export-default-declaration.js → export-declaration/export-default-declaration.js} +1 -1
- package/lib/tokenize/statements/index.js +5 -2
- package/package.json +1 -1
package/ChangeLog
CHANGED
|
@@ -1,3 +1,13 @@
|
|
|
1
|
+
2023.05.07, v1.82.0
|
|
2
|
+
|
|
3
|
+
feature:
|
|
4
|
+
- 55727fa @putout/printer: add support of ExportAllDeclaration
|
|
5
|
+
|
|
6
|
+
2023.05.05, v1.81.5
|
|
7
|
+
|
|
8
|
+
feature:
|
|
9
|
+
- b8367bc @putout/printer: improve support of newline in FunctionDeclaration inside of ExportDeclaration
|
|
10
|
+
|
|
1
11
|
2023.05.04, v1.81.4
|
|
2
12
|
|
|
3
13
|
feature:
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
const {markAfter} = require('../../mark');
|
|
4
|
-
|
|
4
|
+
|
|
5
|
+
const {
|
|
6
|
+
isNext,
|
|
7
|
+
isNextParent,
|
|
8
|
+
} = require('../../is');
|
|
5
9
|
|
|
6
10
|
module.exports.FunctionDeclaration = {
|
|
7
11
|
print(path, {print, maybe}) {
|
|
@@ -27,9 +31,7 @@ module.exports.FunctionDeclaration = {
|
|
|
27
31
|
print(') ');
|
|
28
32
|
print('__body');
|
|
29
33
|
},
|
|
30
|
-
afterSatisfy: () => [
|
|
31
|
-
isNext,
|
|
32
|
-
],
|
|
34
|
+
afterSatisfy: () => [isNext, isNextParent],
|
|
33
35
|
after(path, {write}) {
|
|
34
36
|
write.newline();
|
|
35
37
|
markAfter(path);
|
package/lib/tokenize/statements/{export-declarations.js → export-declaration/export-declaration.js}
RENAMED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const {isNewlineBetweenSiblings} = require('
|
|
3
|
+
const {isNewlineBetweenSiblings} = require('../../is');
|
|
4
4
|
|
|
5
5
|
const {
|
|
6
6
|
markAfter,
|
|
7
7
|
isMarkedAfter,
|
|
8
|
-
} = require('
|
|
8
|
+
} = require('../../mark');
|
|
9
9
|
|
|
10
10
|
const isDeclarationNewline = (path) => isMarkedAfter(path.get('declaration'));
|
|
11
11
|
|
|
@@ -10,11 +10,13 @@ const TryStatements = require('./try-statements');
|
|
|
10
10
|
const {DebuggerStatement} = require('./debugger-statement');
|
|
11
11
|
const {ForStatement} = require('./for-statement');
|
|
12
12
|
const importDeclarations = require('./import-declaration/import-declaration');
|
|
13
|
-
const exportDeclarations = require('./export-
|
|
13
|
+
const exportDeclarations = require('./export-declaration/export-declaration');
|
|
14
|
+
const {ExportAllDeclaration} = require('./export-declaration/export-all-declaration');
|
|
15
|
+
|
|
14
16
|
const {WhileStatement} = require('./while-statement');
|
|
15
17
|
const {SwitchStatement} = require('./switch-statement');
|
|
16
18
|
const {ForInStatement} = require('./for-in-statement');
|
|
17
|
-
const {ExportDefaultDeclaration} = require('./export-default-declaration');
|
|
19
|
+
const {ExportDefaultDeclaration} = require('./export-declaration/export-default-declaration');
|
|
18
20
|
const {BreakStatement} = require('./break-statement');
|
|
19
21
|
|
|
20
22
|
const {
|
|
@@ -30,6 +32,7 @@ module.exports = {
|
|
|
30
32
|
ExportSpecifier,
|
|
31
33
|
ExportNamespaceSpecifier,
|
|
32
34
|
ExportDefaultDeclaration,
|
|
35
|
+
ExportAllDeclaration,
|
|
33
36
|
VariableDeclaration,
|
|
34
37
|
IfStatement,
|
|
35
38
|
ForStatement,
|
package/package.json
CHANGED