liquidsoap-prettier 1.5.0 → 1.5.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "liquidsoap-prettier",
3
- "version": "1.5.0",
3
+ "version": "1.5.2",
4
4
  "description": "Liquidsoap language prettier CLI and plugin",
5
5
  "type": "module",
6
6
  "main": "src/index.js",
package/src/dune CHANGED
@@ -1,3 +1,8 @@
1
+ (env
2
+ (dev
3
+ (flags
4
+ (:standard -w -7-9-31 -warn-error -33))))
5
+
1
6
  (executable
2
7
  (name liquidsoap_js)
3
8
  (optional)
@@ -8,4 +13,4 @@
8
13
  (js_of_ocaml
9
14
  (flags --target-env=browser)
10
15
  (build_runtime_flags --target-env=browser))
11
- (libraries js_of_ocaml liquidsoap-lang liquidsoap-lang.tooling))
16
+ (libraries js_of_ocaml liquidsoap-js liquidsoap-lang liquidsoap-lang.tooling))
package/src/index.js CHANGED
@@ -704,18 +704,29 @@ const print = (path, options, print) => {
704
704
  return group([
705
705
  "try",
706
706
  indent(group([line, print("body")], { shouldBreak: true })),
707
- line,
708
- group([
709
- "catch",
710
- line,
711
- node.variable,
712
- ...(node.errors_list
713
- ? [group([line, ":", line, print("errors_list")])]
714
- : []),
715
- line,
716
- "do",
717
- ]),
718
- indent(group([line, print("handler")], { shouldBreak: true })),
707
+ ...(node.handler
708
+ ? [
709
+ line,
710
+ group([
711
+ "catch",
712
+ line,
713
+ node.variable,
714
+ ...(node.errors_list
715
+ ? [group([line, ":", line, print("errors_list")])]
716
+ : []),
717
+ line,
718
+ "do",
719
+ ]),
720
+ indent(group([line, print("handler")], { shouldBreak: true })),
721
+ ]
722
+ : []),
723
+ ...(node.finally
724
+ ? [
725
+ line,
726
+ group(["finally", line]),
727
+ indent(group([line, print("finally")], { shouldBreak: true })),
728
+ ]
729
+ : []),
719
730
  line,
720
731
  "end",
721
732
  ]);