mirror of https://github.com/vuejs/core.git
Merge remote-tracking branch 'upstream/main'
This commit is contained in:
commit
7aae631d8c
|
@ -773,7 +773,7 @@ may cause build issues in projects still using TS 3.x.
|
||||||
- **types:** adjust type exports for manual render function and tooling usage ([e4dc03a](https://github.com/vuejs/core/commit/e4dc03a8b17d5e9f167de6a62a645878ac7ef3e2)), closes [#1329](https://github.com/vuejs/core/issues/1329)
|
- **types:** adjust type exports for manual render function and tooling usage ([e4dc03a](https://github.com/vuejs/core/commit/e4dc03a8b17d5e9f167de6a62a645878ac7ef3e2)), closes [#1329](https://github.com/vuejs/core/issues/1329)
|
||||||
- **types:** mixins/extends support in TypeScript ([#626](https://github.com/vuejs/core/issues/626)) ([d3c436a](https://github.com/vuejs/core/commit/d3c436ae2e66b75b7f2ed574dadda3f0e1fdce73))
|
- **types:** mixins/extends support in TypeScript ([#626](https://github.com/vuejs/core/issues/626)) ([d3c436a](https://github.com/vuejs/core/commit/d3c436ae2e66b75b7f2ed574dadda3f0e1fdce73))
|
||||||
- **types:** support typing directive value via generic argument ([#1007](https://github.com/vuejs/core/issues/1007)) ([419b86d](https://github.com/vuejs/core/commit/419b86d1908f2a0521e6a7eafcbee764e9ee59a0)), closes [#998](https://github.com/vuejs/core/issues/998)
|
- **types:** support typing directive value via generic argument ([#1007](https://github.com/vuejs/core/issues/1007)) ([419b86d](https://github.com/vuejs/core/commit/419b86d1908f2a0521e6a7eafcbee764e9ee59a0)), closes [#998](https://github.com/vuejs/core/issues/998)
|
||||||
- **types:** update to Typescript 3.9 ([#1106](https://github.com/vuejs/core/issues/1106)) ([97dedeb](https://github.com/vuejs/core/commit/97dedebd8097116a16209664a1ca38392b964da3))
|
- **types:** update to TypeScript 3.9 ([#1106](https://github.com/vuejs/core/issues/1106)) ([97dedeb](https://github.com/vuejs/core/commit/97dedebd8097116a16209664a1ca38392b964da3))
|
||||||
|
|
||||||
### Performance Improvements
|
### Performance Improvements
|
||||||
|
|
||||||
|
|
|
@ -76,7 +76,7 @@
|
||||||
"@typescript-eslint/parser": "^6.18.1",
|
"@typescript-eslint/parser": "^6.18.1",
|
||||||
"@vitest/coverage-istanbul": "^1.2.2",
|
"@vitest/coverage-istanbul": "^1.2.2",
|
||||||
"@vitest/ui": "^1.2.2",
|
"@vitest/ui": "^1.2.2",
|
||||||
"@vue/consolidate": "0.17.3",
|
"@vue/consolidate": "1.0.0",
|
||||||
"conventional-changelog-cli": "^4.1.0",
|
"conventional-changelog-cli": "^4.1.0",
|
||||||
"enquirer": "^2.4.1",
|
"enquirer": "^2.4.1",
|
||||||
"esbuild": "^0.20.0",
|
"esbuild": "^0.20.0",
|
||||||
|
|
|
@ -271,7 +271,7 @@ describe('compiler: transform v-on', () => {
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
test('should NOT wrap as function if expression is already function expression (with Typescript)', () => {
|
test('should NOT wrap as function if expression is already function expression (with TypeScript)', () => {
|
||||||
const { node } = parseWithVOn(`<div @click="(e: any): any => foo(e)"/>`)
|
const { node } = parseWithVOn(`<div @click="(e: any): any => foo(e)"/>`)
|
||||||
expect((node.codegenNode as VNodeCall).props).toMatchObject({
|
expect((node.codegenNode as VNodeCall).props).toMatchObject({
|
||||||
properties: [
|
properties: [
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
# dts-test
|
# dts-test
|
||||||
|
|
||||||
Tests Typescript types to ensure the types remain as expected.
|
Tests TypeScript types to ensure the types remain as expected.
|
||||||
|
|
||||||
- This directory is included in the root `tsconfig.json`, where package imports are aliased to `src` directories, so in IDEs and the `pnpm check` script the types are validated against source code.
|
- This directory is included in the root `tsconfig.json`, where package imports are aliased to `src` directories, so in IDEs and the `pnpm check` script the types are validated against source code.
|
||||||
|
|
||||||
|
|
|
@ -7,8 +7,6 @@
|
||||||
<link rel="icon" type="image/svg" href="/logo.svg" />
|
<link rel="icon" type="image/svg" href="/logo.svg" />
|
||||||
<title>Vue SFC Playground</title>
|
<title>Vue SFC Playground</title>
|
||||||
<script>
|
<script>
|
||||||
// process shim for old versions of @vue/compiler-sfc dependency
|
|
||||||
window.process = { env: {} }
|
|
||||||
const savedPreferDark = localStorage.getItem('vue-sfc-playground-prefer-dark')
|
const savedPreferDark = localStorage.getItem('vue-sfc-playground-prefer-dark')
|
||||||
if (
|
if (
|
||||||
savedPreferDark === 'true' ||
|
savedPreferDark === 'true' ||
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
"vite": "^5.0.12"
|
"vite": "^5.0.12"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@vue/repl": "^4.0.0",
|
"@vue/repl": "^4.1.0",
|
||||||
"file-saver": "^2.0.5",
|
"file-saver": "^2.0.5",
|
||||||
"jszip": "^3.10.1",
|
"jszip": "^3.10.1",
|
||||||
"vue": "workspace:*"
|
"vue": "workspace:*"
|
||||||
|
|
|
@ -10,23 +10,10 @@ import {
|
||||||
StoreState,
|
StoreState,
|
||||||
ImportMap,
|
ImportMap,
|
||||||
} from '@vue/repl'
|
} from '@vue/repl'
|
||||||
import type Monaco from '@vue/repl/monaco-editor'
|
import Monaco from '@vue/repl/monaco-editor'
|
||||||
import type CodeMirror from '@vue/repl/codemirror-editor'
|
import { ref, watchEffect, onMounted, computed, watch } from 'vue'
|
||||||
import { ref, watchEffect, onMounted, computed, shallowRef, watch } from 'vue'
|
|
||||||
import welcomeSFC from './welcome.vue?raw'
|
import welcomeSFC from './welcome.vue?raw'
|
||||||
|
|
||||||
const EditorComponent = shallowRef<typeof Monaco | typeof CodeMirror>()
|
|
||||||
|
|
||||||
if (import.meta.env.DEV) {
|
|
||||||
import('@vue/repl/codemirror-editor').then(
|
|
||||||
mod => (EditorComponent.value = mod.default),
|
|
||||||
)
|
|
||||||
} else {
|
|
||||||
import('@vue/repl/monaco-editor').then(
|
|
||||||
mod => (EditorComponent.value = mod.default),
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
const replRef = ref<InstanceType<typeof Repl>>()
|
const replRef = ref<InstanceType<typeof Repl>>()
|
||||||
|
|
||||||
const setVH = () => {
|
const setVH = () => {
|
||||||
|
@ -186,6 +173,9 @@ function toggleTheme(isDark: boolean) {
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
const cls = document.documentElement.classList
|
const cls = document.documentElement.classList
|
||||||
toggleTheme(cls.contains('dark'))
|
toggleTheme(cls.contains('dark'))
|
||||||
|
|
||||||
|
// @ts-expect-error process shim for old versions of @vue/compiler-sfc dependency
|
||||||
|
window.process = { env: {} }
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
@ -202,10 +192,9 @@ onMounted(() => {
|
||||||
@reload-page="reloadPage"
|
@reload-page="reloadPage"
|
||||||
/>
|
/>
|
||||||
<Repl
|
<Repl
|
||||||
v-if="EditorComponent"
|
|
||||||
ref="replRef"
|
ref="replRef"
|
||||||
:theme="theme"
|
:theme="theme"
|
||||||
:editor="EditorComponent"
|
:editor="Monaco"
|
||||||
@keydown.ctrl.s.prevent
|
@keydown.ctrl.s.prevent
|
||||||
@keydown.meta.s.prevent
|
@keydown.meta.s.prevent
|
||||||
:ssr="useSSRMode"
|
:ssr="useSSRMode"
|
||||||
|
|
|
@ -60,8 +60,8 @@ importers:
|
||||||
specifier: ^1.2.2
|
specifier: ^1.2.2
|
||||||
version: 1.2.2(vitest@1.2.2)
|
version: 1.2.2(vitest@1.2.2)
|
||||||
'@vue/consolidate':
|
'@vue/consolidate':
|
||||||
specifier: 0.17.3
|
specifier: 1.0.0
|
||||||
version: 0.17.3
|
version: 1.0.0
|
||||||
conventional-changelog-cli:
|
conventional-changelog-cli:
|
||||||
specifier: ^4.1.0
|
specifier: ^4.1.0
|
||||||
version: 4.1.0
|
version: 4.1.0
|
||||||
|
@ -374,8 +374,8 @@ importers:
|
||||||
packages/sfc-playground:
|
packages/sfc-playground:
|
||||||
dependencies:
|
dependencies:
|
||||||
'@vue/repl':
|
'@vue/repl':
|
||||||
specifier: ^4.0.0
|
specifier: ^4.1.0
|
||||||
version: 4.0.0
|
version: 4.1.0
|
||||||
file-saver:
|
file-saver:
|
||||||
specifier: ^2.0.5
|
specifier: ^2.0.5
|
||||||
version: 2.0.5
|
version: 2.0.5
|
||||||
|
@ -1891,18 +1891,13 @@ packages:
|
||||||
vue: link:packages/vue
|
vue: link:packages/vue
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
/@vue/consolidate@0.17.3:
|
|
||||||
resolution: {integrity: sha512-nl0SWcTMzaaTnJ5G6V8VlMDA1CVVrNnaQKF1aBZU3kXtjgU9jtHMsEAsgjoRUx+T0EVJk9TgbmxGhK3pOk22zw==}
|
|
||||||
engines: {node: '>= 0.12.0'}
|
|
||||||
dev: true
|
|
||||||
|
|
||||||
/@vue/consolidate@1.0.0:
|
/@vue/consolidate@1.0.0:
|
||||||
resolution: {integrity: sha512-oTyUE+QHIzLw2PpV14GD/c7EohDyP64xCniWTcqcEmTd699eFqTIwOmtDYjcO1j3QgdXoJEoWv1/cCdLrRoOfg==}
|
resolution: {integrity: sha512-oTyUE+QHIzLw2PpV14GD/c7EohDyP64xCniWTcqcEmTd699eFqTIwOmtDYjcO1j3QgdXoJEoWv1/cCdLrRoOfg==}
|
||||||
engines: {node: '>= 0.12.0'}
|
engines: {node: '>= 0.12.0'}
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
/@vue/repl@4.0.0:
|
/@vue/repl@4.1.0:
|
||||||
resolution: {integrity: sha512-/C4moGPnuc/t7JdBdEAOn/9MkdLH0KzY8zhZN33gfKY6E7ln0I2umsTjQAxvjTFuPS01oAOlATvaWz5cW8HLgQ==}
|
resolution: {integrity: sha512-4ZNEQWlLjl1Sq+WFiACm5siMdwUAmmqOES4XDgZRRFYeeW/BfabO9I6fpU+Y0zO9HFzKb8dwUUH0e0LK7mIYeg==}
|
||||||
dev: false
|
dev: false
|
||||||
|
|
||||||
/@vueuse/core@10.7.2(vue@packages+vue):
|
/@vueuse/core@10.7.2(vue@packages+vue):
|
||||||
|
|
Loading…
Reference in New Issue