Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(deps): upgrade to vite 6, bump dependencies #346

Merged
merged 3 commits into from
Nov 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions cspell.config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ words:
- Baloo
- baloo-2
- blurhash
- bumpp
- canvaskit
- Chakra
- chakra-petch
Expand Down
11 changes: 6 additions & 5 deletions docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"@nolebase/vitepress-plugin-page-properties": "workspace:^",
"@nolebase/vitepress-plugin-sidebar": "workspace:^",
"@nolebase/vitepress-plugin-thumbnail-hash": "workspace:^",
"@rive-app/canvas": "^2.23.10",
"@rive-app/canvas": "^2.23.11",
"@rollup/plugin-yaml": "^4.1.2",
"@shikijs/vitepress-twoslash": "^1.23.1",
"@types/markdown-it": "^14.1.2",
Expand All @@ -46,10 +46,11 @@
"colorette": "^2.0.20",
"markdown-it": "^14.1.0",
"markdown-it-footnote": "^4.0.0",
"motion": "^11.11.17",
"motion": "^11.12.0",
"thumbhash": "^0.1.1",
"typescript": "^5.6.3",
"unlazy": "^0.11.8",
"vite-plugin-vue-devtools": "^7.6.4"
"typescript": "^5.7.2",
"unlazy": "^0.12.0",
"vite": "catalog:",
"vite-plugin-vue-devtools": "^7.6.5"
}
}
12 changes: 7 additions & 5 deletions docs/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import Yaml from '@rollup/plugin-yaml'
import UnoCSS from 'unocss/vite'

import { defineConfig } from 'vite'
import Inspect from 'vite-plugin-inspect'
// import Inspect from 'vite-plugin-inspect'
import VueDevTools from 'vite-plugin-vue-devtools'

