Skip to content

Commit

Permalink
feat: bump vue to 3.3 (#1327)
Browse files Browse the repository at this point in the history
Co-authored-by: meteorlxy <meteor.lxy@foxmail.com>
  • Loading branch information
Mister-Hope and meteorlxy committed May 11, 2023
1 parent b7d71be commit bebadea
Show file tree
Hide file tree
Showing 31 changed files with 269 additions and 221 deletions.
2 changes: 2 additions & 0 deletions .eslintrc.cjs
Expand Up @@ -9,6 +9,8 @@ module.exports = {
__VUE_HMR_RUNTIME__: 'readonly',
__VUE_OPTIONS_API__: 'readonly',
__VUE_PROD_DEVTOOLS__: 'readonly',
// workaround for vue3.3 slots, should be removed once eslint-plugin-vue supports this
defineSlots: 'readonly',
},
overrides: [
{
Expand Down
2 changes: 1 addition & 1 deletion docs/package.json
Expand Up @@ -24,6 +24,6 @@
"@vuepress/utils": "workspace:*",
"anywhere": "^1.6.0",
"sass-loader": "^13.2.2",
"vue": "^3.2.47"
"vue": "^3.3.1"
}
}
4 changes: 2 additions & 2 deletions ecosystem/plugin-active-header-links/package.json
Expand Up @@ -39,8 +39,8 @@
"@vuepress/core": "workspace:*",
"@vuepress/utils": "workspace:*",
"ts-debounce": "^4.0.0",
"vue": "^3.2.47",
"vue-router": "^4.1.6"
"vue": "^3.3.1",
"vue-router": "^4.2.0"
},
"publishConfig": {
"access": "public"
Expand Down
2 changes: 1 addition & 1 deletion ecosystem/plugin-back-to-top/package.json
Expand Up @@ -39,7 +39,7 @@
"@vuepress/core": "workspace:*",
"@vuepress/utils": "workspace:*",
"ts-debounce": "^4.0.0",
"vue": "^3.2.47"
"vue": "^3.3.1"
},
"publishConfig": {
"access": "public"
Expand Down
4 changes: 2 additions & 2 deletions ecosystem/plugin-docsearch/package.json
Expand Up @@ -46,8 +46,8 @@
"@vuepress/utils": "workspace:*",
"@vueuse/core": "^10.1.2",
"ts-debounce": "^4.0.0",
"vue": "^3.2.47",
"vue-router": "^4.1.6"
"vue": "^3.3.1",
"vue-router": "^4.2.0"
},
"publishConfig": {
"access": "public"
Expand Down
2 changes: 1 addition & 1 deletion ecosystem/plugin-external-link-icon/package.json
Expand Up @@ -40,7 +40,7 @@
"@vuepress/markdown": "workspace:*",
"@vuepress/shared": "workspace:*",
"@vuepress/utils": "workspace:*",
"vue": "^3.2.47"
"vue": "^3.3.1"
},
"publishConfig": {
"access": "public"
Expand Down
2 changes: 1 addition & 1 deletion ecosystem/plugin-medium-zoom/package.json
Expand Up @@ -41,7 +41,7 @@
"@vuepress/core": "workspace:*",
"@vuepress/utils": "workspace:*",
"medium-zoom": "^1.0.8",
"vue": "^3.2.47"
"vue": "^3.3.1"
},
"publishConfig": {
"access": "public"
Expand Down
4 changes: 2 additions & 2 deletions ecosystem/plugin-nprogress/package.json
Expand Up @@ -38,8 +38,8 @@
"@vuepress/client": "workspace:*",
"@vuepress/core": "workspace:*",
"@vuepress/utils": "workspace:*",
"vue": "^3.2.47",
"vue-router": "^4.1.6"
"vue": "^3.3.1",
"vue-router": "^4.2.0"
},
"publishConfig": {
"access": "public"
Expand Down
2 changes: 1 addition & 1 deletion ecosystem/plugin-pwa-popup/package.json
Expand Up @@ -41,7 +41,7 @@
"@vuepress/plugin-pwa": "workspace:*",
"@vuepress/shared": "workspace:*",
"@vuepress/utils": "workspace:*",
"vue": "^3.2.47"
"vue": "^3.3.1"
},
"publishConfig": {
"access": "public"
Expand Down
2 changes: 1 addition & 1 deletion ecosystem/plugin-pwa/package.json
Expand Up @@ -39,7 +39,7 @@
"@vuepress/utils": "workspace:*",
"mitt": "^3.0.0",
"register-service-worker": "^1.7.2",
"vue": "^3.2.47",
"vue": "^3.3.1",
"workbox-build": "^6.5.4"
},
"publishConfig": {
Expand Down
4 changes: 2 additions & 2 deletions ecosystem/plugin-search/package.json
Expand Up @@ -40,8 +40,8 @@
"@vuepress/shared": "workspace:*",
"@vuepress/utils": "workspace:*",
"chokidar": "^3.5.3",
"vue": "^3.2.47",
"vue-router": "^4.1.6"
"vue": "^3.3.1",
"vue-router": "^4.2.0"
},
"publishConfig": {
"access": "public"
Expand Down
2 changes: 1 addition & 1 deletion ecosystem/plugin-theme-data/package.json
Expand Up @@ -40,7 +40,7 @@
"@vuepress/core": "workspace:*",
"@vuepress/shared": "workspace:*",
"@vuepress/utils": "workspace:*",
"vue": "^3.2.47"
"vue": "^3.3.1"
},
"publishConfig": {
"access": "public"
Expand Down
4 changes: 2 additions & 2 deletions ecosystem/plugin-toc/package.json
Expand Up @@ -37,8 +37,8 @@
"@vuepress/client": "workspace:*",
"@vuepress/core": "workspace:*",
"@vuepress/utils": "workspace:*",
"vue": "^3.2.47",
"vue-router": "^4.1.6"
"vue": "^3.3.1",
"vue-router": "^4.2.0"
},
"publishConfig": {
"access": "public"
Expand Down
5 changes: 3 additions & 2 deletions ecosystem/theme-default/package.json
Expand Up @@ -57,8 +57,9 @@
"@vuepress/utils": "workspace:*",
"@vueuse/core": "^10.1.2",
"sass": "^1.62.1",
"vue": "^3.2.47",
"vue-router": "^4.1.6"
"sass-loader": "^13.2.2",
"vue": "^3.3.1",
"vue-router": "^4.2.0"
},
"peerDependencies": {
"sass-loader": "^13.2.1"
Expand Down
5 changes: 5 additions & 0 deletions ecosystem/theme-default/src/client/components/AutoLink.vue
Expand Up @@ -23,6 +23,11 @@ const props = defineProps({
},
})
defineSlots<{
before?: (props: Record<never, never>) => any
after?: (props: Record<never, never>) => any
}>()
const route = useRoute()
const site = useSiteData()
const { item } = toRefs(props)
Expand Down
@@ -1,4 +1,8 @@
<script setup lang="ts">
defineSlots<{
default?: (props: Record<never, never>) => any
}>()
const setHeight = (items): void => {
// explicitly set height so that it can be transitioned
items.style.height = items.scrollHeight + 'px'
Expand Down
9 changes: 8 additions & 1 deletion ecosystem/theme-default/src/client/components/Navbar.vue
Expand Up @@ -10,7 +10,14 @@ import {
useUpdateDeviceStatus,
} from '../composables/index.js'
defineEmits(['toggle-sidebar'])
defineEmits<{
(e: 'toggle-sidebar'): void
}>()
defineSlots<{
before?: (props: Record<never, never>) => any
after?: (props: Record<never, never>) => any
}>()
const themeLocale = useThemeLocaleData()
Expand Down
7 changes: 7 additions & 0 deletions ecosystem/theme-default/src/client/components/Page.vue
@@ -1,6 +1,13 @@
<script setup lang="ts">
import PageMeta from '@theme/PageMeta.vue'
import PageNav from '@theme/PageNav.vue'
defineSlots<{
'top'?: (props: Record<never, never>) => any
'bottom'?: (props: Record<never, never>) => any
'content-top'?: (props: Record<never, never>) => any
'content-bottom'?: (props: Record<never, never>) => any
}>()
</script>

<template>
Expand Down
5 changes: 5 additions & 0 deletions ecosystem/theme-default/src/client/components/Sidebar.vue
@@ -1,6 +1,11 @@
<script setup lang="ts">
import NavbarItems from '@theme/NavbarItems.vue'
import SidebarItems from '@theme/SidebarItems.vue'
defineSlots<{
top?: (props: Record<never, never>) => any
bottom?: (props: Record<never, never>) => any
}>()
</script>

<template>
Expand Down
@@ -1,7 +1,9 @@
<script setup lang="ts">
import { useThemeLocaleData } from '../composables/index.js'
defineEmits(['toggle'])
defineEmits<{
(e: 'toggle'): void
}>()
const themeLocale = useThemeLocaleData()
</script>
Expand Down
Expand Up @@ -16,6 +16,10 @@ defineProps({
default: undefined,
},
})
defineSlots<{
default?: () => any
}>()
</script>

