marko 5.34.4 → 5.34.5

Sign up to get free protection for your applications and to get access to all the features.
@@ -81,13 +81,13 @@ exports.p = function (domCompat) {
81
81
 
82
82
  domCompat.patchConditionals((conditional) => (...args) => {
83
83
  const signal = conditional(...args);
84
- const hasAttrs = args.length > 1;
84
+ const skipAttrs = args.length <= 1;
85
85
  return (scope, renderer, clean) => {
86
- return signal(scope, create5to6Renderer(renderer, hasAttrs), clean);
86
+ return signal(scope, create5to6Renderer(renderer, skipAttrs), clean);
87
87
  };
88
88
  });
89
89
 
90
- function create5to6Renderer(renderer, hasAttrs) {
90
+ function create5to6Renderer(renderer, skipAttrs) {
91
91
  let newRenderer = renderer;
92
92
  if (renderer && typeof renderer !== "string") {
93
93
  const rendererFromAnywhere =
@@ -115,7 +115,7 @@ exports.p = function (domCompat) {
115
115
  }
116
116
  newRenderer = domCompat.createRenderer(
117
117
  (scope) => {
118
- if (!hasAttrs) {
118
+ if (skipAttrs) {
119
119
  renderAndMorph(scope, rendererFromAnywhere, renderer, {});
120
120
  }
121
121
  },
@@ -12,8 +12,7 @@ exports.p = function (tagsAPI) {
12
12
  createRenderFn,
13
13
  fork,
14
14
  write,
15
- makeSerializable,
16
- register,
15
+ serializerRegister,
17
16
  writeScope,
18
17
  nextScopeId,
19
18
  getRegistryInfo
@@ -168,19 +167,11 @@ exports.p = function (tagsAPI) {
168
167
  }
169
168
  );
170
169
 
171
- function dummyCreate5to6Renderer() {}
172
-
173
- register(dummyCreate5to6Renderer, "@marko/tags-compat-5-to-6");
174
-
175
170
  return function serialized5to6(renderer, id) {
176
- const dummyRenderer = () => {};
177
- register(dummyRenderer, id);
178
- return makeSerializable(renderer, (s) =>
179
- s.
180
- value(dummyCreate5to6Renderer).
181
- code("(").
182
- value(dummyRenderer).
183
- code(",!0)")
171
+ return serializerRegister(
172
+ "@marko/tags-compat-5-to-6",
173
+ renderer,
174
+ serializerRegister(id, () => {})
184
175
  );
185
176
  };
186
177
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "marko",
3
- "version": "5.34.4",
3
+ "version": "5.34.5",
4
4
  "description": "UI Components + streaming, async, high performance, HTML templating for Node.js and the browser.",
5
5
  "keywords": [
6
6
  "front-end",
@@ -64,8 +64,8 @@
64
64
  "build": "babel ./src --out-dir ./dist --extensions .js --copy-files --config-file ../../babel.config.js --env-name=production"
65
65
  },
66
66
  "dependencies": {
67
- "@marko/compiler": "^5.36.1",
68
- "@marko/translator-default": "^6.0.0",
67
+ "@marko/compiler": "^5.36.2",
68
+ "@marko/translator-default": "^6.0.1",
69
69
  "app-module-path": "^2.2.0",
70
70
  "argly": "^1.2.0",
71
71
  "browser-refresh-client": "1.1.4",
@@ -81,13 +81,13 @@ exports.p = function (domCompat) {
81
81
 
82
82
  domCompat.patchConditionals((conditional) => (...args) => {
83
83
  const signal = conditional(...args);
84
- const hasAttrs = args.length > 1;
84
+ const skipAttrs = args.length <= 1;
85
85
  return (scope, renderer, clean) => {
86
- return signal(scope, create5to6Renderer(renderer, hasAttrs), clean);
86
+ return signal(scope, create5to6Renderer(renderer, skipAttrs), clean);
87
87
  };
88
88
  });
89
89
 
90
- function create5to6Renderer(renderer, hasAttrs) {
90
+ function create5to6Renderer(renderer, skipAttrs) {
91
91
  let newRenderer = renderer;
92
92
  if (renderer && typeof renderer !== "string") {
93
93
  const rendererFromAnywhere =
@@ -115,7 +115,7 @@ exports.p = function (domCompat) {
115
115
  }
116
116
  newRenderer = domCompat.createRenderer(
117
117
  (scope) => {
118
- if (!hasAttrs) {
118
+ if (skipAttrs) {
119
119
  renderAndMorph(scope, rendererFromAnywhere, renderer, {});
120
120
  }
121
121
  },
@@ -12,8 +12,7 @@ exports.p = function (tagsAPI) {
12
12
  createRenderFn,
13
13
  fork,
14
14
  write,
15
- makeSerializable,
16
- register,
15
+ serializerRegister,
17
16
  writeScope,
18
17
  nextScopeId,
19
18
  getRegistryInfo,
@@ -168,19 +167,11 @@ exports.p = function (tagsAPI) {
168
167
  },
169
168
  );
170
169
 
171
- function dummyCreate5to6Renderer() {}
172
-
173
- register(dummyCreate5to6Renderer, "@marko/tags-compat-5-to-6");
174
-
175
170
  return function serialized5to6(renderer, id) {
176
- const dummyRenderer = () => {};
177
- register(dummyRenderer, id);
178
- return makeSerializable(renderer, (s) =>
179
- s
180
- .value(dummyCreate5to6Renderer)
181
- .code("(")
182
- .value(dummyRenderer)
183
- .code(",!0)"),
171
+ return serializerRegister(
172
+ "@marko/tags-compat-5-to-6",
173
+ renderer,
174
+ serializerRegister(id, () => {}),
184
175
  );
185
176
  };
186
177
  };