seroval 0.12.2 → 0.12.4
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/cjs/development/index.cjs +4 -2
- package/dist/cjs/development/index.cjs.map +2 -2
- package/dist/cjs/production/index.cjs +3 -3
- package/dist/esm/development/index.mjs +4 -2
- package/dist/esm/development/index.mjs.map +2 -2
- package/dist/esm/production/index.mjs +3 -3
- package/dist/types/core/Serializer.d.ts +2 -1
- package/dist/types/core/Serializer.d.ts.map +1 -1
- package/dist/types/core/keys.d.ts.map +1 -1
- package/package.json +2 -2
- package/src/core/Serializer.ts +3 -1
- package/src/core/keys.ts +4 -2
|
@@ -231,11 +231,12 @@ var GLOBAL_CONTEXT_STREAM_CONSTRUCTOR = "S";
|
|
|
231
231
|
var GLOBAL_CONTEXT_STREAM_EMIT = "Se";
|
|
232
232
|
var GLOBAL_CONTEXT_API_REF = `self.${GLOBAL_CONTEXT_API}`;
|
|
233
233
|
var GLOBAL_CONTEXT_API_SCRIPT = `${GLOBAL_CONTEXT_API_REF}=${GLOBAL_CONTEXT_API_REF}||{${GLOBAL_CONTEXT_PROMISE_CONSTRUCTOR}:function(s,f,p){return(p=new Promise(function(a,b){s=a,f=b})).${LOCAL_CONTEXT_PROMISE_RESOLVE}=s,p.${LOCAL_CONTEXT_PROMISE_REJECT}=f,p},uP:function(p){delete p.${LOCAL_CONTEXT_PROMISE_RESOLVE};delete p.${LOCAL_CONTEXT_PROMISE_REJECT}},${GLOBAL_CONTEXT_PROMISE_RESOLVE}:function(p,d){p.${LOCAL_CONTEXT_PROMISE_RESOLVE}(d),p.status="success",p.value=d,this.uP(p)},${GLOBAL_CONTEXT_PROMISE_REJECT}:function(p,d){p.${LOCAL_CONTEXT_PROMISE_REJECT}(d),p.status="failure",p.value=d,this.uP(p)},uS:function(s){delete s.${LOCAL_CONTEXT_STREAM_CONTROLLER}},${GLOBAL_CONTEXT_STREAM_EMIT}:function(s,t,d,c){switch(c=s.${LOCAL_CONTEXT_STREAM_CONTROLLER},t){case 0:return c.enqueue(d);case 1:return(this.uS(s),c.error(d));case 2:return(this.uS(s),c.close())}},${GLOBAL_CONTEXT_STREAM_CONSTRUCTOR}:function(s,c){return(s=new ReadableStream({start:function(x){c=x}})).${LOCAL_CONTEXT_STREAM_CONTROLLER}=c,s}}`;
|
|
234
|
+
var GLOBAL_CONTEXT_R = `self.${GLOBAL_CONTEXT_REFERENCES}`;
|
|
234
235
|
function getCrossReferenceHeader(id) {
|
|
235
236
|
if (id == null) {
|
|
236
|
-
return
|
|
237
|
+
return `${GLOBAL_CONTEXT_R}=${GLOBAL_CONTEXT_R}||[];`;
|
|
237
238
|
}
|
|
238
|
-
return `(${
|
|
239
|
+
return `(${GLOBAL_CONTEXT_R}=${GLOBAL_CONTEXT_R}||{})["${serializeString(id)}"]=[];`;
|
|
239
240
|
}
|
|
240
241
|
|
|
241
242
|
// src/core/reference.ts
|
|
@@ -3771,6 +3772,7 @@ var Serializer = class {
|
|
|
3771
3772
|
this.pending++;
|
|
3772
3773
|
this.keys.add(key);
|
|
3773
3774
|
this.cleanups.push(crossSerializeStream(value, {
|
|
3775
|
+
plugins: this.options.plugins,
|
|
3774
3776
|
scopeId: this.options.scopeId,
|
|
3775
3777
|
refs: this.refs,
|
|
3776
3778
|
disabledFeatures: this.options.disabledFeatures,
|