marko 5.17.7 → 5.17.8

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,6 +1,8 @@
1
1
  "use strict";
2
2
 
3
3
  const immediate = require("../setImmediate");
4
+ const setImmediate = immediate.az_;
5
+ const clearImmediate = immediate.aS_;
4
6
  const StringWriter = require("./StringWriter");
5
7
 
6
8
  /**
@@ -19,7 +21,7 @@ BufferedWriter.prototype = Object.assign(
19
21
  {
20
22
  scheduleFlush() {
21
23
  if (!this._scheduled) {
22
- this._scheduled = immediate.az_(flush.bind(0, this));
24
+ this._scheduled = setImmediate(flush.bind(0, this));
23
25
  }
24
26
  },
25
27
 
@@ -43,7 +45,7 @@ function flush(writer) {
43
45
  }
44
46
  }
45
47
 
46
- immediate.aS_(writer._scheduled);
48
+ clearImmediate(writer._scheduled);
47
49
  writer._scheduled = null;
48
50
  }
49
51
 
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/runtime/html/BufferedWriter.js"],"names":["immediate","require","StringWriter","BufferedWriter","wrappedStream","call","_wrapped","_scheduled","prototype","Object","assign","scheduleFlush","flush","bind","end","isTTY","writer","contents","toString","length","write","clear","module","exports"],"mappings":"AAAA;;AAEA,MAAMA,SAAS,GAAGC,OAAO,CAAC,iBAAD,CAAzB;AACA,MAAMC,YAAY,GAAGD,OAAO,CAAC,gBAAD,CAA5B;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,SAASE,cAAT,CAAwBC,aAAxB,EAAuC;AACrCF,EAAAA,YAAY,CAACG,IAAb,CAAkB,IAAlB;AACA,OAAKC,QAAL,GAAgBF,aAAhB;AACA,OAAKG,UAAL,GAAkB,IAAlB;AACD;;AAEDJ,cAAc,CAACK,SAAf,GAA2BC,MAAM,CAACC,MAAP;AACzB;AACEC,EAAAA,aAAa,GAAG;AACd,QAAI,CAAC,KAAKJ,UAAV,EAAsB;AACpB,WAAKA,UAAL,GAAkBP,SAAS,IAAT,CAA0BY,KAAK,CAACC,IAAN,CAAW,CAAX,EAAc,IAAd,CAA1B,CAAlB;AACD;AACF,GALH;;AAOEC,EAAAA,GAAG,EAAE,YAAY;AACfF,IAAAA,KAAK,CAAC,IAAD,CAAL;AACA,QAAI,CAAC,KAAKN,QAAL,CAAcS,KAAnB,EAA0B;AACxB,WAAKT,QAAL,CAAcQ,GAAd;AACD;AACF,GAZH,EADyB;;AAezBZ,YAAY,CAACM,SAfY,CAA3B;;;AAkBA,SAASI,KAAT,CAAeI,MAAf,EAAuB;AACrB,QAAMC,QAAQ,GAAGD,MAAM,CAACE,QAAP,EAAjB;AACA,MAAID,QAAQ,CAACE,MAAT,KAAoB,CAAxB,EAA2B;AACzBH,IAAAA,MAAM,CAACV,QAAP,CAAgBc,KAAhB,CAAsBH,QAAtB;AACAD,IAAAA,MAAM,CAACK,KAAP;AACA,QAAIL,MAAM,CAACV,QAAP,CAAgBM,KAApB,EAA2B;AACzBI,MAAAA,MAAM,CAACV,QAAP,CAAgBM,KAAhB;AACD;AACF;;AAEDZ,EAAAA,SAAS,IAAT,CAA4BgB,MAAM,CAACT,UAAnC;AACAS,EAAAA,MAAM,CAACT,UAAP,GAAoB,IAApB;AACD;;AAEDe,MAAM,CAACC,OAAP,GAAiBpB,cAAjB","sourcesContent":["\"use strict\";\n\nconst immediate = require(\"../setImmediate\");\nconst StringWriter = require(\"./StringWriter\");\n\n/**\n * Simple wrapper that can be used to wrap a stream\n * to reduce the number of write calls. In Node.js world,\n * each stream.write() becomes a chunk. We can avoid overhead\n * by reducing the number of chunks by buffering the output.\n */\nfunction BufferedWriter(wrappedStream) {\n StringWriter.call(this);\n this._wrapped = wrappedStream;\n this._scheduled = null;\n}\n\nBufferedWriter.prototype = Object.assign(\n {\n scheduleFlush() {\n if (!this._scheduled) {\n this._scheduled = immediate.___setImmediate(flush.bind(0, this));\n }\n },\n\n end: function () {\n flush(this);\n if (!this._wrapped.isTTY) {\n this._wrapped.end();\n }\n }\n },\n StringWriter.prototype\n);\n\nfunction flush(writer) {\n const contents = writer.toString();\n if (contents.length !== 0) {\n writer._wrapped.write(contents);\n writer.clear();\n if (writer._wrapped.flush) {\n writer._wrapped.flush();\n }\n }\n\n immediate.___clearImmediate(writer._scheduled);\n writer._scheduled = null;\n}\n\nmodule.exports = BufferedWriter;\n"],"file":"BufferedWriter.js"}
1
+ {"version":3,"sources":["../../../src/runtime/html/BufferedWriter.js"],"names":["immediate","require","setImmediate","clearImmediate","StringWriter","BufferedWriter","wrappedStream","call","_wrapped","_scheduled","prototype","Object","assign","scheduleFlush","flush","bind","end","isTTY","writer","contents","toString","length","write","clear","module","exports"],"mappings":"AAAA;;AAEA,MAAMA,SAAS,GAAGC,OAAO,CAAC,iBAAD,CAAzB;AACA,MAAMC,YAAY,GAAGF,SAAS,IAA9B;AACA,MAAMG,cAAc,GAAGH,SAAS,IAAhC;AACA,MAAMI,YAAY,GAAGH,OAAO,CAAC,gBAAD,CAA5B;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,SAASI,cAAT,CAAwBC,aAAxB,EAAuC;AACrCF,EAAAA,YAAY,CAACG,IAAb,CAAkB,IAAlB;AACA,OAAKC,QAAL,GAAgBF,aAAhB;AACA,OAAKG,UAAL,GAAkB,IAAlB;AACD;;AAEDJ,cAAc,CAACK,SAAf,GAA2BC,MAAM,CAACC,MAAP;AACzB;AACEC,EAAAA,aAAa,GAAG;AACd,QAAI,CAAC,KAAKJ,UAAV,EAAsB;AACpB,WAAKA,UAAL,GAAkBP,YAAY,CAACY,KAAK,CAACC,IAAN,CAAW,CAAX,EAAc,IAAd,CAAD,CAA9B;AACD;AACF,GALH;;AAOEC,EAAAA,GAAG,EAAE,YAAY;AACfF,IAAAA,KAAK,CAAC,IAAD,CAAL;AACA,QAAI,CAAC,KAAKN,QAAL,CAAcS,KAAnB,EAA0B;AACxB,WAAKT,QAAL,CAAcQ,GAAd;AACD;AACF,GAZH,EADyB;;AAezBZ,YAAY,CAACM,SAfY,CAA3B;;;AAkBA,SAASI,KAAT,CAAeI,MAAf,EAAuB;AACrB,QAAMC,QAAQ,GAAGD,MAAM,CAACE,QAAP,EAAjB;AACA,MAAID,QAAQ,CAACE,MAAT,KAAoB,CAAxB,EAA2B;AACzBH,IAAAA,MAAM,CAACV,QAAP,CAAgBc,KAAhB,CAAsBH,QAAtB;AACAD,IAAAA,MAAM,CAACK,KAAP;AACA,QAAIL,MAAM,CAACV,QAAP,CAAgBM,KAApB,EAA2B;AACzBI,MAAAA,MAAM,CAACV,QAAP,CAAgBM,KAAhB;AACD;AACF;;AAEDX,EAAAA,cAAc,CAACe,MAAM,CAACT,UAAR,CAAd;AACAS,EAAAA,MAAM,CAACT,UAAP,GAAoB,IAApB;AACD;;AAEDe,MAAM,CAACC,OAAP,GAAiBpB,cAAjB","sourcesContent":["\"use strict\";\n\nconst immediate = require(\"../setImmediate\");\nconst setImmediate = immediate.___setImmediate;\nconst clearImmediate = immediate.___clearImmediate;\nconst StringWriter = require(\"./StringWriter\");\n\n/**\n * Simple wrapper that can be used to wrap a stream\n * to reduce the number of write calls. In Node.js world,\n * each stream.write() becomes a chunk. We can avoid overhead\n * by reducing the number of chunks by buffering the output.\n */\nfunction BufferedWriter(wrappedStream) {\n StringWriter.call(this);\n this._wrapped = wrappedStream;\n this._scheduled = null;\n}\n\nBufferedWriter.prototype = Object.assign(\n {\n scheduleFlush() {\n if (!this._scheduled) {\n this._scheduled = setImmediate(flush.bind(0, this));\n }\n },\n\n end: function () {\n flush(this);\n if (!this._wrapped.isTTY) {\n this._wrapped.end();\n }\n }\n },\n StringWriter.prototype\n);\n\nfunction flush(writer) {\n const contents = writer.toString();\n if (contents.length !== 0) {\n writer._wrapped.write(contents);\n writer.clear();\n if (writer._wrapped.flush) {\n writer._wrapped.flush();\n }\n }\n\n clearImmediate(writer._scheduled);\n writer._scheduled = null;\n}\n\nmodule.exports = BufferedWriter;\n"],"file":"BufferedWriter.js"}
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "marko",
3
- "version": "5.17.7",
3
+ "version": "5.17.8",
4
4
  "license": "MIT",
