@putout/printer 1.103.0 → 1.104.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
package/README.md
CHANGED
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
const {exists} = require('../is');
|
|
4
|
+
|
|
4
5
|
module.exports.ClassProperty = ClassProperty;
|
|
5
6
|
|
|
6
7
|
module.exports.ClassPrivateProperty = (path, {print}) => {
|
|
7
|
-
ClassProperty(path, {
|
|
8
|
+
ClassProperty(path, {
|
|
9
|
+
print,
|
|
10
|
+
});
|
|
8
11
|
};
|
|
9
12
|
|
|
10
13
|
module.exports.PrivateName = (path, {print}) => {
|
|
@@ -23,11 +23,13 @@ const {
|
|
|
23
23
|
} = require('./object-expression');
|
|
24
24
|
|
|
25
25
|
const {ObjectPattern} = require('./object-pattern');
|
|
26
|
+
|
|
26
27
|
const {
|
|
27
28
|
ClassProperty,
|
|
28
29
|
ClassPrivateProperty,
|
|
29
30
|
PrivateName,
|
|
30
31
|
} = require('./class-property');
|
|
32
|
+
|
|
31
33
|
const {AssignmentExpression} = require('./assignment-expression');
|
|
32
34
|
const {ArrayExpression} = require('./array-expression');
|
|
33
35
|
const {ArrayPattern} = require('./array-pattern');
|
package/lib/tokenize/tokenize.js
CHANGED
|
@@ -52,6 +52,7 @@ function initFormat(format) {
|
|
|
52
52
|
newline: '\n',
|
|
53
53
|
space: ' ',
|
|
54
54
|
comments: true,
|
|
55
|
+
splitter: '\n',
|
|
55
56
|
...format,
|
|
56
57
|
};
|
|
57
58
|
}
|
|
@@ -102,6 +103,13 @@ module.exports.tokenize = (ast, overrides = {}) => {
|
|
|
102
103
|
dec: decIndent,
|
|
103
104
|
});
|
|
104
105
|
|
|
106
|
+
const splitter = () => {
|
|
107
|
+
addToken({
|
|
108
|
+
type: TYPES.SPLITTER,
|
|
109
|
+
value: format.splitter,
|
|
110
|
+
});
|
|
111
|
+
};
|
|
112
|
+
|
|
105
113
|
const linebreak = () => {
|
|
106
114
|
indent();
|
|
107
115
|
newline();
|
|
@@ -132,6 +140,7 @@ module.exports.tokenize = (ast, overrides = {}) => {
|
|
|
132
140
|
linebreak,
|
|
133
141
|
breakline,
|
|
134
142
|
space,
|
|
143
|
+
splitter,
|
|
135
144
|
});
|
|
136
145
|
|
|
137
146
|
assign(maybeWrite, {
|
package/lib/types.js
CHANGED
package/package.json
CHANGED