marko 6.0.71 → 6.0.73

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/debug/dom.js CHANGED
@@ -1004,7 +1004,7 @@ function _if_closure(valueAccessor, ownerConditionalNodeAccessor, branch, fn) {
1004
1004
  const branchAccessor = "ConditionalRenderer:" /* ConditionalRenderer */ + ownerConditionalNodeAccessor;
1005
1005
  const ownerSignal = (scope) => {
1006
1006
  const ifScope = scope[scopeAccessor];
1007
- if (ifScope && !ifScope.___creating && scope[branchAccessor] === branch) {
1007
+ if (ifScope && !ifScope.___creating && (scope[branchAccessor] ?? branch) === branch) {
1008
1008
  queueRender(ifScope, childSignal, -1);
1009
1009
  }
1010
1010
  };
@@ -905,7 +905,7 @@ function _if_closure(valueAccessor, ownerConditionalNodeAccessor, branch, fn) {
905
905
  const branchAccessor = "ConditionalRenderer:" /* ConditionalRenderer */ + ownerConditionalNodeAccessor;
906
906
  const ownerSignal = (scope) => {
907
907
  const ifScope = scope[scopeAccessor];
908
- if (ifScope && !ifScope.___creating && scope[branchAccessor] === branch) {
908
+ if (ifScope && !ifScope.___creating && (scope[branchAccessor] ?? branch) === branch) {
909
909
  queueRender(ifScope, childSignal, -1);
910
910
  }
911
911
  };
@@ -1043,7 +1043,9 @@ function writePromise(state, val, ref) {
1043
1043
  if (!boundary) return false;
1044
1044
  const pId = nextRefAccess(state);
1045
1045
  const pRef = new Reference(ref, null, state.flush, null, pId);
1046
- state.buf.push("new Promise((f,r)=>" + pId + "={f,r})");
1046
+ state.buf.push(
1047
+ "(p=>p=new Promise((f,r)=>" + pId + "={f,r(e){p.catch(_=>0);r(e)}}))()"
1048
+ );
1047
1049
  val.then(
1048
1050
  (v) => writeAsyncCall(state, boundary, pRef, "f", v, pId),
1049
1051
  (v) => writeAsyncCall(state, boundary, pRef, "r", v, pId)
@@ -957,7 +957,9 @@ function writePromise(state, val, ref) {
957
957
  if (!boundary) return false;
958
958
  const pId = nextRefAccess(state);
959
959
  const pRef = new Reference(ref, null, state.flush, null, pId);
960
- state.buf.push("new Promise((f,r)=>" + pId + "={f,r})");
960
+ state.buf.push(
961
+ "(p=>p=new Promise((f,r)=>" + pId + "={f,r(e){p.catch(_=>0);r(e)}}))()"
962
+ );
961
963
  val.then(
962
964
  (v) => writeAsyncCall(state, boundary, pRef, "f", v, pId),
963
965
  (v) => writeAsyncCall(state, boundary, pRef, "r", v, pId)
package/dist/dom.js CHANGED
@@ -643,7 +643,7 @@ function _for_closure(valueAccessor, ownerLoopNodeAccessor, fn) {
643
643
  function _if_closure(valueAccessor, ownerConditionalNodeAccessor, branch, fn) {
644
644
  let childSignal = closure(valueAccessor, fn), scopeAccessor = "d" /* ConditionalScope */ + ownerConditionalNodeAccessor, branchAccessor = "c" /* ConditionalRenderer */ + ownerConditionalNodeAccessor, ownerSignal = (scope) => {
645
645
  let ifScope = scope[scopeAccessor];
646
- ifScope && !ifScope.q && scope[branchAccessor] === branch && queueRender(ifScope, childSignal, -1);
646
+ ifScope && !ifScope.q && (scope[branchAccessor] ?? branch) === branch && queueRender(ifScope, childSignal, -1);
647
647
  };
648
648
  return ownerSignal._ = childSignal, ownerSignal;
649
649
  }
package/dist/dom.mjs CHANGED
@@ -547,7 +547,7 @@ function _for_closure(valueAccessor, ownerLoopNodeAccessor, fn) {
547
547
  function _if_closure(valueAccessor, ownerConditionalNodeAccessor, branch, fn) {
548
548
  let childSignal = closure(valueAccessor, fn), scopeAccessor = "d" /* ConditionalScope */ + ownerConditionalNodeAccessor, branchAccessor = "c" /* ConditionalRenderer */ + ownerConditionalNodeAccessor, ownerSignal = (scope) => {
549
549
  let ifScope = scope[scopeAccessor];
550
- ifScope && !ifScope.q && scope[branchAccessor] === branch && queueRender(ifScope, childSignal, -1);
550
+ ifScope && !ifScope.q && (scope[branchAccessor] ?? branch) === branch && queueRender(ifScope, childSignal, -1);
551
551
  };
552
552
  return ownerSignal._ = childSignal, ownerSignal;
553
553
  }
package/dist/html.js CHANGED
@@ -736,7 +736,9 @@ function writePromise(state, val, ref) {
736
736
  let { boundary } = state;
737
737
  if (!boundary) return !1;
738
738
  let pId = nextRefAccess(state), pRef = new Reference(ref, null, state.flush, null, pId);
739
- return state.buf.push("new Promise((f,r)=>" + pId + "={f,r})"), val.then(
739
+ return state.buf.push(
740
+ "(p=>p=new Promise((f,r)=>" + pId + "={f,r(e){p.catch(_=>0);r(e)}}))()"
741
+ ), val.then(
740
742
  (v) => writeAsyncCall(state, boundary, pRef, "f", v, pId),
741
743
  (v) => writeAsyncCall(state, boundary, pRef, "r", v, pId)
742
744
  ), boundary.startAsync(), !0;
package/dist/html.mjs CHANGED
@@ -653,7 +653,9 @@ function writePromise(state, val, ref) {
653
653
  let { boundary } = state;
654
654
  if (!boundary) return !1;
655
655
  let pId = nextRefAccess(state), pRef = new Reference(ref, null, state.flush, null, pId);
656
- return state.buf.push("new Promise((f,r)=>" + pId + "={f,r})"), val.then(
656
+ return state.buf.push(
657
+ "(p=>p=new Promise((f,r)=>" + pId + "={f,r(e){p.catch(_=>0);r(e)}}))()"
658
+ ), val.then(
657
659
  (v) => writeAsyncCall(state, boundary, pRef, "f", v, pId),
658
660
  (v) => writeAsyncCall(state, boundary, pRef, "r", v, pId)
659
661
  ), boundary.startAsync(), !0;
@@ -10163,7 +10163,10 @@ var try_default = {
10163
10163
  "The [`<try>` tag](https://markojs.com/docs/reference/core-tag#try) requires [body content](https://markojs.com/docs/reference/language#tag-content)."
10164
10164
  );
10165
10165
  }
10166
- startSection(tag.get("body"));
10166
+ const bodySection = startSection(tag.get("body"));
10167
+ if (bodySection) {
10168
+ bodySection.upstreamExpression = tagExtra;
10169
+ }
10167
10170
  },
10168
10171
  translate: translateByTarget({
10169
10172
  html: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "marko",
3
- "version": "6.0.71",
3
+ "version": "6.0.73",
4
4
  "description": "Optimized runtime for Marko templates.",
5
5
  "keywords": [
6
6
  "api",