-
Notifications
You must be signed in to change notification settings - Fork 650
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: issue mixing scoped and no-update directives
- Loading branch information
1 parent
6ef629b
commit cb3b4b5
Showing
10 changed files
with
143 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"marko": patch | ||
--- | ||
|
||
Fix issue where scoped directive was being applied twice when tag had no-update directive. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
...es/runtime-class/test/translator/fixtures/attr-no-update-scoped/snapshots/cjs-expected.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
"use strict"; | ||
|
||
exports.__esModule = true; | ||
exports.default = void 0; | ||
var _index = require("marko/src/runtime/html/index.js"); | ||
var _dataMarko = _interopRequireDefault(require("marko/src/runtime/html/helpers/data-marko.js")); | ||
var _attr = _interopRequireDefault(require("marko/src/runtime/html/helpers/attr.js")); | ||
var _preserveTag = _interopRequireDefault(require("marko/src/core-tags/components/preserve-tag.js")); | ||
var _renderTag = _interopRequireDefault(require("marko/src/runtime/helpers/render-tag.js")); | ||
var _renderer = _interopRequireDefault(require("marko/src/runtime/components/renderer.js")); | ||
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; } | ||
const _marko_componentType = "__tests__/template.marko", | ||
_marko_template = (0, _index.t)(_marko_componentType); | ||
var _default = exports.default = _marko_template; | ||
const _marko_component = {}; | ||
_marko_template._ = (0, _renderer.default)(function (input, out, _componentDef, _component, state, $global) { | ||
(0, _renderTag.default)(_preserveTag.default, { | ||
"n": true, | ||
"renderBody": out => { | ||
out.w(`<input${(0, _dataMarko.default)(out, _componentDef, 0, "0")}${(0, _attr.default)("id", _componentDef.elId("input1"))}>`); | ||
} | ||
}, out, _componentDef, "0"); | ||
}, { | ||
t: _marko_componentType, | ||
i: true, | ||
d: true | ||
}, _marko_component); |
1 change: 1 addition & 0 deletions
1
...e-class/test/translator/fixtures/attr-no-update-scoped/snapshots/generated-expected.marko
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<input id:scoped="input1" no-update> |
22 changes: 22 additions & 0 deletions
22
...s/runtime-class/test/translator/fixtures/attr-no-update-scoped/snapshots/html-expected.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import { t as _t } from "marko/src/runtime/html/index.js"; | ||
const _marko_componentType = "__tests__/template.marko", | ||
_marko_template = _t(_marko_componentType); | ||
export default _marko_template; | ||
import _marko_props from "marko/src/runtime/html/helpers/data-marko.js"; | ||
import _marko_attr from "marko/src/runtime/html/helpers/attr.js"; | ||
import _preserve from "marko/src/core-tags/components/preserve-tag.js"; | ||
import _marko_tag from "marko/src/runtime/helpers/render-tag.js"; | ||
import _marko_renderer from "marko/src/runtime/components/renderer.js"; | ||
const _marko_component = {}; | ||
_marko_template._ = _marko_renderer(function (input, out, _componentDef, _component, state, $global) { | ||
_marko_tag(_preserve, { | ||
"n": true, | ||
"renderBody": out => { | ||
out.w(`<input${_marko_props(out, _componentDef, 0, "0")}${_marko_attr("id", _componentDef.elId("input1"))}>`); | ||
} | ||
}, out, _componentDef, "0"); | ||
}, { | ||
t: _marko_componentType, | ||
i: true, | ||
d: true | ||
}, _marko_component); |
21 changes: 21 additions & 0 deletions
21
...class/test/translator/fixtures/attr-no-update-scoped/snapshots/htmlProduction-expected.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import { t as _t } from "marko/dist/runtime/html/index.js"; | ||
const _marko_componentType = "FiW8Sbt", | ||
_marko_template = _t(_marko_componentType); | ||
export default _marko_template; | ||
import _marko_props from "marko/dist/runtime/html/helpers/data-marko.js"; | ||
import _marko_attr from "marko/dist/runtime/html/helpers/attr.js"; | ||
import _preserve from "marko/dist/core-tags/components/preserve-tag.js"; | ||
import _marko_tag from "marko/dist/runtime/helpers/render-tag.js"; | ||
import _marko_renderer from "marko/dist/runtime/components/renderer.js"; | ||
const _marko_component = {}; | ||
_marko_template._ = _marko_renderer(function (input, out, _componentDef, _component, state, $global) { | ||
_marko_tag(_preserve, { | ||
"n": true, | ||
"renderBody": out => { | ||
out.w(`<input${_marko_props(out, _componentDef, 0, "0")}${_marko_attr("id", _componentDef.elId("input1"))}>`); | ||
} | ||
}, out, _componentDef, "0"); | ||
}, { | ||
t: _marko_componentType, | ||
i: true | ||
}, _marko_component); |
Empty file.
26 changes: 26 additions & 0 deletions
26
...s/runtime-class/test/translator/fixtures/attr-no-update-scoped/snapshots/vdom-expected.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import { t as _t } from "marko/src/runtime/vdom/index.js"; | ||
const _marko_componentType = "__tests__/template.marko", | ||
_marko_template = _t(_marko_componentType); | ||
export default _marko_template; | ||
import _preserve from "marko/src/core-tags/components/preserve-tag.js"; | ||
import _marko_tag from "marko/src/runtime/helpers/render-tag.js"; | ||
import _marko_renderer from "marko/src/runtime/components/renderer.js"; | ||
import { r as _marko_registerComponent } from "marko/src/runtime/components/registry.js"; | ||
_marko_registerComponent(_marko_componentType, () => _marko_template); | ||
const _marko_component = {}; | ||
_marko_template._ = _marko_renderer(function (input, out, _componentDef, _component, state, $global) { | ||
_marko_tag(_preserve, { | ||
"n": true, | ||
"renderBody": out => { | ||
out.e("input", { | ||
"id": _componentDef.elId("input1") | ||
}, "0", _component, 0, 1); | ||
} | ||
}, out, _componentDef, "0"); | ||
}, { | ||
t: _marko_componentType, | ||
i: true, | ||
d: true | ||
}, _marko_component); | ||
import _marko_defineComponent from "marko/src/runtime/components/defineComponent.js"; | ||
_marko_template.Component = _marko_defineComponent(_marko_component, _marko_template._); |
25 changes: 25 additions & 0 deletions
25
...class/test/translator/fixtures/attr-no-update-scoped/snapshots/vdomProduction-expected.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import { t as _t } from "marko/dist/runtime/vdom/index.js"; | ||
const _marko_componentType = "FiW8Sbt", | ||
_marko_template = _t(_marko_componentType); | ||
export default _marko_template; | ||
import _preserve from "marko/dist/core-tags/components/preserve-tag.js"; | ||
import _marko_tag from "marko/dist/runtime/helpers/render-tag.js"; | ||
import _marko_renderer from "marko/dist/runtime/components/renderer.js"; | ||
import { r as _marko_registerComponent } from "marko/dist/runtime/components/registry.js"; | ||
_marko_registerComponent(_marko_componentType, () => _marko_template); | ||
const _marko_component = {}; | ||
_marko_template._ = _marko_renderer(function (input, out, _componentDef, _component, state, $global) { | ||
_marko_tag(_preserve, { | ||
"n": true, | ||
"renderBody": out => { | ||
out.e("input", { | ||
"id": _componentDef.elId("input1") | ||
}, "0", _component, 0, 1); | ||
} | ||
}, out, _componentDef, "0"); | ||
}, { | ||
t: _marko_componentType, | ||
i: true | ||
}, _marko_component); | ||
import _marko_defineComponent from "marko/dist/runtime/components/defineComponent.js"; | ||
_marko_template.Component = _marko_defineComponent(_marko_component, _marko_template._); |
1 change: 1 addition & 0 deletions
1
packages/runtime-class/test/translator/fixtures/attr-no-update-scoped/template.marko
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<input id:scoped="input1" no-update> |