chore: run updated prettier

This commit is contained in:
Evan You
2021-07-19 18:24:18 -04:00
parent 69344ff1ae
commit 47f488350c
110 changed files with 695 additions and 698 deletions

View File

@@ -71,9 +71,10 @@ describe('ssr: element', () => {
`)
})
test("multiple _ssrInterpolate at parent and child import dependency once", () => {
expect( compile(`<div>{{ hello }}<textarea v-bind="a"></textarea></div>`).code)
.toMatchInlineSnapshot(`
test('multiple _ssrInterpolate at parent and child import dependency once', () => {
expect(
compile(`<div>{{ hello }}<textarea v-bind="a"></textarea></div>`).code
).toMatchInlineSnapshot(`
"const { ssrRenderAttrs: _ssrRenderAttrs, ssrInterpolate: _ssrInterpolate } = require(\\"@vue/server-renderer\\")
return function ssrRender(_ctx, _push, _parent, _attrs) {
@@ -89,8 +90,8 @@ describe('ssr: element', () => {
_ssrInterpolate((\\"value\\" in _temp0) ? _temp0.value : \\"\\")
}</textarea></div>\`)
}"
`);
});
`)
})
test('should pass tag to custom elements w/ dynamic v-bind', () => {
expect(

View File

@@ -56,11 +56,10 @@ export function ssrCodegenTransform(ast: RootNode, options: CompilerOptions) {
// Finalize helpers.
// We need to separate helpers imported from 'vue' vs. '@vue/server-renderer'
ast.ssrHelpers = Array.from(new Set([
...ast.helpers.filter(h => h in ssrHelpers),
...context.helpers
]))
ast.ssrHelpers = Array.from(
new Set([...ast.helpers.filter(h => h in ssrHelpers), ...context.helpers])
)
ast.helpers = ast.helpers.filter(h => !(h in ssrHelpers))
}

View File

@@ -225,9 +225,8 @@ export function ssrProcessComponent(
export const rawOptionsMap = new WeakMap<RootNode, CompilerOptions>()
const [baseNodeTransforms, baseDirectiveTransforms] = getBaseTransformPreset(
true
)
const [baseNodeTransforms, baseDirectiveTransforms] =
getBaseTransformPreset(true)
const vnodeNodeTransforms = [...baseNodeTransforms, ...DOMNodeTransforms]
const vnodeDirectiveTransforms = {
...baseDirectiveTransforms,