@platformos/prettier-plugin-liquid 0.0.6 → 0.0.7
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/dist/plugin.js +0 -6
- package/dist/printer/embed.js +2 -3
- package/dist/printer/preprocess/augment-with-siblings.d.ts +4 -4
- package/dist/printer/preprocess/index.d.ts +1 -1
- package/dist/printer/print/children.d.ts +1 -1
- package/dist/printer/print/liquid.d.ts +1 -1
- package/dist/printer/print/tag.d.ts +1 -1
- package/package.json +6 -5
- package/standalone.d.ts +2 -0
- package/standalone.js +1112 -957
package/dist/plugin.js
CHANGED
|
@@ -28,42 +28,36 @@ const options = {
|
|
|
28
28
|
],
|
|
29
29
|
category: 'LIQUID',
|
|
30
30
|
default: 'strict',
|
|
31
|
-
since: '1.5.0',
|
|
32
31
|
},
|
|
33
32
|
liquidSingleQuote: {
|
|
34
33
|
type: 'boolean',
|
|
35
34
|
category: 'LIQUID',
|
|
36
35
|
default: true,
|
|
37
36
|
description: 'Use single quotes instead of double quotes in Liquid tags and objects.',
|
|
38
|
-
since: '0.2.0',
|
|
39
37
|
},
|
|
40
38
|
embeddedSingleQuote: {
|
|
41
39
|
type: 'boolean',
|
|
42
40
|
category: 'LIQUID',
|
|
43
41
|
default: true,
|
|
44
42
|
description: 'Use single quotes instead of double quotes in embedded languages (JavaScript, CSS, TypeScript inside <script>, <style> or Liquid equivalent).',
|
|
45
|
-
since: '0.4.0',
|
|
46
43
|
},
|
|
47
44
|
singleLineLinkTags: {
|
|
48
45
|
type: 'boolean',
|
|
49
46
|
category: 'HTML',
|
|
50
47
|
default: false,
|
|
51
48
|
description: 'Always print link tags on a single line to remove clutter',
|
|
52
|
-
since: '0.1.0',
|
|
53
49
|
},
|
|
54
50
|
indentSchema: {
|
|
55
51
|
type: 'boolean',
|
|
56
52
|
category: 'LIQUID',
|
|
57
53
|
default: false,
|
|
58
54
|
description: 'Indent the contents of the {% schema %} tag',
|
|
59
|
-
since: '0.1.0',
|
|
60
55
|
},
|
|
61
56
|
liquidDocParamDash: {
|
|
62
57
|
type: 'boolean',
|
|
63
58
|
category: 'LIQUID',
|
|
64
59
|
default: true,
|
|
65
60
|
description: 'Append a dash (-) to separate descriptions in {% doc %} @param annotations',
|
|
66
|
-
since: '1.6.4',
|
|
67
61
|
},
|
|
68
62
|
};
|
|
69
63
|
const defaultOptions = {
|
package/dist/printer/embed.js
CHANGED
|
@@ -17,7 +17,7 @@ exports.ParserMap = {
|
|
|
17
17
|
// Prettier 2 and 3 have a slightly different API for embed.
|
|
18
18
|
//
|
|
19
19
|
// https://github.com/prettier/prettier/wiki/How-to-migrate-my-plugin-to-support-Prettier-v3%3F
|
|
20
|
-
|
|
20
|
+
exports.embed2 = ((path, _print, textToDoc, options) => {
|
|
21
21
|
const node = path.getValue();
|
|
22
22
|
switch (node.type) {
|
|
23
23
|
case liquid_html_parser_1.NodeTypes.RawMarkup: {
|
|
@@ -40,8 +40,7 @@ const embed2 = (path, _print, textToDoc, options) => {
|
|
|
40
40
|
default:
|
|
41
41
|
return null;
|
|
42
42
|
}
|
|
43
|
-
};
|
|
44
|
-
exports.embed2 = embed2;
|
|
43
|
+
});
|
|
45
44
|
const embed3 = (path, options) => {
|
|
46
45
|
return (textToDoc) => {
|
|
47
46
|
const node = path.node;
|
|
@@ -730,8 +730,8 @@ export declare function prev(node: AugmentedNode<WithParent>): ({
|
|
|
730
730
|
position: import("@platformos/liquid-html-parser").Position;
|
|
731
731
|
source: string;
|
|
732
732
|
} & WithParent) | ({
|
|
733
|
-
keyword: import("
|
|
734
|
-
value: import("
|
|
733
|
+
keyword: import("../../../../liquid-html-parser/src/stage-1-cst").ConcreteLiquidLiteral["keyword"];
|
|
734
|
+
value: import("../../../../liquid-html-parser/src/stage-1-cst").ConcreteLiquidLiteral["value"];
|
|
735
735
|
type: import("@platformos/liquid-html-parser").NodeTypes.LiquidLiteral;
|
|
736
736
|
position: import("@platformos/liquid-html-parser").Position;
|
|
737
737
|
source: string;
|
|
@@ -1680,8 +1680,8 @@ export declare function next(node: AugmentedNode<WithParent>): ({
|
|
|
1680
1680
|
position: import("@platformos/liquid-html-parser").Position;
|
|
1681
1681
|
source: string;
|
|
1682
1682
|
} & WithParent) | ({
|
|
1683
|
-
keyword: import("
|
|
1684
|
-
value: import("
|
|
1683
|
+
keyword: import("../../../../liquid-html-parser/src/stage-1-cst").ConcreteLiquidLiteral["keyword"];
|
|
1684
|
+
value: import("../../../../liquid-html-parser/src/stage-1-cst").ConcreteLiquidLiteral["value"];
|
|
1685
1685
|
type: import("@platformos/liquid-html-parser").NodeTypes.LiquidLiteral;
|
|
1686
1686
|
position: import("@platformos/liquid-html-parser").Position;
|
|
1687
1687
|
source: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const AUGMENTATION_PIPELINE: import("../../types").Augment<import("../../types").
|
|
1
|
+
export declare const AUGMENTATION_PIPELINE: import("../../types").Augment<import("../../types").WithSiblings>[];
|
|
@@ -3,4 +3,4 @@ import { AstPath, LiquidHtmlNode, LiquidParserOptions, LiquidPrinter, LiquidPrin
|
|
|
3
3
|
export type HasChildren = Extract<LiquidHtmlNode, {
|
|
4
4
|
children?: LiquidHtmlNode[];
|
|
5
5
|
}>;
|
|
6
|
-
export declare function printChildren(path: AstPath<HasChildren>, options: LiquidParserOptions, print: LiquidPrinter, args: LiquidPrinterArgs): (doc.builders.BreakParent | (string | any[] | doc.builders.
|
|
6
|
+
export declare function printChildren(path: AstPath<HasChildren>, options: LiquidParserOptions, print: LiquidPrinter, args: LiquidPrinterArgs): (doc.builders.BreakParent | (string | any[] | doc.builders.Align | doc.builders.BreakParent | doc.builders.Cursor | doc.builders.Fill | doc.builders.Group | doc.builders.IfBreak | doc.builders.Indent | doc.builders.IndentIfBreak | doc.builders.Label | doc.builders.Line | doc.builders.LineSuffix | doc.builders.LineSuffixBoundary | doc.builders.Trim)[])[];
|
|
@@ -6,7 +6,7 @@ export declare function printLiquidBlockStart(path: AstPath<LiquidTag | LiquidBr
|
|
|
6
6
|
export declare function printLiquidBlockEnd(path: AstPath<LiquidTag>, _options: LiquidParserOptions, _print: LiquidPrinter, args?: LiquidPrinterArgs): Doc;
|
|
7
7
|
export declare function printLiquidTag(path: AstPath<LiquidTag>, options: LiquidParserOptions, print: LiquidPrinter, args: LiquidPrinterArgs): Doc;
|
|
8
8
|
export declare function printLiquidRawTag(path: AstPath<LiquidRawTag>, options: LiquidParserOptions, print: LiquidPrinter, { isLiquidStatement }: LiquidPrinterArgs): Doc;
|
|
9
|
-
export declare function printLiquidDoc(path: AstPath<RawMarkup>, _options: LiquidParserOptions, print: LiquidPrinter, _args: LiquidPrinterArgs): (doc.builders.
|
|
9
|
+
export declare function printLiquidDoc(path: AstPath<RawMarkup>, _options: LiquidParserOptions, print: LiquidPrinter, _args: LiquidPrinterArgs): (doc.builders.Indent | doc.builders.Hardline)[];
|
|
10
10
|
export declare function printLiquidDocParam(path: AstPath<LiquidDocParamNode>, options: LiquidParserOptions, _print: LiquidPrinter, _args: LiquidPrinterArgs): Doc;
|
|
11
11
|
export declare function printLiquidDocExample(path: AstPath<LiquidDocExampleNode>, options: LiquidParserOptions, _print: LiquidPrinter, _args: LiquidPrinterArgs): Doc;
|
|
12
12
|
export declare function printLiquidDocDescription(path: AstPath<LiquidDocDescriptionNode>, options: LiquidParserOptions, _print: LiquidPrinter, _args: LiquidPrinterArgs): Doc;
|
|
@@ -6,7 +6,7 @@ export declare function needsToBorrowLastChildClosingTagEndMarker(node: LiquidHt
|
|
|
6
6
|
export declare function needsToBorrowParentClosingTagStartMarker(node: LiquidHtmlNode): boolean;
|
|
7
7
|
export declare function needsToBorrowNextOpeningTagStartMarker(node: LiquidHtmlNode): boolean | undefined;
|
|
8
8
|
export declare function needsToBorrowParentOpeningTagEndMarker(node: LiquidHtmlNode): boolean;
|
|
9
|
-
export declare function printOpeningTag(path: AstPath<HtmlNode>, options: LiquidParserOptions, print: LiquidPrinter, attrGroupId: symbol): (string | (string | doc.builders.
|
|
9
|
+
export declare function printOpeningTag(path: AstPath<HtmlNode>, options: LiquidParserOptions, print: LiquidPrinter, attrGroupId: symbol): (string | (string | doc.builders.Indent | doc.builders.Line)[])[];
|
|
10
10
|
export declare function printOpeningTagStart(node: LiquidHtmlNode, options: LiquidParserOptions): string[] | "";
|
|
11
11
|
export declare function printOpeningTagPrefix(node: LiquidHtmlNode, options: LiquidParserOptions): "" | "-->" | ">" | "/>";
|
|
12
12
|
export declare function printOpeningTagStartMarker(node: LiquidHtmlNode | undefined): string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@platformos/prettier-plugin-liquid",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.7",
|
|
4
4
|
"description": "Prettier Liquid/HTML plugin for platformOS",
|
|
5
5
|
"author": "platformOS",
|
|
6
6
|
"homepage": "https://github.com/Platform-OS/platformos-tools/tree/master/packages/prettier-plugin-liquid#readme",
|
|
@@ -51,15 +51,16 @@
|
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|
|
53
53
|
"@types/prettier": "^2.4.2",
|
|
54
|
-
"
|
|
55
|
-
"
|
|
54
|
+
"prettier": "npm:prettier@^2.6.1",
|
|
55
|
+
"cross-env": "^10.1.0",
|
|
56
|
+
"module-alias": "^2.3.4",
|
|
56
57
|
"prettier2": "npm:prettier@^2.6.1",
|
|
57
58
|
"prettier3": "npm:prettier@^3.0.0",
|
|
58
59
|
"source-map-support": "^0.5.21",
|
|
59
|
-
"tsconfig-paths": "^
|
|
60
|
+
"tsconfig-paths": "^4.2.0"
|
|
60
61
|
},
|
|
61
62
|
"dependencies": {
|
|
62
|
-
"@platformos/liquid-html-parser": "^0.0.
|
|
63
|
+
"@platformos/liquid-html-parser": "^0.0.7",
|
|
63
64
|
"html-styles": "^1.0.0"
|
|
64
65
|
}
|
|
65
66
|
}
|
package/standalone.d.ts
ADDED