Skip to content

Commit

Permalink
refactor(deps): ⬆️ upgrade dependencies, fix type errors
Browse files Browse the repository at this point in the history
  • Loading branch information
BeiyanYunyi committed Dec 16, 2024
1 parent d23c719 commit 162302a
Show file tree
Hide file tree
Showing 7 changed files with 1,874 additions and 1,802 deletions.
29 changes: 15 additions & 14 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,32 +44,33 @@
"@iconify-json/carbon": "^1.2.1",
"@iconify-json/icon-park-outline": "^1.2.0",
"@iconify-json/octicon": "^1.2.0",
"unocss": "^0.61.9",
"unocss": "^0.65.1",
"vite": "^5.3.1",
"vitepress": "^1.2.3",
"vitepress-sidebar": "^1.27.1",
"vitepress": "^1.5.0",
"vitepress-sidebar": "^1.30.2",
"vue": "^3.4.30"
},
"dependencies": {
"@nolebase/vitepress-plugin-enhanced-readabilities": "^2.6.1",
"@nolebase/vitepress-plugin-git-changelog": "^2.6.1",
"@nolebase/vitepress-plugin-highlight-targeted-heading": "^2.6.1",
"@nolebase/vitepress-plugin-meta": "^2.6.1",
"@nolebase/vitepress-plugin-enhanced-readabilities": "^2.11.1",
"@nolebase/vitepress-plugin-git-changelog": "^2.11.1",
"@nolebase/vitepress-plugin-highlight-targeted-heading": "^2.11.1",
"@nolebase/vitepress-plugin-meta": "^2.11.1",
"@project-trans/suggestion-box": "^0.4.3",
"markdown-it-footnote": "^4.0.0",
"markdown-it-katex": "^2.0.3",
"markdown-it-pangu": "^1.0.2",
"unplugin-vue-components": "^0.27.4"
"unplugin-vue-components": "^0.28.0"
},
"devDependencies": {
"@antfu/eslint-config": "^3.8.0",
"@antfu/eslint-config": "^3.12.0",
"@types/markdown-it": "^14.1.2",
"@types/markdown-it-footnote": "^3.0.4",
"@types/node": "^22.8.1",
"@unocss/eslint-plugin": "^0.63.6",
"eslint": "^9.13.0",
"eslint-plugin-format": "^0.1.2",
"unbuild": "3.0.0-rc.7"
"@types/node": "^22.10.2",
"@unocss/eslint-plugin": "^0.65.1",
"eslint": "^9.17.0",
"eslint-plugin-format": "^0.1.3",
"unbuild": "3.0.1",
"vue-tsc": "^2.1.10"
},
"pnpm": {
"overrides": {
Expand Down
3,628 changes: 1,846 additions & 1,782 deletions pnpm-lock.yaml

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/components/CopyrightInfo.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<script setup lang="ts">
import type { Node, Trie } from '../plugins/CopyrightLoader.data'
import { useData, useRoute } from 'vitepress' // 获取路由信息
import { computed, ref, watch } from 'vue'
import { computed } from 'vue'
import { data } from '../plugins/CopyrightLoader.data'
const orgName = useData().theme.value.org
Expand Down
7 changes: 7 additions & 0 deletions src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,13 @@ import { useThemeContext } from './utils/themeContext'
export interface PjtsThemeConfig extends DefaultTheme.Config {
enableChangeLog?: boolean
enableSuggestionBox?: boolean
org?: string
HideReadingTime?: boolean
HideLastUpdated?: boolean
HideAuthors?: boolean
sitemap?: {
hostname: string
}
}

// 从文件系统读取 Markdown 文件内容
Expand Down
2 changes: 1 addition & 1 deletion src/sidebar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import type {
SidebarItem,
SidebarMultiItem,
VitePressSidebarOptions,
} from 'vitepress-sidebar'
} from 'vitepress-sidebar/types'
import { generateSidebar as genSidebar } from 'vitepress-sidebar'
import { useThemeContext } from './utils/themeContext'

Expand Down
4 changes: 2 additions & 2 deletions src/theme.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { Theme } from 'vitepress'
import type Options from 'vitepress-sidebar'
import type { VitePressSidebarOptions } from 'vitepress-sidebar/types'
// https://vitepress.dev/guide/custom-theme
import {
NolebaseEnhancedReadabilitiesPlugin,
Expand All @@ -20,7 +20,7 @@ import '@nolebase/vitepress-plugin-enhanced-readabilities/client/style.css'
import '@nolebase/vitepress-plugin-git-changelog/client/style.css'
import '@nolebase/vitepress-plugin-highlight-targeted-heading/client/style.css'

export type SidebarOptions = Options
export type SidebarOptions = VitePressSidebarOptions

export default {
extends: DefaultTheme,
Expand Down
4 changes: 2 additions & 2 deletions src/utils/themeContext.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import type { DefaultTheme } from 'vitepress'
import type { VitePressSidebarOptions } from 'vitepress-sidebar'
import type { VitePressSidebarOptions } from 'vitepress-sidebar/types'
import { AsyncLocalStorage } from 'node:async_hooks'

type NavConfig = DefaultTheme.Config['nav']
type NavConfig = DefaultTheme.NavItem[]

export interface ThemeContext {
siteTitle: string
Expand Down

0 comments on commit 162302a

Please sign in to comment.