seroval 1.0.5 → 1.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.
@@ -957,7 +957,7 @@ function createStream() {
957
957
  const listeners = /* @__PURE__ */ new Set();
958
958
  const buffer = [];
959
959
  let alive = true;
960
- let success = false;
960
+ let success = true;
961
961
  function flushNext(value) {
962
962
  for (const listener of listeners.keys()) {
963
963
  listener.next(value);
@@ -981,7 +981,7 @@ function createStream() {
981
981
  }
982
982
  for (let i = 0, len = buffer.length; i < len; i++) {
983
983
  const value = buffer[i];
984
- if (i === len - 1) {
984
+ if (i === len - 1 && !alive) {
985
985
  if (success) {
986
986
  listener.return(value);
987
987
  } else {
@@ -2663,7 +2663,7 @@ var BaseSerializerContext = class {
2663
2663
  "for(x=0;x<p;x++)l[x]&&l[x][m](v)"
2664
2664
  ) + ",n=" + this.createEffectfulFunction(
2665
2665
  ["o", "x", "z", "c"],
2666
- 'for(x=0,z=b.length;x<z;x++)(c=b[x],x===z-1?o[s?"return":"throw"](c):o.next(c))'
2666
+ 'for(x=0,z=b.length;x<z;x++)(c=b[x],(!a&&x===z-1)?o[s?"return":"throw"](c):o.next(c))'
2667
2667
  ) + ",e=" + this.createFunction(
2668
2668
  ["o", "t"],
2669
2669
  "(a&&(l[t=p++]=o),n(o)," + this.createEffectfulFunction([], "a&&(l[t]=void 0)") + ")"
@@ -2749,7 +2749,7 @@ var BaseSerializerContext = class {
2749
2749
  "if(t=p.shift())t.s({done:!0,value:v});f(),d=b.length,b.push(v)"
2750
2750
  ) + "}),t={[" + this.getRefParam(symbol.i) + "]:" + this.createFunction([], "t") + ",next:" + this.createEffectfulFunction(
2751
2751
  ["i", "t", "v"],
2752
- "if(d===-1){return((i=c++)>=b.length)?(p.push(t=" + this.getRefParam(promise.i) + "()),t):{done:!0,value:b[i]}}if(c>d)return{done:!0,value:void 0};if(v=b[i=c++],i!==d)return{done:!1,value:v};if(e)throw v;return{done:!0,value:v}"
2752
+ "if(d===-1){return((i=c++)>=b.length)?(p.push(t=" + this.getRefParam(promise.i) + "()),t):{done:!1,value:b[i]}}if(c>d)return{done:!0,value:void 0};if(v=b[i=c++],i!==d)return{done:!1,value:v};if(e)throw v;return{done:!0,value:v}"
2753
2753
  ) + "})"
2754
2754
  )
2755
2755
  )