Skip to content

Commit

Permalink
fix: upgrade babel/it-fails, fix VComment
Browse files Browse the repository at this point in the history
- updated VComment to not assume the host is the document
- regenerated lockfile, primarily to update @babel/generate
- updated it-fails to get a fix for an issue that caused the process to exit early
- updated lots of snapshots that had whitespace changes due to @babel/generate changes
  • Loading branch information
mlrawlings committed Sep 27, 2024
1 parent ab914dc commit 0429ce0
Show file tree
Hide file tree
Showing 256 changed files with 897 additions and 994 deletions.
1,369 changes: 635 additions & 734 deletions package-lock.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
"express": "^4.19.2",
"globals": "^15.9.0",
"husky": "^9.1.4",
"it-fails": "^1.0.7",
"it-fails": "^1.0.8",
"jsdom": "^24.1.1",
"jsdom-context-require": "^5.2.3",
"kleur": "^4.1.5",
Expand Down
4 changes: 2 additions & 2 deletions packages/marko/src/runtime/vdom/VComment.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ function VComment(value, ownerComponent) {
VComment.prototype = {
___nodeType: 8,

___actualize: function (doc) {
___actualize: function (host) {
var nodeValue = this.___nodeValue;
return doc.createComment(nodeValue);
return (host.ownerDocument || host).createComment(nodeValue);

Check warning on line 14 in packages/marko/src/runtime/vdom/VComment.js

View check run for this annotation

Codecov / codecov/patch

packages/marko/src/runtime/vdom/VComment.js#L14

Added line #L14 was not covered by tests
},

___cloneNode: function () {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<!--"This is a <custom-tag>test</custom-tag>"-->
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<!--"This is a comment"-->
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,4 @@ export function _setup_(_scope) {
_x(_scope, 1);
_y(_scope, 10);
}
export default /* @__PURE__ */_createTemplate( /* @__PURE__ */_createRenderer(_template_, _walks_, _setup_, void 0, void 0, _params__), "packages/translator-interop/src/__tests__/fixtures/custom-tag-parameters-from-args/components/custom-tag.marko");
export default /* @__PURE__ */_createTemplate(/* @__PURE__ */_createRenderer(_template_, _walks_, _setup_, void 0, void 0, _params__), "packages/translator-interop/src/__tests__/fixtures/custom-tag-parameters-from-args/components/custom-tag.marko");
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ export const _template_ = "<h1>Hello world</h1>";
export const _walks_ = /* over(1) */"b";
export const _setup_ = () => {};
import { createRenderer as _createRenderer, createTemplate as _createTemplate } from "@marko/runtime-tags/debug/dom";
export default /* @__PURE__ */_createTemplate( /* @__PURE__ */_createRenderer(_template_, _walks_, _setup_), "packages/translator-interop/src/__tests__/fixtures/explicit/template.marko");
export default /* @__PURE__ */_createTemplate(/* @__PURE__ */_createRenderer(_template_, _walks_, _setup_), "packages/translator-interop/src/__tests__/fixtures/explicit/template.marko");
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ export const _params__ = /* @__PURE__ */_value("_params_", (_scope, _params_) =>
export function _setup_(_scope) {
_count(_scope, 0);
}
export default /* @__PURE__ */_createTemplate( /* @__PURE__ */_createRenderer(_template_, _walks_, _setup_, void 0, void 0, _params__), "packages/translator-interop/src/__tests__/fixtures/interop-basic-class-to-tags/components/tags-counter.marko");
export default /* @__PURE__ */_createTemplate(/* @__PURE__ */_createRenderer(_template_, _walks_, _setup_, void 0, void 0, _params__), "packages/translator-interop/src/__tests__/fixtures/interop-basic-class-to-tags/components/tags-counter.marko");
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,4 @@ export function _setup_(_scope) {
_count(_scope, 0);
_dynamicTagName(_scope, _classCounter);
}
export default /* @__PURE__ */_createTemplate( /* @__PURE__ */_createRenderer(_template_, _walks_, _setup_), "packages/translator-interop/src/__tests__/fixtures/interop-basic-tags-to-class/template.marko");
export default /* @__PURE__ */_createTemplate(/* @__PURE__ */_createRenderer(_template_, _walks_, _setup_), "packages/translator-interop/src/__tests__/fixtures/interop-basic-tags-to-class/template.marko");
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ export function _setup_(_scope) {
_count(_scope, 0);
_dynamicTagName(_scope, _classCounter);
}
export default /* @__PURE__ */_createTemplate( /* @__PURE__ */_createRenderer(_template_, _walks_, _setup_), "packages/translator-interop/src/__tests__/fixtures/interop-events-tags-to-class/template.marko");
export default /* @__PURE__ */_createTemplate(/* @__PURE__ */_createRenderer(_template_, _walks_, _setup_), "packages/translator-interop/src/__tests__/fixtures/interop-events-tags-to-class/template.marko");
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ export const _params__ = /* @__PURE__ */_value("_params_", (_scope, _params_) =>
export function _setup_(_scope) {
_count(_scope, 0);
}
export default /* @__PURE__ */_createTemplate( /* @__PURE__ */_createRenderer(_template_, _walks_, _setup_, void 0, void 0, _params__), "packages/translator-interop/src/__tests__/fixtures/interop-nested-class-to-tags/components/tags-layout.marko");
export default /* @__PURE__ */_createTemplate(/* @__PURE__ */_createRenderer(_template_, _walks_, _setup_, void 0, void 0, _params__), "packages/translator-interop/src/__tests__/fixtures/interop-nested-class-to-tags/components/tags-layout.marko");
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@ export function _setup_(_scope) {
_count(_scope, 0);
_dynamicTagName(_scope, _classLayout || _classLayoutBody);
}
export default /* @__PURE__ */_createTemplate( /* @__PURE__ */_createRenderer(_template_, _walks_, _setup_), "packages/translator-interop/src/__tests__/fixtures/interop-nested-tags-to-class/template.marko");
export default /* @__PURE__ */_createTemplate(/* @__PURE__ */_createRenderer(_template_, _walks_, _setup_), "packages/translator-interop/src/__tests__/fixtures/interop-nested-tags-to-class/template.marko");
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const _renderer = /* @__PURE__ */_createRenderer((input, _tagVar) => {
const _scope0_id = _nextScopeId();
const count = 0;
const _dynamicScope = _peekNextScope();
_dynamicTagInput(_dynamicScope, _classLayout, {}, _register( /* @__PURE__ */_createRenderer(() => {
_dynamicTagInput(_dynamicScope, _classLayout, {}, _register(/* @__PURE__ */_createRenderer(() => {
const _scope1_id = _nextScopeId();
_write(`<button id=tags>${_escapeXML(count)}${_markResumeNode(_scope1_id, "#text/1")}</button>${_markResumeNode(_scope1_id, "#button/0")}`);
_writeEffect(_scope1_id, "packages/translator-interop/src/__tests__/fixtures/interop-nested-tags-to-class/template.marko_1_count/subscriber");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@ export const _params__ = /* @__PURE__ */_value("_params_", (_scope, _params_) =>
export function _setup_(_scope) {
_count(_scope, 0);
}
export default /* @__PURE__ */_createTemplate( /* @__PURE__ */_createRenderer(_template_, _walks_, _setup_, void 0, void 0, _params__), "packages/translator-interop/src/__tests__/fixtures/interop-tag-params-class-to-tags/components/tags-layout.marko");
export default /* @__PURE__ */_createTemplate(/* @__PURE__ */_createRenderer(_template_, _walks_, _setup_, void 0, void 0, _params__), "packages/translator-interop/src/__tests__/fixtures/interop-tag-params-class-to-tags/components/tags-layout.marko");
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,4 @@ export function _setup_(_scope) {
_multiplier(_scope, 1);
_dynamicTagName(_scope, _classLayout || _classLayoutBody);
}
export default /* @__PURE__ */_createTemplate( /* @__PURE__ */_createRenderer(_template_, _walks_, _setup_), "packages/translator-interop/src/__tests__/fixtures/interop-tag-params-tags-to-class/template.marko");
export default /* @__PURE__ */_createTemplate(/* @__PURE__ */_createRenderer(_template_, _walks_, _setup_), "packages/translator-interop/src/__tests__/fixtures/interop-tag-params-tags-to-class/template.marko");
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const _renderer = /* @__PURE__ */_createRenderer((input, _tagVar) => {
const _scope0_id = _nextScopeId();
const multiplier = 1;
const _dynamicScope = _peekNextScope();
_dynamicTagInput(_dynamicScope, _classLayout, {}, _register( /* @__PURE__ */_createRenderer((baseCount, message) => {
_dynamicTagInput(_dynamicScope, _classLayout, {}, _register(/* @__PURE__ */_createRenderer((baseCount, message) => {
const _scope1_id = _nextScopeId();
_write(`<h1>${_escapeXML(message)}${_markResumeNode(_scope1_id, "#text/0")}</h1><button id=tags>${_escapeXML(multiplier)}${_markResumeNode(_scope1_id, "#text/2")} * <!>${_escapeXML(baseCount)}${_markResumeNode(_scope1_id, "#text/3")} = <!>${_escapeXML(multiplier * baseCount)}${_markResumeNode(_scope1_id, "#text/4")}</button>${_markResumeNode(_scope1_id, "#button/1")}`);
_writeEffect(_scope1_id, "packages/translator-interop/src/__tests__/fixtures/interop-tag-params-tags-to-class/template.marko_1_multiplier/subscriber");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ const _count = /* @__PURE__ */_value("count", (_scope, count) => {
export function _setup_(_scope) {
_count(_scope, 0);
}
export default /* @__PURE__ */_createTemplate( /* @__PURE__ */_createRenderer(_template_, _walks_, _setup_), "packages/translator-interop/src/__tests__/fixtures/let/template.marko");
export default /* @__PURE__ */_createTemplate(/* @__PURE__ */_createRenderer(_template_, _walks_, _setup_), "packages/translator-interop/src/__tests__/fixtures/let/template.marko");
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ export function _setup_(_scope) {
_clickCount(_scope, 0);
_lastClickCount(_scope, undefined);
}
export default /* @__PURE__ */_createTemplate( /* @__PURE__ */_createRenderer(_template_, _walks_, _setup_), "packages/translator-tags/src/__tests__/fixtures/assignment-before-tag-var/template.marko");
export default /* @__PURE__ */_createTemplate(/* @__PURE__ */_createRenderer(_template_, _walks_, _setup_), "packages/translator-tags/src/__tests__/fixtures/assignment-before-tag-var/template.marko");
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const _renderer = /* @__PURE__ */_createRenderer((input, _tagVar) => {
const _scope2_id = _nextScopeId();
_thing = {
x: 1,
renderBody: _register( /* @__PURE__ */_createRenderer(() => {
renderBody: _register(/* @__PURE__ */_createRenderer(() => {
_write("Hello");
}), "packages/translator-tags/src/__tests__/fixtures/at-tag-inside-if-tag/template.marko_3_renderer")
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,17 @@ const _renderer = /* @__PURE__ */_createRenderer((input, _tagVar) => {
_dynamicTagInput(_dynamicScope, x, {
header: {
class: "my-header",
renderBody: _register( /* @__PURE__ */_createRenderer(() => {
renderBody: _register(/* @__PURE__ */_createRenderer(() => {
_write("Header content");
}), "packages/translator-tags/src/__tests__/fixtures/at-tags-dynamic-tag-parent/template.marko_2_renderer")
},
footer: {
class: "my-footer",
renderBody: _register( /* @__PURE__ */_createRenderer(() => {
renderBody: _register(/* @__PURE__ */_createRenderer(() => {
_write("Footer content");
}), "packages/translator-tags/src/__tests__/fixtures/at-tags-dynamic-tag-parent/template.marko_3_renderer")
}
}, _register( /* @__PURE__ */_createRenderer(() => {
}, _register(/* @__PURE__ */_createRenderer(() => {
const _scope1_id = _nextScopeId();
_write("Body content");
}), "packages/translator-tags/src/__tests__/fixtures/at-tags-dynamic-tag-parent/template.marko_1_renderer"));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const _renderer = /* @__PURE__ */_createRenderer((input, _tagVar) => {
if (x) {
const _scope2_id = _nextScopeId();
_item = {
renderBody: _register( /* @__PURE__ */_createRenderer(y => {
renderBody: _register(/* @__PURE__ */_createRenderer(y => {
_write(`${_escapeXML(y)}`);
}), "packages/translator-tags/src/__tests__/fixtures/at-tags-dynamic-with-params/template.marko_3_renderer")
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const _renderer = /* @__PURE__ */_createRenderer((input, _tagVar) => {
style: {
color
},
renderBody: _register( /* @__PURE__ */_createRenderer(() => {
renderBody: _register(/* @__PURE__ */_createRenderer(() => {
_write("foo");
}), "packages/translator-tags/src/__tests__/fixtures/at-tags-dynamic/template.marko_6_renderer")
});
Expand All @@ -29,7 +29,7 @@ const _renderer = /* @__PURE__ */_createRenderer((input, _tagVar) => {
style: {
color
},
renderBody: _register( /* @__PURE__ */_createRenderer(() => {
renderBody: _register(/* @__PURE__ */_createRenderer(() => {
_write("bar");
}), "packages/translator-tags/src/__tests__/fixtures/at-tags-dynamic/template.marko_7_renderer")
});
Expand Down Expand Up @@ -57,7 +57,7 @@ const _renderer = /* @__PURE__ */_createRenderer((input, _tagVar) => {
let _i = _i2++;
_row.push({
row: row,
renderBody: _register( /* @__PURE__ */_createRenderer(() => {
renderBody: _register(/* @__PURE__ */_createRenderer(() => {
_write(`${_escapeXML(row)}${_markResumeNode(_scope11_id, "#text/0")}`);
}), "packages/translator-tags/src/__tests__/fixtures/at-tags-dynamic/template.marko_11_renderer", _scope10_id)
});
Expand All @@ -78,7 +78,7 @@ const _renderer = /* @__PURE__ */_createRenderer((input, _tagVar) => {
outside: true,
row: {
row: -1,
renderBody: _register( /* @__PURE__ */_createRenderer(() => {
renderBody: _register(/* @__PURE__ */_createRenderer(() => {
_write("Outside");
}), "packages/translator-tags/src/__tests__/fixtures/at-tags-dynamic/template.marko_13_renderer")
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ import { conditional as _conditional, value as _value, createRenderer as _create
const _dynamicTagName = /* @__PURE__ */_conditional("#text/0");
export const _input_ = /* @__PURE__ */_value("input", (_scope, input) => _dynamicTagName(_scope, input.foo), _dynamicTagName);
export const _params__ = /* @__PURE__ */_value("_params_", (_scope, _params_) => _input_(_scope, _params_[0]), _input_);
export default /* @__PURE__ */_createTemplate( /* @__PURE__ */_createRenderer(_template_, _walks_, _setup_, void 0, void 0, _params__), "packages/translator-tags/src/__tests__/fixtures/at-tags/components/hello/index.marko");
export default /* @__PURE__ */_createTemplate(/* @__PURE__ */_createRenderer(_template_, _walks_, _setup_, void 0, void 0, _params__), "packages/translator-tags/src/__tests__/fixtures/at-tags/components/hello/index.marko");
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ export function _setup_(_scope) {
renderBody: /* @__PURE__ */_bindRenderer(_scope, _helloBody)
});
}
export default /* @__PURE__ */_createTemplate( /* @__PURE__ */_createRenderer(_template_, _walks_, _setup_), "packages/translator-tags/src/__tests__/fixtures/at-tags/template.marko");
export default /* @__PURE__ */_createTemplate(/* @__PURE__ */_createRenderer(_template_, _walks_, _setup_), "packages/translator-tags/src/__tests__/fixtures/at-tags/template.marko");
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const _renderer = /* @__PURE__ */_createRenderer((input, _tagVar) => {
const _childScope = _peekNextScope();
_hello._({
foo: {
renderBody: _register( /* @__PURE__ */_createRenderer(() => {
renderBody: _register(/* @__PURE__ */_createRenderer(() => {
_write("Foo!");
}), "packages/translator-tags/src/__tests__/fixtures/at-tags/template.marko_2_renderer")
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ const _disabled = /* @__PURE__ */_value("disabled", (_scope, disabled) => {
export function _setup_(_scope) {
_disabled(_scope, true);
}
export default /* @__PURE__ */_createTemplate( /* @__PURE__ */_createRenderer(_template_, _walks_, _setup_), "packages/translator-tags/src/__tests__/fixtures/attr-boolean-dynamic/template.marko");
export default /* @__PURE__ */_createTemplate(/* @__PURE__ */_createRenderer(_template_, _walks_, _setup_), "packages/translator-tags/src/__tests__/fixtures/attr-boolean-dynamic/template.marko");
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ export const _template_ = "<input checked>";
export const _walks_ = /* over(1) */"b";
export const _setup_ = () => {};
import { createRenderer as _createRenderer, createTemplate as _createTemplate } from "@marko/runtime-tags/debug/dom";
export default /* @__PURE__ */_createTemplate( /* @__PURE__ */_createRenderer(_template_, _walks_, _setup_), "packages/translator-tags/src/__tests__/fixtures/attr-boolean/template.marko");
export default /* @__PURE__ */_createTemplate(/* @__PURE__ */_createRenderer(_template_, _walks_, _setup_), "packages/translator-tags/src/__tests__/fixtures/attr-boolean/template.marko");
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ export const _template_ = "<div></div>";
export const _walks_ = /* over(1) */"b";
export const _setup_ = () => {};
import { createRenderer as _createRenderer, createTemplate as _createTemplate } from "@marko/runtime-tags/debug/dom";
export default /* @__PURE__ */_createTemplate( /* @__PURE__ */_createRenderer(_template_, _walks_, _setup_), "packages/translator-tags/src/__tests__/fixtures/attr-class/components/custom-tag.marko");
export default /* @__PURE__ */_createTemplate(/* @__PURE__ */_createRenderer(_template_, _walks_, _setup_), "packages/translator-tags/src/__tests__/fixtures/attr-class/components/custom-tag.marko");
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,4 @@ export function _setup_(_scope) {
_customTag(_scope["#childScope/1"]);
_customTag(_scope["#childScope/2"]);
}
export default /* @__PURE__ */_createTemplate( /* @__PURE__ */_createRenderer(_template_, _walks_, _setup_, void 0, void 0, _params__), "packages/translator-tags/src/__tests__/fixtures/attr-class/template.marko");
export default /* @__PURE__ */_createTemplate(/* @__PURE__ */_createRenderer(_template_, _walks_, _setup_, void 0, void 0, _params__), "packages/translator-tags/src/__tests__/fixtures/attr-class/template.marko");
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,11 @@ const _renderer = /* @__PURE__ */_createRenderer((input, _tagVar) => {
b: c,
d
}],
renderBody: _register( /* @__PURE__ */_createRenderer(() => {
renderBody: _register(/* @__PURE__ */_createRenderer(() => {
_write("Hello");
}), "packages/translator-tags/src/__tests__/fixtures/attr-class/template.marko_2_renderer")
}
}, _register( /* @__PURE__ */_createRenderer(() => {
}, _register(/* @__PURE__ */_createRenderer(() => {
const _scope1_id = _nextScopeId();
_writeEffect(_scope1_id, "packages/translator-tags/src/__tests__/fixtures/attr-class/template.marko_1_c/subscriber");
_writeEffect(_scope1_id, "packages/translator-tags/src/__tests__/fixtures/attr-class/template.marko_1_d/subscriber");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ export const _input_ = /* @__PURE__ */_value("input", (_scope, input) => {
_attr(_scope["#div/0"], "nested", `a ${input.foo + ` nested ${input.bar}`} b`);
});
export const _params__ = /* @__PURE__ */_value("_params_", (_scope, _params_) => _input_(_scope, _params_[0]));
export default /* @__PURE__ */_createTemplate( /* @__PURE__ */_createRenderer(_template_, _walks_, _setup_, void 0, void 0, _params__), "packages/translator-tags/src/__tests__/fixtures/attr-escape/template.marko");
export default /* @__PURE__ */_createTemplate(/* @__PURE__ */_createRenderer(_template_, _walks_, _setup_, void 0, void 0, _params__), "packages/translator-tags/src/__tests__/fixtures/attr-escape/template.marko");
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ export const _template_ = "<div d=0 y=1></div>";
export const _walks_ = /* over(1) */"b";
export const _setup_ = () => {};
import { createRenderer as _createRenderer, createTemplate as _createTemplate } from "@marko/runtime-tags/debug/dom";
export default /* @__PURE__ */_createTemplate( /* @__PURE__ */_createRenderer(_template_, _walks_, _setup_), "packages/translator-tags/src/__tests__/fixtures/attr-falsey/template.marko");
export default /* @__PURE__ */_createTemplate(/* @__PURE__ */_createRenderer(_template_, _walks_, _setup_), "packages/translator-tags/src/__tests__/fixtures/attr-falsey/template.marko");
Loading

0 comments on commit 0429ce0

Please sign in to comment.