marko 5.37.20 → 5.37.22

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.
@@ -0,0 +1,9 @@
1
+ "use strict";module.exports = function (input) {
2
+ if (!input.toJSON) {
3
+ input.toJSON = emptyInput;
4
+ }
5
+ };
6
+
7
+ function emptyInput() {
8
+ return {};
9
+ }
@@ -63,7 +63,7 @@ exports.p = function (htmlCompat) {
63
63
  {}
64
64
  );
65
65
 
66
- htmlCompat.patchDynamicTag(function getRenderer(tag) {
66
+ htmlCompat.patchDynamicTag(function getRenderer(scopeId, accessor, tag) {
67
67
  const renderer = tag._ || tag.renderBody || tag;
68
68
  if (isMarko6(renderer)) return renderer;
69
69
 
@@ -124,7 +124,7 @@ exports.p = function (htmlCompat) {
124
124
 
125
125
  if (async !== false) {
126
126
  async = true;
127
- htmlCompat.fork(out, writeHTML);
127
+ htmlCompat.fork(scopeId, accessor, out, writeHTML);
128
128
  }
129
129
  };
130
130
  });
@@ -453,6 +453,21 @@ const translate = exports.translate = {
453
453
  )
454
454
  )
455
455
  );
456
+
457
+ if (meta.implicitSplitComponent && isHTML) {
458
+ renderBlock.unshiftContainer(
459
+ "body",
460
+ _compiler.types.callExpression(
461
+ (0, _babelUtils.importDefault)(
462
+ file,
463
+ "marko/src/runtime/helpers/skip-serialize.js",
464
+ "marko_skip_serialize"
465
+ ),
466
+ [_compiler.types.identifier("input")]
467
+ )
468
+ );
469
+ }
470
+
456
471
  renderBlock.remove();
457
472
 
458
473
  if (!isHTML) {
@@ -558,7 +573,8 @@ function getRuntimeEntryFiles(output, optimize) {
558
573
  `${base}core-tags/components/preferred-script-location-tag.js`,
559
574
  `${base}core-tags/core/__flush_here_and_after__.js`,
560
575
  `${base}core-tags/core/await/renderer.js`,
561
- `${base}core-tags/core/await/reorderer-renderer.js`] :
576
+ `${base}core-tags/core/await/reorderer-renderer.js`,
577
+ `${base}runtime/helpers/skip-serialize.js`] :
562
578
 
563
579
  [
564
580
  `${base}runtime/vdom/index.js`,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "marko",
3
- "version": "5.37.20",
3
+ "version": "5.37.22",
4
4
  "description": "UI Components + streaming, async, high performance, HTML templating for Node.js and the browser.",
5
5
  "keywords": [
6
6
  "front-end",
@@ -0,0 +1,9 @@
1
+ module.exports = function (input) {
2
+ if (!input.toJSON) {
3
+ input.toJSON = emptyInput;
4
+ }
5
+ };
6
+
7
+ function emptyInput() {
8
+ return {};
9
+ }
@@ -63,7 +63,7 @@ exports.p = function (htmlCompat) {
63
63
  {},
64
64
  );
65
65
 
66
- htmlCompat.patchDynamicTag(function getRenderer(tag) {
66
+ htmlCompat.patchDynamicTag(function getRenderer(scopeId, accessor, tag) {
67
67
  const renderer = tag._ || tag.renderBody || tag;
68
68
  if (isMarko6(renderer)) return renderer;
69
69
 
@@ -124,7 +124,7 @@ exports.p = function (htmlCompat) {
124
124
 
125
125
  if (async !== false) {
126
126
  async = true;
127
- htmlCompat.fork(out, writeHTML);
127
+ htmlCompat.fork(scopeId, accessor, out, writeHTML);
128
128
  }
129
129
  };
130
130
  });
@@ -453,6 +453,21 @@ export const translate = {
453
453
  ),
454
454
  ),
455
455
  );
456
+
457
+ if (meta.implicitSplitComponent && isHTML) {
458
+ renderBlock.unshiftContainer(
459
+ "body",
460
+ t.callExpression(
461
+ importDefault(
462
+ file,
463
+ "marko/src/runtime/helpers/skip-serialize.js",
464
+ "marko_skip_serialize",
465
+ ),
466
+ [t.identifier("input")],
467
+ ),
468
+ );
469
+ }
470
+
456
471
  renderBlock.remove();
457
472
 
458
473
  if (!isHTML) {
@@ -559,6 +574,7 @@ export function getRuntimeEntryFiles(output, optimize) {
559
574
  `${base}core-tags/core/__flush_here_and_after__.js`,
560
575
  `${base}core-tags/core/await/renderer.js`,
561
576
  `${base}core-tags/core/await/reorderer-renderer.js`,
577
+ `${base}runtime/helpers/skip-serialize.js`,
562
578
  ]
563
579
  : [
564
580
  `${base}runtime/vdom/index.js`,