diff --git a/.vitepress/config.ts b/.vitepress/config.ts index 422c1b40..1207e2cf 100644 --- a/.vitepress/config.ts +++ b/.vitepress/config.ts @@ -287,7 +287,7 @@ export default defineConfig({ link: '/guide/performance' }, { - text: `Migration from v${viteMajorVersion - 1}`, + text: `从 v${viteMajorVersion - 1} 迁移`, link: '/guide/migration' }, { @@ -456,7 +456,7 @@ export default defineConfig({ // languages used for twoslash and jsdocs in twoslash languages: ['ts', 'js', 'json'], codeTransformers: [ - transformerTwoslash(), + transformerTwoslash() as any, // add `style:*` support { root(hast) { diff --git a/package.json b/package.json index 2c005d72..12830886 100644 --- a/package.json +++ b/package.json @@ -11,8 +11,8 @@ "@shikijs/vitepress-twoslash": "^3.19.0", "@type-challenges/utils": "^0.1.1", "@types/express": "^5.0.6", - "@types/node": "^20.19.25", - "chalk": "^4.1.2", + "@types/node": "^24.10.1", + "chalk": "^5.6.2", "feed": "^5.1.0", "gray-matter": "^4.0.3", "gsap": "^3.13.0", @@ -22,7 +22,7 @@ "vitepress": "^2.0.0-alpha.15", "vitepress-plugin-group-icons": "^1.6.5", "vue": "^3.5.25", - "vue-tsc": "^3.1.5", + "vue-tsc": "^3.1.6", "yorkie": "^2.0.0" }, "packageManager": "pnpm@9.6.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 014a1b90..1741ca42 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -18,11 +18,11 @@ importers: specifier: ^5.0.6 version: 5.0.6 '@types/node': - specifier: ^20.19.25 - version: 20.19.25 + specifier: ^24.10.1 + version: 24.10.1 chalk: - specifier: ^4.1.2 - version: 4.1.2 + specifier: ^5.6.2 + version: 5.6.2 feed: specifier: ^5.1.0 version: 5.1.0 @@ -40,19 +40,19 @@ importers: version: 15.0.1(markdown-it@14.1.0) vite: specifier: ^7.0.4 - version: 7.0.4(@types/node@20.19.25) + version: 7.0.4(@types/node@24.10.1) vitepress: specifier: ^2.0.0-alpha.15 - version: 2.0.0-alpha.15(@types/node@20.19.25)(postcss@8.5.6)(typescript@5.4.5) + version: 2.0.0-alpha.15(@types/node@24.10.1)(postcss@8.5.6)(typescript@5.4.5) vitepress-plugin-group-icons: specifier: ^1.6.5 - version: 1.6.5(vite@7.0.4(@types/node@20.19.25)) + version: 1.6.5(vite@7.0.4(@types/node@24.10.1)) vue: specifier: ^3.5.25 version: 3.5.25(typescript@5.4.5) vue-tsc: - specifier: ^3.1.5 - version: 3.1.5(typescript@5.4.5) + specifier: ^3.1.6 + version: 3.1.6(typescript@5.4.5) yorkie: specifier: ^2.0.0 version: 2.0.0 @@ -490,8 +490,8 @@ packages: '@types/ms@0.7.34': resolution: {integrity: sha512-nG96G3Wp6acyAgJqGasjODb+acrI7KltPiRxzHPXnP3NgI28bpQDRv53olbqGXbfcgF5aiiHmO3xpwEpS5Ld9g==} - '@types/node@20.19.25': - resolution: {integrity: sha512-ZsJzA5thDQMSQO788d7IocwwQbI8B5OPzmqNvpf3NY/+MHDAS759Wo0gd2WQeXYt5AAAQjzcrTVC6SKCuYgoCQ==} + '@types/node@24.10.1': + resolution: {integrity: sha512-GNWcUTRBgIRJD5zj+Tq0fKOJ5XZajIiBroOF0yvj2bSU1WvNdYS/dn9UxwsujGW4JX06dnHyjV2y9rRaybH0iQ==} '@types/qs@6.9.15': resolution: {integrity: sha512-uXHQKES6DQKKCLh441Xv/dwxOq1TVS3JPUMlEqoEglvlhR6Mxnlew/Xq/LRVHpLyk7iK3zODe1qYHIMltO7XGg==} @@ -529,21 +529,21 @@ packages: '@volar/language-core@2.4.23': resolution: {integrity: sha512-hEEd5ET/oSmBC6pi1j6NaNYRWoAiDhINbT8rmwtINugR39loROSlufGdYMF9TaKGfz+ViGs1Idi3mAhnuPcoGQ==} + '@volar/language-core@2.4.26': + resolution: {integrity: sha512-hH0SMitMxnB43OZpyF1IFPS9bgb2I3bpCh76m2WEK7BE0A0EzpYsRp0CCH2xNKshr7kacU5TQBLYn4zj7CG60A==} + '@volar/source-map@2.4.23': resolution: {integrity: sha512-Z1Uc8IB57Lm6k7q6KIDu/p+JWtf3xsXJqAX/5r18hYOTpJyBn0KXUR8oTJ4WFYOcDzWC9n3IflGgHowx6U6z9Q==} - '@volar/typescript@2.4.23': - resolution: {integrity: sha512-lAB5zJghWxVPqfcStmAP1ZqQacMpe90UrP5RJ3arDyrhy4aCUQqmxPPLB2PWDKugvylmO41ljK7vZ+t6INMTag==} + '@volar/source-map@2.4.26': + resolution: {integrity: sha512-JJw0Tt/kSFsIRmgTQF4JSt81AUSI1aEye5Zl65EeZ8H35JHnTvFGmpDOBn5iOxd48fyGE+ZvZBp5FcgAy/1Qhw==} - '@vue/compiler-core@3.5.24': - resolution: {integrity: sha512-eDl5H57AOpNakGNAkFDH+y7kTqrQpJkZFXhWZQGyx/5Wh7B1uQYvcWkvZi11BDhscPgj8N7XV3oRwiPnx1Vrig==} + '@volar/typescript@2.4.26': + resolution: {integrity: sha512-N87ecLD48Sp6zV9zID/5yuS1+5foj0DfuYGdQ6KHj/IbKvyKv1zNX6VCmnKYwtmHadEO6mFc2EKISiu3RDPAvA==} '@vue/compiler-core@3.5.25': resolution: {integrity: sha512-vay5/oQJdsNHmliWoZfHPoVZZRmnSWhug0BYT34njkYTPqClh3DNWLkZNJBVSjsNMrg0CCrBfoKkjZQPM/QVUw==} - '@vue/compiler-dom@3.5.24': - resolution: {integrity: sha512-1QHGAvs53gXkWdd3ZMGYuvQFXHW4ksKWPG8HP8/2BscrbZ0brw183q2oNWjMrSWImYLHxHrx1ItBQr50I/q2zw==} - '@vue/compiler-dom@3.5.25': resolution: {integrity: sha512-4We0OAcMZsKgYoGlMjzYvaoErltdFI2/25wqanuTu+S4gismOTRTBPi4IASOjxWdzIwrYSjnqONfKvuqkXzE2Q==} @@ -570,6 +570,14 @@ packages: typescript: optional: true + '@vue/language-core@3.1.6': + resolution: {integrity: sha512-F3BIvDVyyj+6Sgl9Ev9zsb/DJ48rrH2EiI5NnIEpJKo7Yk8v0n2QjfG7/RYyFhYSMOJcsf6aAt5hx4JaNbhKbg==} + peerDependencies: + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + '@vue/reactivity@3.5.25': resolution: {integrity: sha512-5xfAypCQepv4Jog1U4zn8cZIcbKKFka3AgWHEFQeK65OW+Ys4XybP6z2kKgws4YB43KGpqp5D/K3go2UPPunLA==} @@ -653,10 +661,6 @@ packages: alien-signals@3.0.0: resolution: {integrity: sha512-JHoRJf18Y6HN4/KZALr3iU+0vW9LKG+8FMThQlbn4+gv8utsLIkwpomjElGPccGeNwh0FI2HN6BLnyFLo6OyLQ==} - ansi-styles@4.3.0: - resolution: {integrity: sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==} - engines: {node: '>=8'} - argparse@1.0.10: resolution: {integrity: sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==} @@ -672,9 +676,9 @@ packages: ccount@2.0.1: resolution: {integrity: sha512-eyrF0jiFpY+3drT6383f1qhkbGsLSifNAjA61IUjZjmLCWjItY6LB9ft9YhoDgwfmclB2zhu51Lc7+95b8NRAg==} - chalk@4.1.2: - resolution: {integrity: sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==} - engines: {node: '>=10'} + chalk@5.6.2: + resolution: {integrity: sha512-7NzBL0rN6fMUW+f7A6Io4h40qQlG+xGmtMxfbnH/K7TAtt8JQWVQK+6g0UXKMeVJoyV5EkkNsErQ8pVD3bLHbA==} + engines: {node: ^12.17.0 || ^14.13 || >=16.0.0} character-entities-html4@2.1.0: resolution: {integrity: sha512-1v7fgQRj6hnSwFpq1Eu0ynr/CDEw0rXo2B61qXrLNdHZmPKgb7fqS1a2JwF0rISo9q77jDI8VMEHoApn8qDoZA==} @@ -688,13 +692,6 @@ packages: ci-info@1.6.0: resolution: {integrity: sha512-vsGdkwSCDpWmP80ncATX7iea5DWQemg1UgCW5J8tqjU3lYw4FBYuj89J0CTVomA7BEfvSZd84GmHko+MxFQU2A==} - color-convert@2.0.1: - resolution: {integrity: sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==} - engines: {node: '>=7.0.0'} - - color-name@1.1.4: - resolution: {integrity: sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==} - comma-separated-tokens@2.0.3: resolution: {integrity: sha512-Fu4hJdvzeylCfQPp9SGWidpzrMs7tTrlu6Vb8XGaRGck8QSNZJJp538Wrb60Lax4fPwR64ViY468OIUTbRlGZg==} @@ -824,10 +821,6 @@ packages: gsap@3.13.0: resolution: {integrity: sha512-QL7MJ2WMjm1PHWsoFrAQH/J8wUeqZvMtHO58qdekHpCfhvhSL4gSiz6vJf5EeMP0LOn3ZCprL2ki/gjED8ghVw==} - has-flag@4.0.0: - resolution: {integrity: sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==} - engines: {node: '>=8'} - hast-util-to-html@9.0.5: resolution: {integrity: sha512-OguPdidb+fbHQSU4Q4ZiLKnzWo8Wwsf5bZfbvu7//a9oTYoqD/fWpe96NuHkoS9h0ccGOTe0C4NGXdtS0iObOw==} @@ -1212,10 +1205,6 @@ packages: resolution: {integrity: sha512-5JRxVqC8I8NuOUjzBbvVJAKNM8qoVuH0O77h4WInc/qC2q5IreqKxYwgkga3PfA22OayK2ikceb/B26dztPl+Q==} engines: {node: '>=16'} - supports-color@7.2.0: - resolution: {integrity: sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==} - engines: {node: '>=8'} - sync-fetch@0.5.2: resolution: {integrity: sha512-6gBqqkHrYvkH65WI2bzrDwrIKmt3U10s4Exnz3dYuE5Ah62FIfNv/F63inrNhu2Nyh3GH5f42GKU3RrSJoaUyQ==} engines: {node: '>=14'} @@ -1264,8 +1253,8 @@ packages: ufo@1.5.4: resolution: {integrity: sha512-UsUk3byDzKd04EyoZ7U4DOlxQaD14JUKQl6/P7wiX4FNvUfm3XL246n9W5AmqwW5RSFJ27NAuM0iLscAOYUiGQ==} - undici-types@6.21.0: - resolution: {integrity: sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==} + undici-types@7.16.0: + resolution: {integrity: sha512-Zz+aZWSj8LE6zoxD+xrjh4VfkIG8Ya6LvYkZqtUQGJPZjYl53ypCaUwWqo7eI0x66KBGeRo+mlBEkMSeSZ38Nw==} unist-util-is@6.0.0: resolution: {integrity: sha512-2qCTHimwdxLfz+YzdGfkqNlH0tLi9xjTnHddPmJwtIG9MGsdbutfTc4P+haPD7l7Cjxf/WZj+we5qfVPvvxfYw==} @@ -1399,8 +1388,8 @@ packages: peerDependencies: vue: ^3.0.0 - vue-tsc@3.1.5: - resolution: {integrity: sha512-L/G9IUjOWhBU0yun89rv8fKqmKC+T0HfhrFjlIml71WpfBv9eb4E9Bev8FMbyueBIU9vxQqbd+oOsVcDa5amGw==} + vue-tsc@3.1.6: + resolution: {integrity: sha512-h5mMNGIDI+WMZxTeuYcpfSeDtBIiHXAg3qsrt65H4vcFTYmuM1THNHMzlnDvD8kX0fwLuf6auxWP340bH/zcpw==} hasBin: true peerDependencies: typescript: '>=5.0.0' @@ -1766,11 +1755,11 @@ snapshots: '@types/body-parser@1.19.5': dependencies: '@types/connect': 3.4.38 - '@types/node': 20.19.25 + '@types/node': 24.10.1 '@types/connect@3.4.38': dependencies: - '@types/node': 20.19.25 + '@types/node': 24.10.1 '@types/debug@4.1.12': dependencies: @@ -1780,7 +1769,7 @@ snapshots: '@types/express-serve-static-core@5.0.6': dependencies: - '@types/node': 20.19.25 + '@types/node': 24.10.1 '@types/qs': 6.9.15 '@types/range-parser': 1.2.7 '@types/send': 0.17.4 @@ -1814,9 +1803,9 @@ snapshots: '@types/ms@0.7.34': {} - '@types/node@20.19.25': + '@types/node@24.10.1': dependencies: - undici-types: 6.21.0 + undici-types: 7.16.0 '@types/qs@6.9.15': {} @@ -1825,12 +1814,12 @@ snapshots: '@types/send@0.17.4': dependencies: '@types/mime': 1.3.5 - '@types/node': 20.19.25 + '@types/node': 24.10.1 '@types/serve-static@2.2.0': dependencies: '@types/http-errors': 2.0.4 - '@types/node': 20.19.25 + '@types/node': 24.10.1 '@types/unist@3.0.2': {} @@ -1845,32 +1834,30 @@ snapshots: '@ungap/structured-clone@1.2.0': {} - '@vitejs/plugin-vue@6.0.1(vite@7.2.2(@types/node@20.19.25))(vue@3.5.25(typescript@5.4.5))': + '@vitejs/plugin-vue@6.0.1(vite@7.2.2(@types/node@24.10.1))(vue@3.5.25(typescript@5.4.5))': dependencies: '@rolldown/pluginutils': 1.0.0-beta.29 - vite: 7.2.2(@types/node@20.19.25) + vite: 7.2.2(@types/node@24.10.1) vue: 3.5.25(typescript@5.4.5) '@volar/language-core@2.4.23': dependencies: '@volar/source-map': 2.4.23 + '@volar/language-core@2.4.26': + dependencies: + '@volar/source-map': 2.4.26 + '@volar/source-map@2.4.23': {} - '@volar/typescript@2.4.23': + '@volar/source-map@2.4.26': {} + + '@volar/typescript@2.4.26': dependencies: - '@volar/language-core': 2.4.23 + '@volar/language-core': 2.4.26 path-browserify: 1.0.1 vscode-uri: 3.1.0 - '@vue/compiler-core@3.5.24': - dependencies: - '@babel/parser': 7.28.5 - '@vue/shared': 3.5.24 - entities: 4.5.0 - estree-walker: 2.0.2 - source-map-js: 1.2.1 - '@vue/compiler-core@3.5.25': dependencies: '@babel/parser': 7.28.5 @@ -1879,11 +1866,6 @@ snapshots: estree-walker: 2.0.2 source-map-js: 1.2.1 - '@vue/compiler-dom@3.5.24': - dependencies: - '@vue/compiler-core': 3.5.24 - '@vue/shared': 3.5.24 - '@vue/compiler-dom@3.5.25': dependencies: '@vue/compiler-core': 3.5.25 @@ -1927,8 +1909,20 @@ snapshots: '@vue/language-core@3.1.5(typescript@5.4.5)': dependencies: '@volar/language-core': 2.4.23 - '@vue/compiler-dom': 3.5.24 - '@vue/shared': 3.5.24 + '@vue/compiler-dom': 3.5.25 + '@vue/shared': 3.5.25 + alien-signals: 3.0.0 + muggle-string: 0.4.1 + path-browserify: 1.0.1 + picomatch: 4.0.3 + optionalDependencies: + typescript: 5.4.5 + + '@vue/language-core@3.1.6(typescript@5.4.5)': + dependencies: + '@volar/language-core': 2.4.26 + '@vue/compiler-dom': 3.5.25 + '@vue/shared': 3.5.25 alien-signals: 3.0.0 muggle-string: 0.4.1 path-browserify: 1.0.1 @@ -1987,10 +1981,6 @@ snapshots: alien-signals@3.0.0: {} - ansi-styles@4.3.0: - dependencies: - color-convert: 2.0.1 - argparse@1.0.10: dependencies: sprintf-js: 1.0.3 @@ -2010,10 +2000,7 @@ snapshots: ccount@2.0.1: {} - chalk@4.1.2: - dependencies: - ansi-styles: 4.3.0 - supports-color: 7.2.0 + chalk@5.6.2: {} character-entities-html4@2.1.0: {} @@ -2023,12 +2010,6 @@ snapshots: ci-info@1.6.0: {} - color-convert@2.0.1: - dependencies: - color-name: 1.1.4 - - color-name@1.1.4: {} - comma-separated-tokens@2.0.3: {} confbox@0.1.8: {} @@ -2159,8 +2140,6 @@ snapshots: gsap@3.13.0: {} - has-flag@4.0.0: {} - hast-util-to-html@9.0.5: dependencies: '@types/hast': 3.0.4 @@ -2712,10 +2691,6 @@ snapshots: dependencies: copy-anything: 3.0.5 - supports-color@7.2.0: - dependencies: - has-flag: 4.0.0 - sync-fetch@0.5.2: dependencies: node-fetch: 2.7.0 @@ -2765,7 +2740,7 @@ snapshots: ufo@1.5.4: {} - undici-types@6.21.0: {} + undici-types@7.16.0: {} unist-util-is@6.0.0: dependencies: @@ -2801,7 +2776,7 @@ snapshots: unist-util-stringify-position: 4.0.0 vfile-message: 4.0.2 - vite@7.0.4(@types/node@20.19.25): + vite@7.0.4(@types/node@24.10.1): dependencies: esbuild: 0.25.1 fdir: 6.4.6(picomatch@4.0.2) @@ -2810,10 +2785,10 @@ snapshots: rollup: 4.44.0 tinyglobby: 0.2.14 optionalDependencies: - '@types/node': 20.19.25 + '@types/node': 24.10.1 fsevents: 2.3.3 - vite@7.2.2(@types/node@20.19.25): + vite@7.2.2(@types/node@24.10.1): dependencies: esbuild: 0.25.1 fdir: 6.5.0(picomatch@4.0.3) @@ -2822,20 +2797,20 @@ snapshots: rollup: 4.44.0 tinyglobby: 0.2.15 optionalDependencies: - '@types/node': 20.19.25 + '@types/node': 24.10.1 fsevents: 2.3.3 - vitepress-plugin-group-icons@1.6.5(vite@7.0.4(@types/node@20.19.25)): + vitepress-plugin-group-icons@1.6.5(vite@7.0.4(@types/node@24.10.1)): dependencies: '@iconify-json/logos': 1.2.9 '@iconify-json/vscode-icons': 1.2.32 '@iconify/utils': 3.0.2 optionalDependencies: - vite: 7.0.4(@types/node@20.19.25) + vite: 7.0.4(@types/node@24.10.1) transitivePeerDependencies: - supports-color - vitepress@2.0.0-alpha.15(@types/node@20.19.25)(postcss@8.5.6)(typescript@5.4.5): + vitepress@2.0.0-alpha.15(@types/node@24.10.1)(postcss@8.5.6)(typescript@5.4.5): dependencies: '@docsearch/css': 4.3.2 '@docsearch/js': 4.3.2 @@ -2844,7 +2819,7 @@ snapshots: '@shikijs/transformers': 3.15.0 '@shikijs/types': 3.15.0 '@types/markdown-it': 14.1.2 - '@vitejs/plugin-vue': 6.0.1(vite@7.2.2(@types/node@20.19.25))(vue@3.5.25(typescript@5.4.5)) + '@vitejs/plugin-vue': 6.0.1(vite@7.2.2(@types/node@24.10.1))(vue@3.5.25(typescript@5.4.5)) '@vue/devtools-api': 8.0.5 '@vue/shared': 3.5.24 '@vueuse/core': 14.0.0(vue@3.5.25(typescript@5.4.5)) @@ -2853,7 +2828,7 @@ snapshots: mark.js: 8.11.1 minisearch: 7.2.0 shiki: 3.15.0 - vite: 7.2.2(@types/node@20.19.25) + vite: 7.2.2(@types/node@24.10.1) vue: 3.5.25(typescript@5.4.5) optionalDependencies: postcss: 8.5.6 @@ -2888,10 +2863,10 @@ snapshots: dependencies: vue: 3.5.25(typescript@5.4.5) - vue-tsc@3.1.5(typescript@5.4.5): + vue-tsc@3.1.6(typescript@5.4.5): dependencies: - '@volar/typescript': 2.4.23 - '@vue/language-core': 3.1.5(typescript@5.4.5) + '@volar/typescript': 2.4.26 + '@vue/language-core': 3.1.6(typescript@5.4.5) typescript: 5.4.5 vue@3.5.25(typescript@5.4.5):