perf: update vuepress to rc-11

This commit is contained in:
pengzhanbo 2024-05-19 11:21:17 +08:00
parent ca383cdd7d
commit bc38fad18c
20 changed files with 1737 additions and 1478 deletions

View File

@ -9,16 +9,16 @@
"docs:serve": "anywhere -s -h localhost -d .vuepress/dist"
},
"peerDependencies": {
"vuepress": "2.0.0-rc.9"
"vuepress": "2.0.0-rc.11"
},
"dependencies": {
"@iconify/json": "^2.2.208",
"@vuepress/bundler-vite": "2.0.0-rc.9",
"@iconify/json": "^2.2.211",
"@vuepress/bundler-vite": "2.0.0-rc.11",
"anywhere": "^1.6.0",
"chart.js": "^4.4.2",
"chart.js": "^4.4.3",
"echarts": "^5.5.0",
"flowchart.ts": "^3.0.0",
"mermaid": "^10.9.0",
"mermaid": "^10.9.1",
"vue": "^3.4.27",
"vuepress-theme-plume": "workspace:*"
},

View File

@ -3,7 +3,7 @@
"type": "module",
"version": "1.0.0-rc.56",
"private": true,
"packageManager": "pnpm@9.1.0",
"packageManager": "pnpm@9.1.1",
"author": "pengzhanbo <q942450674@outlook.com> (https://github.com/pengzhanbo/)",
"license": "MIT",
"keywords": [
@ -41,8 +41,8 @@
"devDependencies": {
"@commitlint/cli": "^19.3.0",
"@commitlint/config-conventional": "^19.2.2",
"@pengzhanbo/eslint-config-vue": "^1.9.1",
"@pengzhanbo/stylelint-config": "^1.9.1",
"@pengzhanbo/eslint-config-vue": "^1.10.0",
"@pengzhanbo/stylelint-config": "^1.10.0",
"@types/lodash.merge": "^4.6.9",
"@types/node": "20.12.10",
"@types/webpack-env": "^1.18.5",
@ -52,10 +52,10 @@
"conventional-changelog-cli": "^5.0.0",
"cpx2": "^7.0.1",
"cz-conventional-changelog": "^3.3.0",
"eslint": "^9.2.0",
"eslint": "^9.3.0",
"husky": "^9.0.11",
"lint-staged": "^15.2.2",
"rimraf": "^5.0.5",
"rimraf": "^5.0.7",
"stylelint": "^16.5.0",
"tsconfig-vuepress": "^4.5.0",
"typescript": "^5.4.5",
@ -63,7 +63,7 @@
},
"pnpm": {
"patchedDependencies": {
"@vuepress/markdown@2.0.0-rc.9": "patches/@vuepress__markdown@2.0.0-rc.9.patch"
"@vuepress/markdown@2.0.0-rc.11": "patches/@vuepress__markdown@2.0.0-rc.11.patch"
}
},
"lint-staged": {

View File

@ -0,0 +1,13 @@
diff --git a/dist/index.js b/dist/index.js
index 7bad660ca70fe8c5873cebd8d237cd2b4257deb9..2c2540df2f278f781e081ac56f038b1e332ec803 100644
--- a/dist/index.js
+++ b/dist/index.js
@@ -267,7 +267,7 @@ var codePlugin = (md, {
const info = token.info ? md.utils.unescapeAll(token.info).trim() : "";
const language = resolveLanguage(info);
const languageClass = `${options.langPrefix}${language.name}`;
- const code = options.highlight?.(token.content, language.name, "") || md.utils.escapeHtml(token.content);
+ const code = options.highlight?.(token.content, language.name, info || "") || md.utils.escapeHtml(token.content);
token.attrJoin("class", languageClass);
let result = code.startsWith("<pre") ? code : `<pre${slf.renderAttrs(token)}><code>${code}</code></pre>`;
const useVPre = resolveVPre(info) ?? vPreBlock;

View File

@ -33,7 +33,7 @@
"ts": "tsc -b tsconfig.build.json"
},
"peerDependencies": {
"vuepress": "2.0.0-rc.9"
"vuepress": "2.0.0-rc.11"
},
"dependencies": {
"@pengzhanbo/utils": "^1.1.2",

View File

@ -33,7 +33,7 @@
"ts": "tsc -b tsconfig.build.json"
},
"peerDependencies": {
"vuepress": "2.0.0-rc.9"
"vuepress": "2.0.0-rc.11"
},
"publishConfig": {
"access": "public"

View File

@ -37,7 +37,7 @@
"ts": "tsc -b tsconfig.build.json"
},
"peerDependencies": {
"vuepress": "2.0.0-rc.9"
"vuepress": "2.0.0-rc.11"
},
"dependencies": {
"@vue/devtools-api": "6.6.1",

View File

@ -43,7 +43,7 @@
"ts": "tsc -b tsconfig.build.json"
},
"peerDependencies": {
"vuepress": "2.0.0-rc.9"
"vuepress": "2.0.0-rc.11"
},
"dependencies": {
"markdown-it-container": "^4.0.0"

View File

@ -37,7 +37,7 @@
"ts": "tsc -b tsconfig.build.json"
},
"peerDependencies": {
"vuepress": "2.0.0-rc.9"
"vuepress": "2.0.0-rc.11"
},
"dependencies": {
"vue": "^3.4.27"

View File

@ -37,7 +37,7 @@
"ts": "tsc -b tsconfig.build.json"
},
"peerDependencies": {
"vuepress": "2.0.0-rc.9"
"vuepress": "2.0.0-rc.11"
},
"dependencies": {
"@vuepress-plume/plugin-content-update": "workspace:*",

View File

@ -37,7 +37,7 @@
"ts": "tsc -b tsconfig.build.json"
},
"peerDependencies": {
"vuepress": "2.0.0-rc.9"
"vuepress": "2.0.0-rc.11"
},
"dependencies": {
"@iconify/vue": "^4.1.2",

View File

@ -38,7 +38,7 @@
},
"peerDependencies": {
"@iconify/json": "^2",
"vuepress": "2.0.0-rc.9"
"vuepress": "2.0.0-rc.11"
},
"peerDependenciesMeta": {
"@iconify/json": {
@ -47,18 +47,18 @@
},
"dependencies": {
"@iconify/utils": "^2.1.23",
"@vuepress/helper": "2.0.0-rc.28",
"@vuepress/helper": "2.0.0-rc.30",
"@vueuse/core": "^10.9.0",
"local-pkg": "^0.5.0",
"markdown-it-container": "^4.0.0",
"nanoid": "^5.0.7",
"shiki": "^1.5.1",
"tm-grammars": "^1.11.1",
"tm-themes": "^1.4.1",
"shiki": "^1.6.0",
"tm-grammars": "^1.12.1",
"tm-themes": "^1.4.3",
"vue": "^3.4.27"
},
"devDependencies": {
"@iconify/json": "^2.2.208",
"@iconify/json": "^2.2.211",
"@types/markdown-it": "^14.1.1"
},
"publishConfig": {

View File

@ -41,22 +41,22 @@
"ts": "tsc -b tsconfig.build.json"
},
"peerDependencies": {
"vuepress": "2.0.0-rc.9"
"vuepress": "2.0.0-rc.11"
},
"dependencies": {
"@iarna/toml": "^2.2.5",
"@netlify/functions": "^2.6.3",
"@netlify/functions": "^2.7.0",
"chalk": "^5.3.0",
"chokidar": "^3.6.0",
"cpx2": "^7.0.1",
"dotenv": "^16.4.5",
"esbuild": "^0.21.1",
"execa": "^9.0.1",
"netlify-cli": "^17.23.2",
"esbuild": "^0.21.3",
"execa": "^9.1.0",
"netlify-cli": "^17.23.5",
"portfinder": "^1.0.32"
},
"devDependencies": {
"@types/node": "^20.12.11"
"@types/node": "^20.12.12"
},
"publishConfig": {
"access": "public"

View File

@ -37,7 +37,7 @@
"ts": "tsc -b tsconfig.build.json"
},
"peerDependencies": {
"vuepress": "2.0.0-rc.9"
"vuepress": "2.0.0-rc.11"
},
"dependencies": {
"@vue/devtools-api": "6.6.1",

View File

@ -31,10 +31,10 @@
"ts": "tsc -b tsconfig.build.json"
},
"peerDependencies": {
"vuepress": "2.0.0-rc.9"
"vuepress": "2.0.0-rc.11"
},
"dependencies": {
"@netlify/functions": "^2.6.3",
"@netlify/functions": "^2.7.0",
"leancloud-storage": "^4.15.2",
"vue": "^3.4.27",
"vue-router": "4.3.2",

View File

@ -37,10 +37,10 @@
"ts": "tsc -b tsconfig.build.json"
},
"peerDependencies": {
"vuepress": "2.0.0-rc.9"
"vuepress": "2.0.0-rc.11"
},
"dependencies": {
"@vuepress/helper": "2.0.0-rc.28",
"@vuepress/helper": "2.0.0-rc.30",
"@vueuse/core": "^10.9.0",
"@vueuse/integrations": "^10.9.0",
"chokidar": "^3.6.0",

View File

@ -33,18 +33,18 @@
"ts": "tsc -b tsconfig.build.json"
},
"peerDependencies": {
"vuepress": "2.0.0-rc.9"
"vuepress": "2.0.0-rc.11"
},
"dependencies": {
"@shikijs/transformers": "^1.5.1",
"@shikijs/twoslash": "^1.5.1",
"@shikijs/transformers": "^1.6.0",
"@shikijs/twoslash": "^1.6.0",
"@types/hast": "^3.0.4",
"floating-vue": "^5.2.2",
"mdast-util-from-markdown": "^2.0.0",
"mdast-util-gfm": "^3.0.0",
"mdast-util-to-hast": "^13.1.0",
"nanoid": "^5.0.7",
"shiki": "^1.5.1",
"shiki": "^1.6.0",
"twoslash": "^0.2.6",
"twoslash-vue": "^0.2.6"
},

3071
pnpm-lock.yaml generated

File diff suppressed because it is too large Load Diff

View File

@ -63,7 +63,7 @@
"ts:watch": "tsc -b tsconfig.build.json --watch"
},
"peerDependencies": {
"vuepress": "2.0.0-rc.9"
"vuepress": "2.0.0-rc.11"
},
"dependencies": {
"@pengzhanbo/utils": "^1.1.2",
@ -76,22 +76,21 @@
"@vuepress-plume/plugin-notes-data": "workspace:*",
"@vuepress-plume/plugin-search": "workspace:*",
"@vuepress-plume/plugin-shikiji": "workspace:*",
"@vuepress/helper": "2.0.0-rc.28",
"@vuepress/plugin-active-header-links": "2.0.0-rc.28",
"@vuepress/plugin-comment": "2.0.0-rc.28",
"@vuepress/plugin-container": "2.0.0-rc.28",
"@vuepress/plugin-docsearch": "2.0.0-rc.28",
"@vuepress/plugin-external-link-icon": "2.0.0-rc.28",
"@vuepress/plugin-git": "2.0.0-rc.22",
"@vuepress/plugin-medium-zoom": "2.0.0-rc.28",
"@vuepress/plugin-nprogress": "2.0.0-rc.28",
"@vuepress/plugin-palette": "2.0.0-rc.21",
"@vuepress/plugin-reading-time": "2.0.0-rc.28",
"@vuepress/plugin-seo": "2.0.0-rc.28",
"@vuepress/plugin-sitemap": "2.0.0-rc.28",
"@vuepress/plugin-theme-data": "2.0.0-rc.28",
"@vuepress/plugin-toc": "2.0.0-rc.28",
"@vuepress/plugin-watermark": "2.0.0-rc.28",
"@vuepress/helper": "2.0.0-rc.30",
"@vuepress/plugin-active-header-links": "2.0.0-rc.30",
"@vuepress/plugin-comment": "2.0.0-rc.30",
"@vuepress/plugin-docsearch": "2.0.0-rc.30",
"@vuepress/plugin-git": "2.0.0-rc.30",
"@vuepress/plugin-markdown-container": "2.0.0-rc.30",
"@vuepress/plugin-medium-zoom": "2.0.0-rc.30",
"@vuepress/plugin-nprogress": "2.0.0-rc.30",
"@vuepress/plugin-palette": "2.0.0-rc.30",
"@vuepress/plugin-reading-time": "2.0.0-rc.30",
"@vuepress/plugin-seo": "2.0.0-rc.30",
"@vuepress/plugin-sitemap": "2.0.0-rc.30",
"@vuepress/plugin-theme-data": "2.0.0-rc.30",
"@vuepress/plugin-toc": "2.0.0-rc.30",
"@vuepress/plugin-watermark": "2.0.0-rc.30",
"@vueuse/core": "^10.9.0",
"bcrypt-ts": "^5.0.2",
"date-fns": "^3.6.0",
@ -100,7 +99,7 @@
"nanoid": "^5.0.7",
"vue": "^3.4.27",
"vue-router": "^4.3.2",
"vuepress-plugin-md-enhance": "^2.0.0-rc.39",
"vuepress-plugin-md-enhance": "^2.0.0-rc.43",
"vuepress-plugin-md-power": "workspace:*"
}
}

View File

@ -1,4 +1,4 @@
import { containerPlugin } from '@vuepress/plugin-container'
import { markdownContainerPlugin as containerPlugin } from '@vuepress/plugin-markdown-container'
import type { Plugin } from 'vuepress/core'
export const customContainers: Plugin[] = [

View File

@ -1,7 +1,6 @@
import type { App, PluginConfig } from 'vuepress/core'
import { activeHeaderLinksPlugin } from '@vuepress/plugin-active-header-links'
import { docsearchPlugin } from '@vuepress/plugin-docsearch'
import { externalLinkIconPlugin } from '@vuepress/plugin-external-link-icon'
import { gitPlugin } from '@vuepress/plugin-git'
import { mediumZoomPlugin } from '@vuepress/plugin-medium-zoom'
import { nprogressPlugin } from '@vuepress/plugin-nprogress'
@ -140,21 +139,6 @@ export function setupPlugins(
}))
}
if (options.externalLinkIcon !== false) {
plugins.push(externalLinkIconPlugin({
locales: Object.entries(localeOptions.locales || {}).reduce(
(result: Record<string, any>, [key, value]) => {
result[key] = {
openInNewWindow:
value.openInNewWindow ?? localeOptions.openInNewWindow,
}
return result
},
{},
),
}))
}
if (options.docsearch) {
if (options.docsearch.appId && options.docsearch.apiKey)
plugins.push(docsearchPlugin(resolvedDocsearchOption(app, options.docsearch)))