<template>
Expand Down
@@ -1,9 +1,13 @@
import { defineComponent, h, onBeforeUpdate, ref } from 'vue'
import type { Component, VNode } from 'vue'
import type { Component, SlotsType, VNode } from 'vue'

export const CodeGroup = defineComponent({
name: 'CodeGroup',

slots: Object as SlotsType<{
default: () => VNode[]
}>,

setup(_, { slots }) {
// index of current active item
const activeIndex = ref(-1)
Expand Down
14 changes: 14 additions & 0 deletions ecosystem/theme-default/src/client/layouts/Layout.vue
Expand Up @@ -13,6 +13,20 @@ import {
useThemeLocaleData,
} from '../composables/index.js'
defineSlots<{
'navbar'?: (props: Record<never, never>) => any
'navbar-before'?: (props: Record<never, never>) => any
'navbar-after'?: (props: Record<never, never>) => any
'sidebar'?: (props: Record<never, never>) => any
'sidebar-top'?: (props: Record<never, never>) => any
'sidebar-bottom'?: (props: Record<never, never>) => any
'page'?: (props: Record<never, never>) => any
'page-top'?: (props: Record<never, never>) => any
'page-bottom'?: (props: Record<never, never>) => any
'page-content-top'?: (props: Record<never, never>) => any
'page-content-bottom'?: (props: Record<never, never>) => any
}>()
const page = usePageData()
const frontmatter = usePageFrontmatter<DefaultThemePageFrontmatter>()
const themeLocale = useThemeLocaleData()
Expand Down
5 changes: 3 additions & 2 deletions ecosystem/vuepress-vite/package.json
Expand Up @@ -42,14 +42,15 @@
"@vuepress/bundler-vite": "workspace:*",
"@vuepress/cli": "workspace:*",
"@vuepress/core": "workspace:*",
"@vuepress/theme-default": "workspace:*"
"@vuepress/theme-default": "workspace:*",
"vue": "^3.3.1"
},
"devDependencies": {
"@vuepress/client": "workspace:*"
},
"peerDependencies": {
"@vuepress/client": "workspace:*",
"vue": "^3.2.47"
"vue": "^3.3.1"
},
"engines": {
"node": ">=16.19.0"
Expand Down
5 changes: 3 additions & 2 deletions ecosystem/vuepress-webpack/package.json
Expand Up @@ -43,10 +43,11 @@
"@vuepress/cli": "workspace:*",
"@vuepress/core": "workspace:*",
"@vuepress/theme-default": "workspace:*",
"sass-loader": "^13.2.2"
"sass-loader": "^13.2.2",
"vue": "^3.3.1"
},
"peerDependencies": {
"vue": "^3.2.47"
"vue": "^3.3.1"
},
"engines": {
"node": ">=16.19.0"
Expand Down
6 changes: 3 additions & 3 deletions packages/bundler-vite/package.json
Expand Up @@ -33,7 +33,7 @@
"clean": "rimraf dist"
},
"dependencies": {
"@vitejs/plugin-vue": "^4.2.1",
"@vitejs/plugin-vue": "^4.2.2",
"@vuepress/client": "workspace:*",
"@vuepress/core": "workspace:*",
"@vuepress/shared": "workspace:*",
Expand All @@ -44,8 +44,8 @@
"postcss-load-config": "^4.0.1",
"rollup": "^3.21.6",
"vite": "~4.3.5",
"vue": "^3.2.47",
"vue-router": "^4.1.6"
"vue": "^3.3.1",
"vue-router": "^4.2.0"
},
"publishConfig": {
"access": "public"
Expand Down
8 changes: 4 additions & 4 deletions packages/bundler-webpack/package.json
Expand Up @@ -54,10 +54,10 @@
"postcss-csso": "^6.0.1",
"postcss-loader": "^7.3.0",
"style-loader": "^3.3.2",
"vue": "^3.2.47",
"vue-loader": "^17.1.0",
"vue-router": "^4.1.6",
"webpack": "^5.82.0",
"vue": "^3.3.1",
"vue-loader": "^17.1.1",
"vue-router": "^4.2.0",
"webpack": "^5.82.1",
"webpack-chain": "^6.5.1",
"webpack-dev-server": "^4.15.0",
"webpack-merge": "^5.8.0"
Expand Down
4 changes: 2 additions & 2 deletions packages/client/package.json
Expand Up @@ -39,8 +39,8 @@
"dependencies": {
"@vue/devtools-api": "^6.5.0",
"@vuepress/shared": "workspace:*",
"vue": "^3.2.47",
"vue-router": "^4.1.6"
"vue": "^3.3.1",
"vue-router": "^4.2.0"
},
"publishConfig": {
"access": "public"
Expand Down
2 changes: 1 addition & 1 deletion packages/core/package.json
Expand Up @@ -35,7 +35,7 @@
"@vuepress/markdown": "workspace:*",
"@vuepress/shared": "workspace:*",
"@vuepress/utils": "workspace:*",
"vue": "^3.2.47"
"vue": "^3.3.1"
},
"publishConfig": {
"access": "public"
Expand Down
2 changes: 1 addition & 1 deletion packages/shared/package.json
Expand Up @@ -34,7 +34,7 @@
},
"dependencies": {
"@mdit-vue/types": "^0.12.0",
"@vue/shared": "^3.2.47"
"@vue/shared": "^3.3.1"
},
"publishConfig": {
"access": "public"
Expand Down

0 comments on commit bebadea

Please sign in to comment.