function getVueProdHydrationMismatchDetailsFlag() {
Expand Down Expand Up @@ -100,10 +100,12 @@ export default defineConfig({
],
}),
ThumbnailHashImages(),
Inspect({
build: true,
outputDir: '.vite-inspect',
}),
// Due to Bug: `transformHandler.call({} as any, ...)` with `{}` cause the incompatible exception from `vite-plugin-inspect` with Vite 6
// https://github.com/unocss/unocss/issues/4296
// Inspect({
// build: true,
// outputDir: '.vite-inspect',
// }),
UnoCSS(),
],
})
33 changes: 19 additions & 14 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,35 +38,40 @@
"test:run": "vitest run"
},
"devDependencies": {
"@antfu/eslint-config": "^3.9.2",
"@antfu/eslint-config": "^3.11.1",
"@antfu/ni": "^0.23.1",
"@cspell/dict-ru_ru": "^2.2.4",
"@types/node": "^22.9.1",
"@types/node": "^22.10.0",
"@unocss/cli": "^0.64.1",
"@unocss/eslint-config": "^0.64.1",
"@unocss/eslint-plugin": "^0.64.1",
"@vitejs/plugin-vue": "^5.2.0",
"@vitest/coverage-v8": "^2.1.5",
"@vitest/ui": "^2.1.5",
"@vueuse/core": "^11.3.0",
"@vitejs/plugin-vue": "^5.2.1",
"@vitest/coverage-v8": "^2.1.6",
"@vitest/ui": "^2.1.6",
"@vueuse/core": "^12.0.0",
"bumpp": "^9.8.1",
"concurrently": "^9.1.0",
"eslint": "^9.15.0",
"less": "^4.2.0",
"less": "^4.2.1",
"rimraf": "^6.0.1",
"typescript": "^5.6.3",
"typescript": "^5.7.2",
"unbuild": "^2.0.0",
"unocss": "^0.64.1",
"unplugin-vue-macros": "^2.13.4",
"vite": "^5.4.11",
"vite-plugin-inspect": "^0.8.8",
"vitepress": "^1.5.0",
"vitest": "^2.1.5",
"vue": "^3.5.13",
"vite": "catalog:",
"vite-plugin-inspect": "^0.10.0",
"vitepress": "catalog:",
"vitest": "^2.1.6",
"vue": "catalog:",
"vue-tsc": "^2.1.10"
},
"workspaces": [
"packages/*",
"docs"
]
],
"pnpm": {
"overrides": {
"vite": "catalog:"
}
}
}
2 changes: 1 addition & 1 deletion packages/markdown-it-unlazy-img/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
"dependencies": {
"colorette": "^2.0.20",
"glob": "^11.0.0",
"vite": "^5.4.11"
"vite": "catalog:"
},
"devDependencies": {
"@types/markdown-it": "^14.1.2"
Expand Down
6 changes: 3 additions & 3 deletions packages/ui-asciinema/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,9 @@
"asciinema-player": "^3.7.1"
},
"dependencies": {
"less": "^4.2.0",
"vitepress": "^1.5.0",
"vue": "^3.5.13"
"less": "^4.2.1",
"vitepress": "catalog:",
"vue": "catalog:"
},
"devDependencies": {
"@vue/tsconfig": "^0.6.0"
Expand Down
6 changes: 3 additions & 3 deletions packages/ui-rive-canvas/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,9 @@
"@rive-app/canvas": "^2.11.1"
},
"dependencies": {
"less": "^4.2.0",
"vitepress": "^1.5.0",
"vue": "^3.5.13"
"less": "^4.2.1",
"vitepress": "catalog:",
"vue": "catalog:"
},
"devDependencies": {
"@vue/tsconfig": "^0.6.0"
Expand Down
6 changes: 3 additions & 3 deletions packages/ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,9 @@
},
"dependencies": {
"@iconify-json/octicon": "^1.2.1",
"less": "^4.2.0",
"vitepress": "^1.5.0",
"vue": "^3.5.13"
"less": "^4.2.1",
"vitepress": "catalog:",
"vue": "catalog:"
},
"devDependencies": {
"@vue/tsconfig": "^0.6.0"
Expand Down
2 changes: 1 addition & 1 deletion packages/unconfig-vitepress/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
"@nolebase/vitepress-plugin-inline-link-preview": "workspace:^",
"@nolebase/vitepress-plugin-page-properties": "workspace:^",
"@nolebase/vitepress-plugin-thumbnail-hash": "workspace:^",
"vitepress": "^1.5.0"
"vitepress": "catalog:"
},
"devDependencies": {
"builtin-modules": "^3.3.0"
Expand Down
2 changes: 1 addition & 1 deletion packages/vitepress-plugin-breadcrumbs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,6 @@
"package:publish": "pnpm build && pnpm publish --access public --no-git-checks"
},
"dependencies": {
"vitepress": "^1.5.0"
"vitepress": "catalog:"
}
}
4 changes: 2 additions & 2 deletions packages/vitepress-plugin-enhanced-mark/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
"package:publish": "pnpm build && pnpm publish --access public --no-git-checks"
},
"dependencies": {
"less": "^4.2.0",
"vitepress": "^1.5.0"
"less": "^4.2.1",
"vitepress": "catalog:"
}
}
4 changes: 2 additions & 2 deletions packages/vitepress-plugin-enhanced-readabilities/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@
"@iconify-json/carbon": "^1.2.4",
"@iconify-json/icon-park-outline": "^1.2.1",
"@nolebase/ui": "workspace:^",
"less": "^4.2.0",
"vitepress": "^1.5.0"
"less": "^4.2.1",
"vitepress": "catalog:"
},
"devDependencies": {
"@rollup/plugin-yaml": "^4.1.2"
Expand Down
4 changes: 2 additions & 2 deletions packages/vitepress-plugin-git-changelog/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,9 @@
"execa": "^9.5.1",
"globby": "^14.0.2",
"gray-matter": "^4.0.3",
"less": "^4.2.0",
"less": "^4.2.1",
"uncrypto": "^0.1.3",
"vitepress": "^1.5.0"
"vitepress": "catalog:"
},
"devDependencies": {
"@rollup/plugin-yaml": "^4.1.2",
Expand Down
56 changes: 29 additions & 27 deletions packages/vitepress-plugin-git-changelog/src/vite/git.ts
Original file line number Diff line number Diff line change
Expand Up @@ -145,33 +145,35 @@ export function GitChangelog(options: GitChangelogOptions = {}): Plugin {
return `export default ${JSON.stringify(changelog, null, config.isProduction ? 0 : 2)}`
},
configureServer(server) {
server.ws.on('nolebase-git-changelog:client-mounted', async (data) => {
if (!data || typeof data !== 'object')
return
if (!('page' in data && 'filePath' in data.page))
return

let result = hotModuleReloadCachedCommits.get(data.page.filePath)
if (!result) {
const path = normalizePath(join(srcDir, data.page.filePath))
result = await commitFromPath([path])
hotModuleReloadCachedCommits.set(data.page.filePath, result)
}

Object.assign(changelog, result)

if (!result!.commits.length)
return

const virtualModule = server.moduleGraph.getModuleById(ResolvedVirtualModuleId)
if (!virtualModule)
return

server.moduleGraph.invalidateModule(virtualModule)
server.ws.send({
type: 'custom',
event: 'nolebase-git-changelog:updated',
data: changelog,
Object.values(server.environments).forEach((env) => {
env.hot.on('nolebase-git-changelog:client-mounted', async (data) => {
if (!data || typeof data !== 'object')
return
if (!('page' in data && 'filePath' in data.page))
return

let result = hotModuleReloadCachedCommits.get(data.page.filePath)
if (!result) {
const path = normalizePath(join(srcDir, data.page.filePath))
result = await commitFromPath([path])
hotModuleReloadCachedCommits.set(data.page.filePath, result)
}

Object.assign(changelog, result)

if (!result!.commits.length)
return

const virtualModule = env.moduleGraph.getModuleById(ResolvedVirtualModuleId)
if (!virtualModule)
return

env.moduleGraph.invalidateModule(virtualModule)
env.hot.send({
type: 'custom',
event: 'nolebase-git-changelog:updated',
data: changelog,
})
})
})
},
Expand Down
4 changes: 2 additions & 2 deletions packages/vitepress-plugin-graph-view/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,9 @@
"d3": "^7.9.0",
"d3-force": "^3.0.0",
"glob": "^11.0.0",
"less": "^4.2.0",
"less": "^4.2.1",
"ora": "^8.1.1",
"vitepress": "^1.5.0"
"vitepress": "catalog:"
},
"devDependencies": {
"@types/d3": "^7.4.3",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
"package:publish": "pnpm build && pnpm publish --access public --no-git-checks"
},
"dependencies": {
"less": "^4.2.0",
"vitepress": "^1.5.0"
"less": "^4.2.1",
"vitepress": "catalog:"
}
}
2 changes: 1 addition & 1 deletion packages/vitepress-plugin-index/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
"glob": "^11.0.0",
"globby": "^14.0.2",
"gray-matter": "^4.0.3",
"vitepress": "^1.5.0"
"vitepress": "catalog:"
},
"devDependencies": {
"@rollup/plugin-yaml": "^4.1.2"
Expand Down
4 changes: 2 additions & 2 deletions packages/vitepress-plugin-inline-link-preview/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,10 @@
"@iconify-json/svg-spinners": "^1.2.1",
"@nolebase/markdown-it-element-transform": "workspace:^",
"@nolebase/ui": "workspace:^",
"less": "^4.2.0",
"less": "^4.2.1",
"markdown-it": "^14.1.0",
"markdown-it-attrs": "^4.2.0",
"vitepress": "^1.5.0"
"vitepress": "catalog:"
},
"devDependencies": {
"@rollup/plugin-yaml": "^4.1.2",
Expand Down
2 changes: 1 addition & 1 deletion packages/vitepress-plugin-meta/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
"unified": "^11.0.5",
"unist-util-remove": "^4.0.0",
"unist-util-remove-position": "^5.0.0",
"vitepress": "^1.5.0"
"vitepress": "catalog:"
},
"devDependencies": {
"@types/hast": "^3.0.4"
Expand Down
2 changes: 1 addition & 1 deletion packages/vitepress-plugin-og-image/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
"rehype-stringify": "^10.0.1",
"unified": "^11.0.5",
"unist-util-visit": "^5.0.0",
"vitepress": "^1.5.0"
"vitepress": "catalog:"
},
"devDependencies": {
"@types/fs-extra": "^11.0.4"
Expand Down
4 changes: 2 additions & 2 deletions packages/vitepress-plugin-page-properties/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,9 @@
"@nolebase/ui": "workspace:^",
"date-fns": "^4.1.0",
"gray-matter": "^4.0.3",
"less": "^4.2.0",
"less": "^4.2.1",
"uuid": "^11.0.3",
"vitepress": "^1.5.0"
"vitepress": "catalog:"
},
"devDependencies": {
"@rollup/plugin-yaml": "^4.1.2",
Expand Down
Loading