@putout/printer 17.0.1 → 17.0.2
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 +5 -0
- package/lib/tokenize/comment/parse-comments.js +1 -1
- package/lib/tokenize/comment/parse-leading-comments.js +1 -1
- package/lib/tokenize/comment/parse-trailing-comments.js +1 -1
- package/lib/tokenize/expressions/array-expression/indent.js +1 -1
- package/lib/tokenize/expressions/array-expression/is-object-after-simple.js +1 -1
- package/lib/tokenize/expressions/array-expression/newline.js +1 -1
- package/lib/tokenize/expressions/call-expression/call-expression.js +1 -1
- package/lib/tokenize/expressions/class/class-property.js +1 -1
- package/lib/tokenize/expressions/class/class.js +1 -1
- package/lib/tokenize/expressions/function/arrow-function-expression.js +1 -1
- package/lib/tokenize/expressions/function/class-method.js +1 -1
- package/lib/tokenize/expressions/function/function-declaration.js +1 -1
- package/lib/tokenize/expressions/function/function-expression.js +1 -1
- package/lib/tokenize/expressions/function/object-method.js +1 -1
- package/lib/tokenize/expressions/function/print-function-params.js +1 -1
- package/lib/tokenize/expressions/member-expression/chain.js +1 -1
- package/lib/tokenize/expressions/member-expression/is-looks-like-chain.js +1 -1
- package/lib/tokenize/expressions/new-expression/new-expression.js +1 -1
- package/lib/tokenize/expressions/object-expression/object-expression.js +2 -2
- package/lib/tokenize/expressions/object-pattern/object-pattern.js +2 -2
- package/lib/tokenize/expressions/spread-element.js +1 -1
- package/lib/tokenize/expressions/unary-expression/unary-expressions.js +1 -1
- package/lib/tokenize/jsx/jsx-attribute.js +1 -1
- package/lib/tokenize/jsx/jsx-opening-element.js +1 -1
- package/lib/tokenize/maybe/satisfy.js +1 -1
- package/lib/tokenize/statements/block-statement/block-statement.js +3 -3
- package/lib/tokenize/statements/block-statement/inside-if-with-no-body.js +1 -1
- package/lib/tokenize/statements/break-statement/break-statement.js +1 -1
- package/lib/tokenize/statements/continue-statement/continue-statement.js +1 -1
- package/lib/tokenize/statements/debugger-statement.js +1 -1
- package/lib/tokenize/statements/export-declaration/export-declaration.js +7 -7
- package/lib/tokenize/statements/export-declaration/export-default-declaration.js +1 -1
- package/lib/tokenize/statements/expression-statement/expression-statement.js +1 -1
- package/lib/tokenize/statements/for-of-statement/for-of-statement.js +5 -5
- package/lib/tokenize/statements/for-statement.js +1 -2
- package/lib/tokenize/statements/if-statement/if-statement.js +2 -2
- package/lib/tokenize/statements/import-declaration/import-declaration.js +3 -3
- package/lib/tokenize/statements/labeled-statement/labeled-statement.js +1 -1
- package/lib/tokenize/statements/program/program.js +1 -1
- package/lib/tokenize/statements/return-statement/return-statement.js +2 -2
- package/lib/tokenize/statements/try-statement/try-statements.js +1 -1
- package/lib/tokenize/statements/variable-declaration/variable-declaration.js +2 -2
- package/lib/tokenize/typescript/enum/ts-enum-declaration.js +1 -1
- package/lib/tokenize/typescript/function/ts-declare-function.js +1 -1
- package/lib/tokenize/typescript/interface/ts-interface-declaration.js +1 -1
- package/lib/tokenize/typescript/ts-export-assignment/ts-export-assignment.js +1 -1
- package/lib/tokenize/typescript/ts-parameter-property/ts-parameter-property.js +1 -1
- package/lib/tokenize/typescript/ts-property-signature/ts-property-signature.js +2 -2
- package/lib/tokenize/typescript/type/ts-type-alias-declaration.js +1 -1
- package/lib/tokenize/typescript/type/ts-type-parameter.js +1 -1
- package/package.json +1 -1
package/ChangeLog
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {exists} from '
|
|
1
|
+
import {exists} from '#is';
|
|
2
2
|
import {maybePrintTypeAnnotation} from '../../maybe/maybe-type-annotation.js';
|
|
3
3
|
import {maybeDecorators} from '../../maybe/maybe-decorators.js';
|
|
4
4
|
import {printKey} from '../object-expression/print-key.js';
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import {types} from '@putout/babel';
|
|
2
|
-
import {parseComments} from '../../comment/comment.js';
|
|
3
2
|
import {
|
|
4
3
|
isCoupleLines,
|
|
5
4
|
isForOf,
|
|
@@ -9,7 +8,8 @@ import {
|
|
|
9
8
|
noLeadingComment,
|
|
10
9
|
hasLeadingComment,
|
|
11
10
|
exists,
|
|
12
|
-
} from '
|
|
11
|
+
} from '#is';
|
|
12
|
+
import {parseComments} from '../../comment/comment.js';
|
|
13
13
|
import {isInsideTuple} from './is-inside-tuple.js';
|
|
14
14
|
import {isLooksLikeChain} from '../member-expression/is-looks-like-chain.js';
|
|
15
15
|
import {isThirdObjectInsideArray} from './is-third-object-inside-array.js';
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {types} from '@putout/babel';
|
|
2
|
-
import {wrongShorthand} from './wrong-shorthand.js';
|
|
3
2
|
import {
|
|
4
3
|
isForOf,
|
|
5
4
|
isCoupleLines,
|
|
6
5
|
exists,
|
|
7
|
-
} from '
|
|
6
|
+
} from '#is';
|
|
7
|
+
import {wrongShorthand} from './wrong-shorthand.js';
|
|
8
8
|
import {moreThenMaxPropertiesInOneLine} from './more-then-max-properties-in-one-line.js';
|
|
9
9
|
import {maybeTypeAnnotation} from '../../maybe/maybe-type-annotation.js';
|
|
10
10
|
import {moreThenMaxPropertiesLengthInOneLine} from './more-then-max-properties-length-in-one-line.js';
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {types} from '@putout/babel';
|
|
2
|
-
import {markAfter} from '../../mark.js';
|
|
3
|
-
import {parseComments} from '../../comment/comment.js';
|
|
4
2
|
import {
|
|
5
3
|
isNext,
|
|
6
4
|
isParentProgram,
|
|
7
5
|
isLast,
|
|
8
6
|
exists,
|
|
9
7
|
satisfy,
|
|
10
|
-
} from '
|
|
8
|
+
} from '#is';
|
|
9
|
+
import {markAfter} from '../../mark.js';
|
|
10
|
+
import {parseComments} from '../../comment/comment.js';
|
|
11
11
|
import {insideIfWithNoBody} from './inside-if-with-no-body.js';
|
|
12
12
|
import {getDirectives} from './get-directives.js';
|
|
13
13
|
import {isCallInsideChain} from './is-call-inside-chain.js';
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import {types} from '@putout/babel';
|
|
2
|
-
import {isParentBlock} from '#is';
|
|
3
|
-
import {
|
|
4
|
-
markAfter,
|
|
5
|
-
isMarkedAfter,
|
|
6
|
-
hasPrevNewline,
|
|
7
|
-
} from '../../mark.js';
|
|
8
2
|
import {
|
|
3
|
+
isParentBlock,
|
|
9
4
|
isNewlineBetweenSiblings,
|
|
10
5
|
exists,
|
|
11
6
|
isNext,
|
|
12
7
|
isLast,
|
|
13
|
-
} from '
|
|
8
|
+
} from '#is';
|
|
9
|
+
import {
|
|
10
|
+
markAfter,
|
|
11
|
+
isMarkedAfter,
|
|
12
|
+
hasPrevNewline,
|
|
13
|
+
} from '../../mark.js';
|
|
14
14
|
|
|
15
15
|
const {
|
|
16
16
|
isExportNamespaceSpecifier,
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
+
import {
|
|
2
|
+
isFirst,
|
|
3
|
+
isNext,
|
|
4
|
+
isLast,
|
|
5
|
+
} from '#is';
|
|
1
6
|
import {
|
|
2
7
|
hasPrevNewline,
|
|
3
8
|
markAfter,
|
|
4
9
|
markBefore,
|
|
5
10
|
isMarkedAfter,
|
|
6
11
|
} from '../../mark.js';
|
|
7
|
-
import {
|
|
8
|
-
isFirst,
|
|
9
|
-
isNext,
|
|
10
|
-
isLast,
|
|
11
|
-
} from '../../is.js';
|
|
12
12
|
|
|
13
13
|
export const ForOfStatement = {
|
|
14
14
|
beforeIf(path) {
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import {parseImportSpecifiers} from 'parse-import-specifiers';
|
|
2
|
+
import {isLast, isNext} from '#is';
|
|
2
3
|
import {markAfter} from '../../mark.js';
|
|
3
|
-
import {isLast, isNext} from '../../is.js';
|
|
4
4
|
import {printAttributes} from './import-attribute.js';
|
|
5
|
-
|
|
6
|
-
export {ImportAttribute} from './import-attribute.js';
|
|
7
5
|
import {
|
|
8
6
|
printTrailingCommentBlock,
|
|
9
7
|
printTrailingCommentLine,
|
|
10
8
|
} from './import-declaration-comments.js';
|
|
11
9
|
|
|
10
|
+
export {ImportAttribute} from './import-attribute.js';
|
|
11
|
+
|
|
12
12
|
export const ImportDeclaration = {
|
|
13
13
|
print(path, printer, semantics) {
|
|
14
14
|
const {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import {hasCoupleTrailingComments} from '#is';
|
|
1
2
|
import {parseComments} from '../../comment/comment.js';
|
|
2
3
|
import {getDirectives} from '../block-statement/get-directives.js';
|
|
3
|
-
import {hasCoupleTrailingComments} from '../../is.js';
|
|
4
4
|
|
|
5
5
|
export const Program = (path, printer, semantics) => {
|
|
6
6
|
const {body} = path.node;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {types} from '@putout/babel';
|
|
2
|
-
import {isInsideLabel} from '#is';
|
|
3
2
|
import {
|
|
3
|
+
isInsideLabel,
|
|
4
4
|
isPrevBody,
|
|
5
5
|
noTrailingComment,
|
|
6
6
|
isLast,
|
|
7
|
-
} from '
|
|
7
|
+
} from '#is';
|
|
8
8
|
import {hasPrevNewline} from '../../mark.js';
|
|
9
9
|
import {maybeSpaceAfterKeyword} from './maybe-space-after-keyword.js';
|
|
10
10
|
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {types} from '@putout/babel';
|
|
2
|
-
import {hasPrevNewline} from '../../mark.js';
|
|
3
2
|
import {
|
|
4
3
|
isNext,
|
|
5
4
|
isCoupleLines,
|
|
6
5
|
isNewlineBetweenSiblings,
|
|
7
6
|
exists,
|
|
8
7
|
noTrailingComment,
|
|
9
|
-
} from '
|
|
8
|
+
} from '#is';
|
|
9
|
+
import {hasPrevNewline} from '../../mark.js';
|
|
10
10
|
import {maybeSpaceAfterKeyword} from './maybe-space-after-keyword.js';
|
|
11
11
|
import {isConcatenation} from '../../expressions/binary-expression/concatenate.js';
|
|
12
12
|
import {parseLeadingComments} from '../../comment/comment.js';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {maybePrintTypeAnnotation} from '../../maybe/maybe-type-annotation.js';
|
|
2
1
|
import {
|
|
3
2
|
hasTrailingComment,
|
|
4
3
|
isNext,
|
|
5
|
-
} from '
|
|
4
|
+
} from '#is';
|
|
5
|
+
import {maybePrintTypeAnnotation} from '../../maybe/maybe-type-annotation.js';
|
|
6
6
|
import {printKey} from '../../expressions/object-expression/print-key.js';
|
|
7
7
|
import {
|
|
8
8
|
printLeadingCommentLine,
|
package/package.json
CHANGED