"size-baseline": "node scripts/build.js vue -f esm-bundler-runtime && node scripts/build.js runtime-dom runtime-core reactivity shared -f esm-bundler && cd packages/size-check && vite build && node brotli",
"check": "tsc --incremental --noEmit",
"lint": "eslint --cache --ext .ts packages/*/{src,__tests__}/**.ts",
- "format": "prettier --write --cache --parser typescript \"**/*.[tj]s?(x)\"",
- "format-check": "prettier --check --cache --parser typescript \"**/*.[tj]s?(x)\"",
+ "format": "prettier --write --cache \"**/*.[tj]s?(x)\"",
+ "format-check": "prettier --check --cache \"**/*.[tj]s?(x)\"",
"test": "vitest",
"test-unit": "vitest -c vitest.unit.config.ts",
"test-e2e": "node scripts/build.js vue -f global -d && vitest -c vitest.e2e.config.ts",
"marked": "^4.0.10",
"minimist": "^1.2.0",
"npm-run-all": "^4.1.5",
- "prettier": "^2.7.1",
+ "prettier": "^3.0.1",
"pug": "^3.0.1",
"puppeteer": "~19.6.0",
"rollup": "^3.26.0",
)}`
}
}
- if (prop.type === NodeTypes.ATTRIBUTE && prop.name === 'ref' && prop.value?.content) {
+ if (
+ prop.type === NodeTypes.ATTRIBUTE &&
+ prop.name === 'ref' &&
+ prop.value?.content
+ ) {
code += `,${prop.value.content}`
}
}
)
})
-describe('defineProps w/ generic type declaration + withDefaults', <T extends number, TA extends {
+describe('defineProps w/ generic type declaration + withDefaults', <T extends
+ number, TA extends {
a: string
}, TString extends string>() => {
const res = withDefaults(
n: 123,
generic1: () => [123, 33] as T[],
- generic2: () => ({ x: 123 } as { x: T }),
+ generic2: () => ({ x: 123 }) as { x: T },
generic3: () => 'test' as TString,
- generic4: () => ({ a: 'test' } as TA)
+ generic4: () => ({ a: 'test' }) as TA
}
)
public dep?: Dep = undefined
public readonly __v_isRef = true
- constructor(value: T, public readonly __v_isShallow: boolean) {
+ constructor(
+ value: T,
+ public readonly __v_isShallow: boolean
+ ) {
this._rawValue = __v_isShallow ? value : toRaw(value)
this._value = __v_isShallow ? value : toReactive(value)
}
render() {
return this[injectedKey]
}
- } as any)
+ }) as any
const ChildA = defineChild(['a'], 'a')
const ChildB = defineChild({ b: 'a' })
const toggle = ref(true)
const Comp = defineComponent(
- () => () => toggle.value ? h('div', { ref: fn }) : null
+ () => () => (toggle.value ? h('div', { ref: fn }) : null)
)
render(h(Comp), root)
expect(fn.mock.calls[0][0]).toBe(root.children[0])
// Force-casted public typing for h and TSX props inference
export const Teleport = TeleportImpl as unknown as {
__isTeleport: true
- new(): {
+ new (): {
$props: VNodeProps & TeleportProps
$slots: {
default(): VNode[]
specifier: ^4.1.5
version: 4.1.5
prettier:
- specifier: ^2.7.1
- version: 2.8.8
+ specifier: ^3.0.1
+ version: 3.0.1
pug:
specifier: ^3.0.1
version: 3.0.2
engines: {node: '>= 0.8.0'}
dev: true
- /prettier@2.8.8:
- resolution: {integrity: sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==}
- engines: {node: '>=10.13.0'}
+ /prettier@3.0.1:
+ resolution: {integrity: sha512-fcOWSnnpCrovBsmFZIGIy9UqK2FaI7Hqax+DIO0A9UxeVoY4iweyaFjS5TavZN97Hfehph0nhsZnjlVKzEQSrQ==}
+ engines: {node: '>=14'}
hasBin: true
dev: true