"
return function render() {
with (this) {
- return _ctx.foo + _toString(bar)
+ return _ctx.foo + _toDisplayString(bar)
}
}"
`;
"
return function render() {
with (this) {
- return _toString(hello)
+ return _toDisplayString(hello)
}
}"
`;
return function render() {
with (this) {
- const { toString: _toString, openBlock: _openBlock, createVNode: _createVNode, createBlock: _createBlock, createCommentVNode: _createCommentVNode, Fragment: _Fragment, renderList: _renderList, createTextVNode: _createTextVNode } = _Vue
+ const { toDisplayString: _toDisplayString, openBlock: _openBlock, createVNode: _createVNode, createBlock: _createBlock, createCommentVNode: _createCommentVNode, Fragment: _Fragment, renderList: _renderList, createTextVNode: _createTextVNode } = _Vue
return (_openBlock(), _createBlock(\\"div\\", {
id: \\"foo\\",
class: bar.baz
}, [
- _createTextVNode(_toString(world.burn()) + \\" \\", 1 /* TEXT */),
+ _createTextVNode(_toDisplayString(world.burn()) + \\" \\", 1 /* TEXT */),
(_openBlock(), ok
? _createBlock(\\"div\\", { key: 0 }, \\"yes\\")
: _createBlock(_Fragment, { key: 1 }, [\\"no\\"])),
(_openBlock(false), _createBlock(_Fragment, null, _renderList(list, (value, index) => {
return (_openBlock(), _createBlock(\\"div\\", null, [
- _createVNode(\\"span\\", null, _toString(value + index), 1 /* TEXT */)
+ _createVNode(\\"span\\", null, _toDisplayString(value + index), 1 /* TEXT */)
]))
}), 256 /* UNKEYED_FRAGMENT */))
], 2 /* CLASS */))
`;
exports[`compiler: integration tests function mode w/ prefixIdentifiers: true 1`] = `
-"const { toString, openBlock, createVNode, createBlock, createCommentVNode, Fragment, renderList, createTextVNode } = Vue
+"const { toDisplayString, openBlock, createVNode, createBlock, createCommentVNode, Fragment, renderList, createTextVNode } = Vue
return function render() {
const _ctx = this
id: \\"foo\\",
class: _ctx.bar.baz
}, [
- createTextVNode(toString(_ctx.world.burn()) + \\" \\", 1 /* TEXT */),
+ createTextVNode(toDisplayString(_ctx.world.burn()) + \\" \\", 1 /* TEXT */),
(openBlock(), (_ctx.ok)
? createBlock(\\"div\\", { key: 0 }, \\"yes\\")
: createBlock(Fragment, { key: 1 }, [\\"no\\"])),
(openBlock(false), createBlock(Fragment, null, renderList(_ctx.list, (value, index) => {
return (openBlock(), createBlock(\\"div\\", null, [
- createVNode(\\"span\\", null, toString(value + index), 1 /* TEXT */)
+ createVNode(\\"span\\", null, toDisplayString(value + index), 1 /* TEXT */)
]))
}), 256 /* UNKEYED_FRAGMENT */))
], 2 /* CLASS */))
`;
exports[`compiler: integration tests module mode 1`] = `
-"import { toString, openBlock, createVNode, createBlock, createCommentVNode, Fragment, renderList, createTextVNode } from \\"vue\\"
+"import { toDisplayString, openBlock, createVNode, createBlock, createCommentVNode, Fragment, renderList, createTextVNode } from \\"vue\\"
export function render() {
const _ctx = this
id: \\"foo\\",
class: _ctx.bar.baz
}, [
- createTextVNode(toString(_ctx.world.burn()) + \\" \\", 1 /* TEXT */),
+ createTextVNode(toDisplayString(_ctx.world.burn()) + \\" \\", 1 /* TEXT */),
(openBlock(), (_ctx.ok)
? createBlock(\\"div\\", { key: 0 }, \\"yes\\")
: createBlock(Fragment, { key: 1 }, [\\"no\\"])),
(openBlock(false), createBlock(Fragment, null, renderList(_ctx.list, (value, index) => {
return (openBlock(), createBlock(\\"div\\", null, [
- createVNode(\\"span\\", null, toString(value + index), 1 /* TEXT */)
+ createVNode(\\"span\\", null, toDisplayString(value + index), 1 /* TEXT */)
]))
}), 256 /* UNKEYED_FRAGMENT */))
], 2 /* CLASS */))
`;
exports[`scopeId compiler support should wrap named slots 1`] = `
-"import { toString, createTextVNode, createVNode, resolveComponent, createBlock, openBlock, withScopeId } from \\"vue\\"
+"import { toDisplayString, createTextVNode, createVNode, resolveComponent, createBlock, openBlock, withScopeId } from \\"vue\\"
const withId = withScopeId(\\"test\\")
export const render = withId(function render() {
return (openBlock(), createBlock(_component_Child, null, {
foo: withId(({ msg }) => [
- createTextVNode(toString(msg), 1 /* TEXT */)
+ createTextVNode(toDisplayString(msg), 1 /* TEXT */)
]),
bar: withId(() => [
createVNode(\\"div\\")
return function render() {
with (this) {
- const { toString: _toString, createVNode: _createVNode, createBlock: _createBlock, openBlock: _openBlock } = _Vue
+ const { toDisplayString: _toDisplayString, createVNode: _createVNode, createBlock: _createBlock, openBlock: _openBlock } = _Vue
return (_openBlock(), _createBlock(\\"div\\", null, [
- _createVNode(\\"div\\", _hoisted_1, _toString(hello), 1 /* TEXT */)
+ _createVNode(\\"div\\", _hoisted_1, _toDisplayString(hello), 1 /* TEXT */)
]))
}
}"
return function render() {
with (this) {
- const { toString: _toString, createVNode: _createVNode, createBlock: _createBlock, openBlock: _openBlock } = _Vue
+ const { toDisplayString: _toDisplayString, createVNode: _createVNode, createBlock: _createBlock, openBlock: _openBlock } = _Vue
return (_openBlock(), _createBlock(\\"div\\", null, [
- _createVNode(\\"span\\", _hoisted_1, _toString(_ctx.bar), 1 /* TEXT */)
+ _createVNode(\\"span\\", _hoisted_1, _toDisplayString(_ctx.bar), 1 /* TEXT */)
]))
}
}"
const _hoisted_1 = _createVNode(\\"span\\", null, [
\\"foo \\",
- _toString(1),
+ _toDisplayString(1),
\\" \\",
- _toString(true)
+ _toDisplayString(true)
])
return function render() {
with (this) {
- const { toString: _toString, createVNode: _createVNode, createBlock: _createBlock, openBlock: _openBlock } = _Vue
+ const { toDisplayString: _toDisplayString, createVNode: _createVNode, createBlock: _createBlock, openBlock: _openBlock } = _Vue
return (_openBlock(), _createBlock(\\"div\\", null, [
_hoisted_1
"const _Vue = Vue
const { createVNode: _createVNode } = Vue
-const _hoisted_1 = _createVNode(\\"span\\", { foo: 0 }, _toString(1))
+const _hoisted_1 = _createVNode(\\"span\\", { foo: 0 }, _toDisplayString(1))
return function render() {
with (this) {
- const { toString: _toString, createVNode: _createVNode, createBlock: _createBlock, openBlock: _openBlock } = _Vue
+ const { toDisplayString: _toDisplayString, createVNode: _createVNode, createBlock: _createBlock, openBlock: _openBlock } = _Vue
return (_openBlock(), _createBlock(\\"div\\", null, [
_hoisted_1
return function render() {
with (this) {
- const { renderList: _renderList, openBlock: _openBlock, createBlock: _createBlock, Fragment: _Fragment, toString: _toString, createVNode: _createVNode } = _Vue
+ const { renderList: _renderList, openBlock: _openBlock, createBlock: _createBlock, Fragment: _Fragment, toDisplayString: _toDisplayString, createVNode: _createVNode } = _Vue
return (_openBlock(), _createBlock(\\"div\\", null, [
(_openBlock(false), _createBlock(_Fragment, null, _renderList(_ctx.list, (o) => {
return (_openBlock(), _createBlock(\\"p\\", null, [
- _createVNode(\\"span\\", null, _toString(o + 'foo'), 1 /* TEXT */)
+ _createVNode(\\"span\\", null, _toDisplayString(o + 'foo'), 1 /* TEXT */)
]))
}), 256 /* UNKEYED_FRAGMENT */))
]))
return function render() {
with (this) {
- const { toString: _toString, resolveComponent: _resolveComponent, createVNode: _createVNode, createBlock: _createBlock, openBlock: _openBlock } = _Vue
+ const { toDisplayString: _toDisplayString, resolveComponent: _resolveComponent, createVNode: _createVNode, createBlock: _createBlock, openBlock: _openBlock } = _Vue
const _component_Comp = _resolveComponent(\\"Comp\\")
return (_openBlock(), _createBlock(_component_Comp, null, {
- default: ({ foo }) => [_toString(_ctx.foo)],
+ default: ({ foo }) => [_toDisplayString(_ctx.foo)],
_compiled: true
}))
}
return function render() {
with (this) {
- const { renderList: _renderList, openBlock: _openBlock, createBlock: _createBlock, Fragment: _Fragment, toString: _toString, createVNode: _createVNode } = _Vue
+ const { renderList: _renderList, openBlock: _openBlock, createBlock: _createBlock, Fragment: _Fragment, toDisplayString: _toDisplayString, createVNode: _createVNode } = _Vue
return (_openBlock(), _createBlock(\\"div\\", null, [
(_openBlock(false), _createBlock(_Fragment, null, _renderList(_ctx.list, (o) => {
return (_openBlock(), _createBlock(\\"p\\", null, [
- _createVNode(\\"span\\", null, _toString(o), 1 /* TEXT */)
+ _createVNode(\\"span\\", null, _toDisplayString(o), 1 /* TEXT */)
]))
}), 256 /* UNKEYED_FRAGMENT */))
]))
return function render() {
with (this) {
- const { toString: _toString } = _Vue
+ const { toDisplayString: _toDisplayString } = _Vue
- return _toString(foo) + \\" bar \\" + _toString(baz)
+ return _toDisplayString(foo) + \\" bar \\" + _toDisplayString(baz)
}
}"
`;
return function render() {
with (this) {
- const { createVNode: _createVNode, toString: _toString, createTextVNode: _createTextVNode, createBlock: _createBlock, Fragment: _Fragment, openBlock: _openBlock } = _Vue
+ const { createVNode: _createVNode, toDisplayString: _toDisplayString, createTextVNode: _createTextVNode, createBlock: _createBlock, Fragment: _Fragment, openBlock: _openBlock } = _Vue
return (_openBlock(), _createBlock(_Fragment, null, [
_createVNode(\\"div\\"),
- _createTextVNode(_toString(foo) + \\" bar \\" + _toString(baz), 1 /* TEXT */),
+ _createTextVNode(_toDisplayString(foo) + \\" bar \\" + _toDisplayString(baz), 1 /* TEXT */),
_createVNode(\\"div\\")
], 64 /* STABLE_FRAGMENT */))
}
return function render() {
with (this) {
- const { createVNode: _createVNode, toString: _toString, createTextVNode: _createTextVNode, createBlock: _createBlock, Fragment: _Fragment, openBlock: _openBlock } = _Vue
+ const { createVNode: _createVNode, toDisplayString: _toDisplayString, createTextVNode: _createTextVNode, createBlock: _createBlock, Fragment: _Fragment, openBlock: _openBlock } = _Vue
return (_openBlock(), _createBlock(_Fragment, null, [
_createVNode(\\"div\\"),
- _createTextVNode(_toString(foo) + \\" bar \\" + _toString(baz), 1 /* TEXT */),
+ _createTextVNode(_toDisplayString(foo) + \\" bar \\" + _toDisplayString(baz), 1 /* TEXT */),
_createVNode(\\"div\\"),
_createTextVNode(\\"hello\\"),
_createVNode(\\"div\\")
return function render() {
with (this) {
- const { toString: _toString } = _Vue
+ const { toDisplayString: _toDisplayString } = _Vue
- return _toString(foo)
+ return _toDisplayString(foo)
}
}"
`;
`;
exports[`compiler: transform text with prefixIdentifiers: true 1`] = `
-"const { toString } = Vue
+"const { toDisplayString } = Vue
return function render() {
const _ctx = this
- return toString(_ctx.foo) + \\" bar \\" + toString(_ctx.baz + _ctx.qux)
+ return toDisplayString(_ctx.foo) + \\" bar \\" + toDisplayString(_ctx.baz + _ctx.qux)
}"
`;
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`compiler: transform component slots dynamically named slots 1`] = `
-"const { toString, resolveComponent, createVNode, createBlock, openBlock } = Vue
+"const { toDisplayString, resolveComponent, createVNode, createBlock, openBlock } = Vue
return function render() {
const _ctx = this
const _component_Comp = resolveComponent(\\"Comp\\")
return (openBlock(), createBlock(_component_Comp, null, {
- [_ctx.one]: ({ foo }) => [toString(foo), toString(_ctx.bar)],
- [_ctx.two]: ({ bar }) => [toString(_ctx.foo), toString(bar)],
+ [_ctx.one]: ({ foo }) => [toDisplayString(foo), toDisplayString(_ctx.bar)],
+ [_ctx.two]: ({ bar }) => [toDisplayString(_ctx.foo), toDisplayString(bar)],
_compiled: true
}, 512 /* DYNAMIC_SLOTS */))
}"
`;
exports[`compiler: transform component slots named slot with v-for w/ prefixIdentifiers: true 1`] = `
-"const { toString, resolveComponent, renderList, createSlots, createVNode, createBlock, openBlock } = Vue
+"const { toDisplayString, resolveComponent, renderList, createSlots, createVNode, createBlock, openBlock } = Vue
return function render() {
const _ctx = this
renderList(_ctx.list, (name) => {
return {
name: name,
- fn: () => [toString(name)]
+ fn: () => [toDisplayString(name)]
}
})
]), 512 /* DYNAMIC_SLOTS */))
`;
exports[`compiler: transform component slots named slot with v-if + prefixIdentifiers: true 1`] = `
-"const { toString, resolveComponent, createSlots, createVNode, createBlock, openBlock } = Vue
+"const { toDisplayString, resolveComponent, createSlots, createVNode, createBlock, openBlock } = Vue
return function render() {
const _ctx = this
(_ctx.ok)
? {
name: \\"one\\",
- fn: (props) => [toString(props)]
+ fn: (props) => [toDisplayString(props)]
}
: undefined
]), 512 /* DYNAMIC_SLOTS */))
`;
exports[`compiler: transform component slots named slots 1`] = `
-"const { toString, resolveComponent, createVNode, createBlock, openBlock } = Vue
+"const { toDisplayString, resolveComponent, createVNode, createBlock, openBlock } = Vue
return function render() {
const _ctx = this
const _component_Comp = resolveComponent(\\"Comp\\")
return (openBlock(), createBlock(_component_Comp, null, {
- one: ({ foo }) => [toString(foo), toString(_ctx.bar)],
- two: ({ bar }) => [toString(_ctx.foo), toString(bar)],
+ one: ({ foo }) => [toDisplayString(foo), toDisplayString(_ctx.bar)],
+ two: ({ bar }) => [toDisplayString(_ctx.foo), toDisplayString(bar)],
_compiled: true
}))
}"
`;
exports[`compiler: transform component slots nested slots scoping 1`] = `
-"const { toString, resolveComponent, createVNode, createBlock, openBlock } = Vue
+"const { toDisplayString, resolveComponent, createVNode, createBlock, openBlock } = Vue
return function render() {
const _ctx = this
return (openBlock(), createBlock(_component_Comp, null, {
default: ({ foo }) => [
createVNode(_component_Inner, null, {
- default: ({ bar }) => [toString(foo), toString(bar), toString(_ctx.baz)],
+ default: ({ bar }) => [toDisplayString(foo), toDisplayString(bar), toDisplayString(_ctx.baz)],
_compiled: true
}, 512 /* DYNAMIC_SLOTS */),
\\" \\",
- toString(foo),
- toString(_ctx.bar),
- toString(_ctx.baz)
+ toDisplayString(foo),
+ toDisplayString(_ctx.bar),
+ toDisplayString(_ctx.baz)
],
_compiled: true
}))
`;
exports[`compiler: transform component slots on-component default slot 1`] = `
-"const { toString, resolveComponent, createVNode, createBlock, openBlock } = Vue
+"const { toDisplayString, resolveComponent, createVNode, createBlock, openBlock } = Vue
return function render() {
const _ctx = this
const _component_Comp = resolveComponent(\\"Comp\\")
return (openBlock(), createBlock(_component_Comp, null, {
- default: ({ foo }) => [toString(foo), toString(_ctx.bar)],
+ default: ({ foo }) => [toDisplayString(foo), toDisplayString(_ctx.bar)],
_compiled: true
}))
}"
exports[`source map 1`] = `
Object {
- "mappings": ";;;;UAAA,aACE,YAA8B;IAAzB,YAAmB,oBAAbA,WAAM",
+ "mappings": ";;;;UAAA,aACE,YAA8B;IAAzB,YAAmB,2BAAbA,WAAM",
"names": Array [
"render",
],