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

@@ -3,15 +3,8 @@ import path from 'path'
import { h, createApp, Transition, ref, nextTick } from 'vue'
describe('e2e: Transition', () => {
const {
page,
html,
classList,
isVisible,
timeout,
nextFrame,
click
} = setupPuppeteer()
const { page, html, classList, isVisible, timeout, nextFrame, click } =
setupPuppeteer()
const baseUrl = `file://${path.resolve(__dirname, './transition.html')}`
const duration = process.env.CI ? 200 : 50
@@ -21,7 +14,7 @@ describe('e2e: Transition', () => {
const classWhenTransitionStart = () =>
page().evaluate(() => {
(document.querySelector('#toggleBtn') as any)!.click()
;(document.querySelector('#toggleBtn') as any)!.click()
return Promise.resolve().then(() => {
return document.querySelector('#container div')!.className.split(/\s+/g)
})
@@ -1066,7 +1059,7 @@ describe('e2e: Transition', () => {
// change view -> 'two'
await page().evaluate(() => {
(document.querySelector('#changeViewBtn') as any)!.click()
;(document.querySelector('#changeViewBtn') as any)!.click()
})
// enter
expect(await classWhenTransitionStart()).toStrictEqual([
@@ -1085,7 +1078,7 @@ describe('e2e: Transition', () => {
// change view -> 'one'
await page().evaluate(() => {
(document.querySelector('#changeViewBtn') as any)!.click()
;(document.querySelector('#changeViewBtn') as any)!.click()
})
// leave
expect(await classWhenTransitionStart()).toStrictEqual([
@@ -1172,7 +1165,7 @@ describe('e2e: Transition', () => {
// enter
const enterClass = await page().evaluate(async () => {
(document.querySelector('#toggleBtn') as any)!.click()
;(document.querySelector('#toggleBtn') as any)!.click()
// nextTrick for patch start
await Promise.resolve()
// nextTrick for Suspense resolve
@@ -2001,10 +1994,8 @@ describe('e2e: Transition', () => {
const root = document.createElement('div')
createApp({
render() {
return h(
MyTransition,
{ onLeave: () => outerSpy() },
() => (toggle.value ? h('div') : null)
return h(MyTransition, { onLeave: () => outerSpy() }, () =>
toggle.value ? h('div') : null
)
}
}).mount(root)

View File

@@ -11,7 +11,7 @@ describe('e2e: TransitionGroup', () => {
const htmlWhenTransitionStart = () =>
page().evaluate(() => {
(document.querySelector('#toggleBtn') as any)!.click()
;(document.querySelector('#toggleBtn') as any)!.click()
return Promise.resolve().then(() => {
return document.querySelector('#container')!.innerHTML
})

View File

@@ -18,11 +18,9 @@ export default {
message: 'test: add test for runtime-dom/modules/class (#75)',
tree: {
sha: 'f53f761827af281db86c31d113086c068c1d0789',
url:
'https://api.github.com/repos/vuejs/vue-next/git/trees/f53f761827af281db86c31d113086c068c1d0789'
url: 'https://api.github.com/repos/vuejs/vue-next/git/trees/f53f761827af281db86c31d113086c068c1d0789'
},
url:
'https://api.github.com/repos/vuejs/vue-next/git/commits/d1527fbee422c7170e56845e55b49c4fd6de72a7',
url: 'https://api.github.com/repos/vuejs/vue-next/git/commits/d1527fbee422c7170e56845e55b49c4fd6de72a7',
comment_count: 0,
verification: {
verified: false,
@@ -31,8 +29,7 @@ export default {
payload: null
}
},
url:
'https://api.github.com/repos/vuejs/vue-next/commits/d1527fbee422c7170e56845e55b49c4fd6de72a7',
url: 'https://api.github.com/repos/vuejs/vue-next/commits/d1527fbee422c7170e56845e55b49c4fd6de72a7',
html_url:
'https://github.com/vuejs/vue-next/commit/d1527fbee422c7170e56845e55b49c4fd6de72a7',
comments_url:
@@ -87,8 +84,7 @@ export default {
parents: [
{
sha: '2383b45e322272ddc102d6914c149b284a25d04f',
url:
'https://api.github.com/repos/vuejs/vue-next/commits/2383b45e322272ddc102d6914c149b284a25d04f',
url: 'https://api.github.com/repos/vuejs/vue-next/commits/2383b45e322272ddc102d6914c149b284a25d04f',
html_url:
'https://github.com/vuejs/vue-next/commit/2383b45e322272ddc102d6914c149b284a25d04f'
}
@@ -112,11 +108,9 @@ export default {
message: 'chore: fix typo (#530) [ci skip]',
tree: {
sha: '2a5872ff8dc8ccb8121abd7e890ac3c0c9f1209f',
url:
'https://api.github.com/repos/vuejs/vue-next/git/trees/2a5872ff8dc8ccb8121abd7e890ac3c0c9f1209f'
url: 'https://api.github.com/repos/vuejs/vue-next/git/trees/2a5872ff8dc8ccb8121abd7e890ac3c0c9f1209f'
},
url:
'https://api.github.com/repos/vuejs/vue-next/git/commits/2383b45e322272ddc102d6914c149b284a25d04f',
url: 'https://api.github.com/repos/vuejs/vue-next/git/commits/2383b45e322272ddc102d6914c149b284a25d04f',
comment_count: 0,
verification: {
verified: false,
@@ -125,8 +119,7 @@ export default {
payload: null
}
},
url:
'https://api.github.com/repos/vuejs/vue-next/commits/2383b45e322272ddc102d6914c149b284a25d04f',
url: 'https://api.github.com/repos/vuejs/vue-next/commits/2383b45e322272ddc102d6914c149b284a25d04f',
html_url:
'https://github.com/vuejs/vue-next/commit/2383b45e322272ddc102d6914c149b284a25d04f',
comments_url:
@@ -182,8 +175,7 @@ export default {
parents: [
{
sha: 'e7e1314cccd1a66fcf8b8526ec21350ec16cc3ad',
url:
'https://api.github.com/repos/vuejs/vue-next/commits/e7e1314cccd1a66fcf8b8526ec21350ec16cc3ad',
url: 'https://api.github.com/repos/vuejs/vue-next/commits/e7e1314cccd1a66fcf8b8526ec21350ec16cc3ad',
html_url:
'https://github.com/vuejs/vue-next/commit/e7e1314cccd1a66fcf8b8526ec21350ec16cc3ad'
}
@@ -207,11 +199,9 @@ export default {
message: 'test: fix warning',
tree: {
sha: 'd942b17681e2e2fbbcd2ee04092390c7f2cf534d',
url:
'https://api.github.com/repos/vuejs/vue-next/git/trees/d942b17681e2e2fbbcd2ee04092390c7f2cf534d'
url: 'https://api.github.com/repos/vuejs/vue-next/git/trees/d942b17681e2e2fbbcd2ee04092390c7f2cf534d'
},
url:
'https://api.github.com/repos/vuejs/vue-next/git/commits/e7e1314cccd1a66fcf8b8526ec21350ec16cc3ad',
url: 'https://api.github.com/repos/vuejs/vue-next/git/commits/e7e1314cccd1a66fcf8b8526ec21350ec16cc3ad',
comment_count: 0,
verification: {
verified: false,
@@ -220,8 +210,7 @@ export default {
payload: null
}
},
url:
'https://api.github.com/repos/vuejs/vue-next/commits/e7e1314cccd1a66fcf8b8526ec21350ec16cc3ad',
url: 'https://api.github.com/repos/vuejs/vue-next/commits/e7e1314cccd1a66fcf8b8526ec21350ec16cc3ad',
html_url:
'https://github.com/vuejs/vue-next/commit/e7e1314cccd1a66fcf8b8526ec21350ec16cc3ad',
comments_url:
@@ -277,8 +266,7 @@ export default {
parents: [
{
sha: '12ec62e6881f83dfa6c7f8a3c3650ec2567e6b1e',
url:
'https://api.github.com/repos/vuejs/vue-next/commits/12ec62e6881f83dfa6c7f8a3c3650ec2567e6b1e',
url: 'https://api.github.com/repos/vuejs/vue-next/commits/12ec62e6881f83dfa6c7f8a3c3650ec2567e6b1e',
html_url:
'https://github.com/vuejs/vue-next/commit/12ec62e6881f83dfa6c7f8a3c3650ec2567e6b1e'
}
@@ -304,11 +292,9 @@ export default {
message: 'chore: fix tests',
tree: {
sha: '6ac7bd078a6eb0ad32b5102e0c5d2c29f2b20a48',
url:
'https://api.github.com/repos/vuejs/vue-next/git/trees/6ac7bd078a6eb0ad32b5102e0c5d2c29f2b20a48'
url: 'https://api.github.com/repos/vuejs/vue-next/git/trees/6ac7bd078a6eb0ad32b5102e0c5d2c29f2b20a48'
},
url:
'https://api.github.com/repos/vuejs/vue-next/git/commits/ecf4da822eea97f5db5fa769d39f994755384a4b',
url: 'https://api.github.com/repos/vuejs/vue-next/git/commits/ecf4da822eea97f5db5fa769d39f994755384a4b',
comment_count: 0,
verification: {
verified: false,
@@ -317,8 +303,7 @@ export default {
payload: null
}
},
url:
'https://api.github.com/repos/vuejs/vue-next/commits/ecf4da822eea97f5db5fa769d39f994755384a4b',
url: 'https://api.github.com/repos/vuejs/vue-next/commits/ecf4da822eea97f5db5fa769d39f994755384a4b',
html_url:
'https://github.com/vuejs/vue-next/commit/ecf4da822eea97f5db5fa769d39f994755384a4b',
comments_url:
@@ -374,8 +359,7 @@ export default {
parents: [
{
sha: 'ca296812d54aff123472d7147b83fddfb634d9bc',
url:
'https://api.github.com/repos/vuejs/vue-next/commits/ca296812d54aff123472d7147b83fddfb634d9bc',
url: 'https://api.github.com/repos/vuejs/vue-next/commits/ca296812d54aff123472d7147b83fddfb634d9bc',
html_url:
'https://github.com/vuejs/vue-next/commit/ca296812d54aff123472d7147b83fddfb634d9bc'
}
@@ -399,11 +383,9 @@ export default {
message: 'refactor: bring back clone for reused nodes',
tree: {
sha: '2cec32c97686e0ee9af1b87f0abdbbbdc18b6de6',
url:
'https://api.github.com/repos/vuejs/vue-next/git/trees/2cec32c97686e0ee9af1b87f0abdbbbdc18b6de6'
url: 'https://api.github.com/repos/vuejs/vue-next/git/trees/2cec32c97686e0ee9af1b87f0abdbbbdc18b6de6'
},
url:
'https://api.github.com/repos/vuejs/vue-next/git/commits/ca296812d54aff123472d7147b83fddfb634d9bc',
url: 'https://api.github.com/repos/vuejs/vue-next/git/commits/ca296812d54aff123472d7147b83fddfb634d9bc',
comment_count: 0,
verification: {
verified: false,
@@ -412,8 +394,7 @@ export default {
payload: null
}
},
url:
'https://api.github.com/repos/vuejs/vue-next/commits/ca296812d54aff123472d7147b83fddfb634d9bc',
url: 'https://api.github.com/repos/vuejs/vue-next/commits/ca296812d54aff123472d7147b83fddfb634d9bc',
html_url:
'https://github.com/vuejs/vue-next/commit/ca296812d54aff123472d7147b83fddfb634d9bc',
comments_url:
@@ -469,8 +450,7 @@ export default {
parents: [
{
sha: 'e6be55a4989edb6f8750dbaa14eb693ec1f0d67b',
url:
'https://api.github.com/repos/vuejs/vue-next/commits/e6be55a4989edb6f8750dbaa14eb693ec1f0d67b',
url: 'https://api.github.com/repos/vuejs/vue-next/commits/e6be55a4989edb6f8750dbaa14eb693ec1f0d67b',
html_url:
'https://github.com/vuejs/vue-next/commit/e6be55a4989edb6f8750dbaa14eb693ec1f0d67b'
}
@@ -494,11 +474,9 @@ export default {
message: 'chore: relax render type for tsx',
tree: {
sha: '7e2b3bb92ab91f755b2251e4a7903e6dd2042602',
url:
'https://api.github.com/repos/vuejs/vue-next/git/trees/7e2b3bb92ab91f755b2251e4a7903e6dd2042602'
url: 'https://api.github.com/repos/vuejs/vue-next/git/trees/7e2b3bb92ab91f755b2251e4a7903e6dd2042602'
},
url:
'https://api.github.com/repos/vuejs/vue-next/git/commits/e6be55a4989edb6f8750dbaa14eb693ec1f0d67b',
url: 'https://api.github.com/repos/vuejs/vue-next/git/commits/e6be55a4989edb6f8750dbaa14eb693ec1f0d67b',
comment_count: 0,
verification: {
verified: false,
@@ -507,8 +485,7 @@ export default {
payload: null
}
},
url:
'https://api.github.com/repos/vuejs/vue-next/commits/e6be55a4989edb6f8750dbaa14eb693ec1f0d67b',
url: 'https://api.github.com/repos/vuejs/vue-next/commits/e6be55a4989edb6f8750dbaa14eb693ec1f0d67b',
html_url:
'https://github.com/vuejs/vue-next/commit/e6be55a4989edb6f8750dbaa14eb693ec1f0d67b',
comments_url:
@@ -564,8 +541,7 @@ export default {
parents: [
{
sha: 'ccc835caff0344baad3c92ce786ad4f804bf667b',
url:
'https://api.github.com/repos/vuejs/vue-next/commits/ccc835caff0344baad3c92ce786ad4f804bf667b',
url: 'https://api.github.com/repos/vuejs/vue-next/commits/ccc835caff0344baad3c92ce786ad4f804bf667b',
html_url:
'https://github.com/vuejs/vue-next/commit/ccc835caff0344baad3c92ce786ad4f804bf667b'
}

View File

@@ -74,9 +74,9 @@ function compileToFunction(
// with keys that cannot be mangled, and can be quite heavy size-wise.
// In the global build we know `Vue` is available globally so we can avoid
// the wildcard object.
const render = (__GLOBAL__
? new Function(code)()
: new Function('Vue', code)(runtimeDom)) as RenderFunction
const render = (
__GLOBAL__ ? new Function(code)() : new Function('Vue', code)(runtimeDom)
) as RenderFunction
// mark the function as runtime compiled
;(render as InternalRenderFunction)._rc = true

View File

@@ -16,10 +16,10 @@ export const compile = () => {
(__ESM_BUNDLER__
? ` Configure your bundler to alias "vue" to "vue/dist/vue.esm-bundler.js".`
: __ESM_BROWSER__
? ` Use "vue.esm-browser.js" instead.`
: __GLOBAL__
? ` Use "vue.global.js" instead.`
: ``) /* should not happen */
? ` Use "vue.esm-browser.js" instead.`
: __GLOBAL__
? ` Use "vue.global.js" instead.`
: ``) /* should not happen */
)
}
}