@platformos/prettier-plugin-liquid 0.0.5 → 0.0.6

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.
@@ -1 +1 @@
1
- export declare const AUGMENTATION_PIPELINE: import("../../types").Augment<import("../../types").WithSiblings>[];
1
+ export declare const AUGMENTATION_PIPELINE: import("../../types").Augment<import("../../types").WithParent & import("../../types").WithSiblings & import("../../types").WithFamily & import("../../types").WithCssProperties>[];
@@ -220,21 +220,7 @@ function printNode(path, options, print, args = {}) {
220
220
  ];
221
221
  }
222
222
  case liquid_html_parser_1.NodeTypes.AssignMarkup: {
223
- const doc = [node.name];
224
- if (node.lookups.length > 0) {
225
- const lookups = path.map((lookupPath) => {
226
- const lookup = lookupPath.getValue();
227
- if (lookup.type === liquid_html_parser_1.NodeTypes.String &&
228
- /^\D/.test(lookup.value) &&
229
- /^[a-z0-9_]+\??$/i.test(lookup.value)) {
230
- return ['.', print(lookupPath)];
231
- }
232
- return ['[', print(lookupPath), ']'];
233
- }, 'lookups');
234
- doc.push(...lookups);
235
- }
236
- doc.push(` ${node.operator} `, path.call((p) => print(p), 'value'));
237
- return doc;
223
+ return [node.name, ' = ', path.call((p) => print(p), 'value')];
238
224
  }
239
225
  case liquid_html_parser_1.NodeTypes.HashAssignMarkup: {
240
226
  return [
@@ -522,39 +508,6 @@ function printNode(path, options, print, args = {}) {
522
508
  case liquid_html_parser_1.NodeTypes.LiquidDocPromptNode: {
523
509
  return (0, liquid_1.printLiquidDocPrompt)(path, options, print, args);
524
510
  }
525
- case liquid_html_parser_1.NodeTypes.JsonHashLiteral: {
526
- if (node.entries.length === 0)
527
- return '{}';
528
- return group([
529
- '{',
530
- indent([
531
- line,
532
- join([',', line], path.map((p) => print(p), 'entries')),
533
- ]),
534
- line,
535
- '}',
536
- ]);
537
- }
538
- case liquid_html_parser_1.NodeTypes.JsonKeyValuePair: {
539
- return [
540
- path.call((p) => print(p), 'key'),
541
- ': ',
542
- path.call((p) => print(p), 'value'),
543
- ];
544
- }
545
- case liquid_html_parser_1.NodeTypes.JsonArrayLiteral: {
546
- if (node.elements.length === 0)
547
- return '[]';
548
- return group([
549
- '[',
550
- indent([
551
- line,
552
- join([',', line], path.map((p) => print(p), 'elements')),
553
- ]),
554
- line,
555
- ']',
556
- ]);
557
- }
558
511
  default: {
559
512
  return (0, utils_1.assertNever)(node);
560
513
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@platformos/prettier-plugin-liquid",
3
- "version": "0.0.5",
3
+ "version": "0.0.6",
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",
@@ -59,7 +59,7 @@
59
59
  "tsconfig-paths": "^3.14.1"
60
60
  },
61
61
  "dependencies": {
62
- "@platformos/liquid-html-parser": "^0.0.5",
62
+ "@platformos/liquid-html-parser": "^0.0.6",
63
63
  "html-styles": "^1.0.0"
64
64
  }
65
65
  }