5
5
  "description": "UI Components + streaming, async, high performance, HTML templating for Node.js and the browser.",
6
6
  "dependencies": {
7
7
  "@marko/compiler": "^5.17.6",
8
- "@marko/translator-default": "^5.17.7",
8
+ "@marko/translator-default": "^5.17.8",
9
9
  "app-module-path": "^2.2.0",
10
10
  "argly": "^1.2.0",
11
11
  "browser-refresh-client": "1.1.4",
@@ -72,5 +72,5 @@
72
72
  "index.js",
73
73
  "node-require.js"
74
74
  ],
75
- "gitHead": "38c4498f3a4e1f6a46275d6e444c340d04bd8648"
75
+ "gitHead": "d889a5f4a59a49e7afdb4bde2b4bbceabf969528"
76
76
  }
@@ -1,6 +1,8 @@
1
1
  "use strict";
2
2
 
3
3
  const immediate = require("../setImmediate");
4
+ const setImmediate = immediate.___setImmediate;
5
+ const clearImmediate = immediate.___clearImmediate;
4
6
  const StringWriter = require("./StringWriter");
5
7
 
6
8
  /**
@@ -19,7 +21,7 @@ BufferedWriter.prototype = Object.assign(
19
21
  {
20
22
  scheduleFlush() {
21
23
  if (!this._scheduled) {
22
- this._scheduled = immediate.___setImmediate(flush.bind(0, this));
24
+ this._scheduled = setImmediate(flush.bind(0, this));
23
25
  }
24
26
  },
25
27
 
@@ -43,7 +45,7 @@ function flush(writer) {
43
45
  }
44
46
  }
45
47
 
46
- immediate.___clearImmediate(writer._scheduled);
48
+ clearImmediate(writer._scheduled);
47
49
  writer._scheduled = null;
48
50
  }
49
51