mirror of
https://github.com/doocs/advanced-java.git
synced 2026-08-18 10:43:29 +08:00
chore: upgrade deps, migrate theme to TypeScript, and update GitHub Actions (#345)
Align with sibling Doocs projects: add TypeScript tooling, pin GitHub Actions to Node 24-compatible versions, and bump pnpm to v10.
This commit is contained in:
8
.github/workflows/compress.yml
vendored
8
.github/workflows/compress.yml
vendored
@@ -11,11 +11,11 @@ jobs:
|
||||
if: github.repository == 'doocs/advanced-java'
|
||||
steps:
|
||||
- name: Checkout Branch
|
||||
uses: actions/checkout@v6
|
||||
uses: actions/checkout@v7
|
||||
|
||||
- name: Compress Images
|
||||
id: calibre
|
||||
uses: calibreapp/image-actions@main
|
||||
uses: calibreapp/image-actions@1.5.0
|
||||
with:
|
||||
githubToken: ${{ secrets.GITHUB_TOKEN }}
|
||||
compressOnly: true
|
||||
@@ -31,6 +31,6 @@ jobs:
|
||||
- name: Push Changes
|
||||
if: |
|
||||
steps.calibre.outputs.markdown != ''
|
||||
uses: ad-m/github-push-action@master
|
||||
uses: ad-m/github-push-action@v1.3.0
|
||||
with:
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
8
.github/workflows/deploy.yml
vendored
8
.github/workflows/deploy.yml
vendored
@@ -9,12 +9,12 @@ jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
- uses: actions/checkout@v7
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Setup pnpm
|
||||
uses: pnpm/action-setup@v4
|
||||
uses: pnpm/action-setup@v6
|
||||
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v6
|
||||
@@ -32,7 +32,7 @@ jobs:
|
||||
run: echo "java.doocs.org" > docs/.vitepress/dist/CNAME
|
||||
|
||||
- name: Upload artifact
|
||||
uses: actions/upload-pages-artifact@v3
|
||||
uses: actions/upload-pages-artifact@v5
|
||||
with:
|
||||
path: docs/.vitepress/dist
|
||||
|
||||
@@ -48,4 +48,4 @@ jobs:
|
||||
steps:
|
||||
- name: Deploy to GitHub Pages
|
||||
id: deployment
|
||||
uses: actions/deploy-pages@v4
|
||||
uses: actions/deploy-pages@v5
|
||||
|
||||
7
docs/.vitepress/env.d.ts
vendored
Normal file
7
docs/.vitepress/env.d.ts
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
/// <reference types="vitepress/client" />
|
||||
|
||||
declare module "*.vue" {
|
||||
import type { DefineComponent } from "vue";
|
||||
const component: DefineComponent<object, object, unknown>;
|
||||
export default component;
|
||||
}
|
||||
@@ -2,11 +2,12 @@ import DefaultTheme from "vitepress/theme";
|
||||
import giscusTalk from "vitepress-plugin-comment-with-giscus";
|
||||
import { useData, useRoute } from "vitepress";
|
||||
import { toRefs } from "vue";
|
||||
import type { Theme } from "vitepress";
|
||||
import Layout from "./Layout.vue";
|
||||
|
||||
export default {
|
||||
extends: DefaultTheme,
|
||||
Layout: Layout,
|
||||
Layout,
|
||||
enhanceApp(ctx) {
|
||||
DefaultTheme.enhanceApp(ctx);
|
||||
},
|
||||
@@ -30,7 +31,7 @@ export default {
|
||||
frontmatter,
|
||||
route,
|
||||
},
|
||||
true
|
||||
true,
|
||||
);
|
||||
},
|
||||
};
|
||||
} satisfies Theme;
|
||||
@@ -1,16 +1,18 @@
|
||||
{
|
||||
"name": "advanced-java",
|
||||
"private": true,
|
||||
"packageManager": "pnpm@9.12.3",
|
||||
"packageManager": "pnpm@10.33.0",
|
||||
"scripts": {
|
||||
"docs:dev": "vitepress dev docs",
|
||||
"docs:build": "vitepress build docs",
|
||||
"docs:preview": "vitepress preview docs"
|
||||
"docs:preview": "vitepress preview docs",
|
||||
"typecheck": "tsc --noEmit"
|
||||
},
|
||||
"dependencies": {
|
||||
"vitepress-plugin-comment-with-giscus": "^1.1.15"
|
||||
},
|
||||
"devDependencies": {
|
||||
"typescript": "^6.0.3",
|
||||
"vitepress": "2.0.0-alpha.17"
|
||||
}
|
||||
}
|
||||
|
||||
77
pnpm-lock.yaml
generated
77
pnpm-lock.yaml
generated
@@ -10,11 +10,14 @@ importers:
|
||||
dependencies:
|
||||
vitepress-plugin-comment-with-giscus:
|
||||
specifier: ^1.1.15
|
||||
version: 1.1.15(vue@3.5.32)
|
||||
version: 1.1.15(vue@3.5.32(typescript@6.0.3))
|
||||
devDependencies:
|
||||
typescript:
|
||||
specifier: ^6.0.3
|
||||
version: 6.0.3
|
||||
vitepress:
|
||||
specifier: 2.0.0-alpha.17
|
||||
version: 2.0.0-alpha.17(postcss@8.5.10)
|
||||
version: 2.0.0-alpha.17(postcss@8.5.10)(typescript@6.0.3)
|
||||
|
||||
packages:
|
||||
|
||||
@@ -257,66 +260,79 @@ packages:
|
||||
resolution: {integrity: sha512-L+34Qqil+v5uC0zEubW7uByo78WOCIrBvci69E7sFASRl0X7b/MB6Cqd1lky/CtcSVTydWa2WZwFuWexjS5o6g==}
|
||||
cpu: [arm]
|
||||
os: [linux]
|
||||
libc: [glibc]
|
||||
|
||||
'@rollup/rollup-linux-arm-musleabihf@4.60.1':
|
||||
resolution: {integrity: sha512-n83O8rt4v34hgFzlkb1ycniJh7IR5RCIqt6mz1VRJD6pmhRi0CXdmfnLu9dIUS6buzh60IvACM842Ffb3xd6Gg==}
|
||||
cpu: [arm]
|
||||
os: [linux]
|
||||
libc: [musl]
|
||||
|
||||
'@rollup/rollup-linux-arm64-gnu@4.60.1':
|
||||
resolution: {integrity: sha512-Nql7sTeAzhTAja3QXeAI48+/+GjBJ+QmAH13snn0AJSNL50JsDqotyudHyMbO2RbJkskbMbFJfIJKWA6R1LCJQ==}
|
||||
cpu: [arm64]
|
||||
os: [linux]
|
||||
libc: [glibc]
|
||||
|
||||
'@rollup/rollup-linux-arm64-musl@4.60.1':
|
||||
resolution: {integrity: sha512-+pUymDhd0ys9GcKZPPWlFiZ67sTWV5UU6zOJat02M1+PiuSGDziyRuI/pPue3hoUwm2uGfxdL+trT6Z9rxnlMA==}
|
||||
cpu: [arm64]
|
||||
os: [linux]
|
||||
libc: [musl]
|
||||
|
||||
'@rollup/rollup-linux-loong64-gnu@4.60.1':
|
||||
resolution: {integrity: sha512-VSvgvQeIcsEvY4bKDHEDWcpW4Yw7BtlKG1GUT4FzBUlEKQK0rWHYBqQt6Fm2taXS+1bXvJT6kICu5ZwqKCnvlQ==}
|
||||
cpu: [loong64]
|
||||
os: [linux]
|
||||
libc: [glibc]
|
||||
|
||||
'@rollup/rollup-linux-loong64-musl@4.60.1':
|
||||
resolution: {integrity: sha512-4LqhUomJqwe641gsPp6xLfhqWMbQV04KtPp7/dIp0nzPxAkNY1AbwL5W0MQpcalLYk07vaW9Kp1PBhdpZYYcEw==}
|
||||
cpu: [loong64]
|
||||
os: [linux]
|
||||
libc: [musl]
|
||||
|
||||
'@rollup/rollup-linux-ppc64-gnu@4.60.1':
|
||||
resolution: {integrity: sha512-tLQQ9aPvkBxOc/EUT6j3pyeMD6Hb8QF2BTBnCQWP/uu1lhc9AIrIjKnLYMEroIz/JvtGYgI9dF3AxHZNaEH0rw==}
|
||||
cpu: [ppc64]
|
||||
os: [linux]
|
||||
libc: [glibc]
|
||||
|
||||
'@rollup/rollup-linux-ppc64-musl@4.60.1':
|
||||
resolution: {integrity: sha512-RMxFhJwc9fSXP6PqmAz4cbv3kAyvD1etJFjTx4ONqFP9DkTkXsAMU4v3Vyc5BgzC+anz7nS/9tp4obsKfqkDHg==}
|
||||
cpu: [ppc64]
|
||||
os: [linux]
|
||||
libc: [musl]
|
||||
|
||||
'@rollup/rollup-linux-riscv64-gnu@4.60.1':
|
||||
resolution: {integrity: sha512-QKgFl+Yc1eEk6MmOBfRHYF6lTxiiiV3/z/BRrbSiW2I7AFTXoBFvdMEyglohPj//2mZS4hDOqeB0H1ACh3sBbg==}
|
||||
cpu: [riscv64]
|
||||
os: [linux]
|
||||
libc: [glibc]
|
||||
|
||||
'@rollup/rollup-linux-riscv64-musl@4.60.1':
|
||||
resolution: {integrity: sha512-RAjXjP/8c6ZtzatZcA1RaQr6O1TRhzC+adn8YZDnChliZHviqIjmvFwHcxi4JKPSDAt6Uhf/7vqcBzQJy0PDJg==}
|
||||
cpu: [riscv64]
|
||||
os: [linux]
|
||||
libc: [musl]
|
||||
|
||||
'@rollup/rollup-linux-s390x-gnu@4.60.1':
|
||||
resolution: {integrity: sha512-wcuocpaOlaL1COBYiA89O6yfjlp3RwKDeTIA0hM7OpmhR1Bjo9j31G1uQVpDlTvwxGn2nQs65fBFL5UFd76FcQ==}
|
||||
cpu: [s390x]
|
||||
os: [linux]
|
||||
libc: [glibc]
|
||||
|
||||
'@rollup/rollup-linux-x64-gnu@4.60.1':
|
||||
resolution: {integrity: sha512-77PpsFQUCOiZR9+LQEFg9GClyfkNXj1MP6wRnzYs0EeWbPcHs02AXu4xuUbM1zhwn3wqaizle3AEYg5aeoohhg==}
|
||||
cpu: [x64]
|
||||
os: [linux]
|
||||
libc: [glibc]
|
||||
|
||||
'@rollup/rollup-linux-x64-musl@4.60.1':
|
||||
resolution: {integrity: sha512-5cIATbk5vynAjqqmyBjlciMJl1+R/CwX9oLk/EyiFXDWd95KpHdrOJT//rnUl4cUcskrd0jCCw3wpZnhIHdD9w==}
|
||||
cpu: [x64]
|
||||
os: [linux]
|
||||
libc: [musl]
|
||||
|
||||
'@rollup/rollup-openbsd-x64@4.60.1':
|
||||
resolution: {integrity: sha512-cl0w09WsCi17mcmWqqglez9Gk8isgeWvoUZ3WiJFYSR3zjBQc2J5/ihSjpl+VLjPqjQ/1hJRcqBfLjssREQILw==}
|
||||
@@ -672,6 +688,11 @@ packages:
|
||||
trim-lines@3.0.1:
|
||||
resolution: {integrity: sha512-kRj8B+YHZCc9kQYdWfJB2/oUl9rA99qbowYYBtr4ui4mZyAQ2JpvVBd/6U2YloATfqBhBTSMhTpgBHtU0Mf3Rg==}
|
||||
|
||||
typescript@6.0.3:
|
||||
resolution: {integrity: sha512-y2TvuxSZPDyQakkFRPZHKFm+KKVqIisdg9/CZwm9ftvKXLP8NRWj38/ODjNbr43SsoXqNuAisEf1GdCxqWcdBw==}
|
||||
engines: {node: '>=14.17'}
|
||||
hasBin: true
|
||||
|
||||
unist-util-is@6.0.1:
|
||||
resolution: {integrity: sha512-LsiILbtBETkDz8I9p1dQ0uyRUWuaQzd/cuEeS1hoRSyW5E5XGmTzlwY1OrNzzakGowI9Dr/I8HVaw4hTtnxy8g==}
|
||||
|
||||
@@ -861,10 +882,10 @@ snapshots:
|
||||
'@esbuild/win32-x64@0.27.7':
|
||||
optional: true
|
||||
|
||||
'@giscus/vue@2.4.0(vue@3.5.32)':
|
||||
'@giscus/vue@2.4.0(vue@3.5.32(typescript@6.0.3))':
|
||||
dependencies:
|
||||
giscus: 1.6.0
|
||||
vue: 3.5.32
|
||||
vue: 3.5.32(typescript@6.0.3)
|
||||
|
||||
'@iconify-json/simple-icons@1.2.78':
|
||||
dependencies:
|
||||
@@ -1022,11 +1043,11 @@ snapshots:
|
||||
|
||||
'@ungap/structured-clone@1.3.0': {}
|
||||
|
||||
'@vitejs/plugin-vue@6.0.6(vite@7.3.2)(vue@3.5.32)':
|
||||
'@vitejs/plugin-vue@6.0.6(vite@7.3.2)(vue@3.5.32(typescript@6.0.3))':
|
||||
dependencies:
|
||||
'@rolldown/pluginutils': 1.0.0-rc.13
|
||||
vite: 7.3.2
|
||||
vue: 3.5.32
|
||||
vue: 3.5.32(typescript@6.0.3)
|
||||
|
||||
'@vue/compiler-core@3.5.32':
|
||||
dependencies:
|
||||
@@ -1087,34 +1108,34 @@ snapshots:
|
||||
'@vue/shared': 3.5.32
|
||||
csstype: 3.2.3
|
||||
|
||||
'@vue/server-renderer@3.5.32(vue@3.5.32)':
|
||||
'@vue/server-renderer@3.5.32(vue@3.5.32(typescript@6.0.3))':
|
||||
dependencies:
|
||||
'@vue/compiler-ssr': 3.5.32
|
||||
'@vue/shared': 3.5.32
|
||||
vue: 3.5.32
|
||||
vue: 3.5.32(typescript@6.0.3)
|
||||
|
||||
'@vue/shared@3.5.32': {}
|
||||
|
||||
'@vueuse/core@14.2.1(vue@3.5.32)':
|
||||
'@vueuse/core@14.2.1(vue@3.5.32(typescript@6.0.3))':
|
||||
dependencies:
|
||||
'@types/web-bluetooth': 0.0.21
|
||||
'@vueuse/metadata': 14.2.1
|
||||
'@vueuse/shared': 14.2.1(vue@3.5.32)
|
||||
vue: 3.5.32
|
||||
'@vueuse/shared': 14.2.1(vue@3.5.32(typescript@6.0.3))
|
||||
vue: 3.5.32(typescript@6.0.3)
|
||||
|
||||
'@vueuse/integrations@14.2.1(focus-trap@8.0.1)(vue@3.5.32)':
|
||||
'@vueuse/integrations@14.2.1(focus-trap@8.0.1)(vue@3.5.32(typescript@6.0.3))':
|
||||
dependencies:
|
||||
'@vueuse/core': 14.2.1(vue@3.5.32)
|
||||
'@vueuse/shared': 14.2.1(vue@3.5.32)
|
||||
vue: 3.5.32
|
||||
'@vueuse/core': 14.2.1(vue@3.5.32(typescript@6.0.3))
|
||||
'@vueuse/shared': 14.2.1(vue@3.5.32(typescript@6.0.3))
|
||||
vue: 3.5.32(typescript@6.0.3)
|
||||
optionalDependencies:
|
||||
focus-trap: 8.0.1
|
||||
|
||||
'@vueuse/metadata@14.2.1': {}
|
||||
|
||||
'@vueuse/shared@14.2.1(vue@3.5.32)':
|
||||
'@vueuse/shared@14.2.1(vue@3.5.32(typescript@6.0.3))':
|
||||
dependencies:
|
||||
vue: 3.5.32
|
||||
vue: 3.5.32(typescript@6.0.3)
|
||||
|
||||
birpc@2.9.0: {}
|
||||
|
||||
@@ -1351,6 +1372,8 @@ snapshots:
|
||||
|
||||
trim-lines@3.0.1: {}
|
||||
|
||||
typescript@6.0.3: {}
|
||||
|
||||
unist-util-is@6.0.1:
|
||||
dependencies:
|
||||
'@types/unist': 3.0.3
|
||||
@@ -1395,13 +1418,13 @@ snapshots:
|
||||
optionalDependencies:
|
||||
fsevents: 2.3.3
|
||||
|
||||
vitepress-plugin-comment-with-giscus@1.1.15(vue@3.5.32):
|
||||
vitepress-plugin-comment-with-giscus@1.1.15(vue@3.5.32(typescript@6.0.3)):
|
||||
dependencies:
|
||||
'@giscus/vue': 2.4.0(vue@3.5.32)
|
||||
'@giscus/vue': 2.4.0(vue@3.5.32(typescript@6.0.3))
|
||||
transitivePeerDependencies:
|
||||
- vue
|
||||
|
||||
vitepress@2.0.0-alpha.17(postcss@8.5.10):
|
||||
vitepress@2.0.0-alpha.17(postcss@8.5.10)(typescript@6.0.3):
|
||||
dependencies:
|
||||
'@docsearch/css': 4.6.2
|
||||
'@docsearch/js': 4.6.2
|
||||
@@ -1411,17 +1434,17 @@ snapshots:
|
||||
'@shikijs/transformers': 3.23.0
|
||||
'@shikijs/types': 3.23.0
|
||||
'@types/markdown-it': 14.1.2
|
||||
'@vitejs/plugin-vue': 6.0.6(vite@7.3.2)(vue@3.5.32)
|
||||
'@vitejs/plugin-vue': 6.0.6(vite@7.3.2)(vue@3.5.32(typescript@6.0.3))
|
||||
'@vue/devtools-api': 8.1.1
|
||||
'@vue/shared': 3.5.32
|
||||
'@vueuse/core': 14.2.1(vue@3.5.32)
|
||||
'@vueuse/integrations': 14.2.1(focus-trap@8.0.1)(vue@3.5.32)
|
||||
'@vueuse/core': 14.2.1(vue@3.5.32(typescript@6.0.3))
|
||||
'@vueuse/integrations': 14.2.1(focus-trap@8.0.1)(vue@3.5.32(typescript@6.0.3))
|
||||
focus-trap: 8.0.1
|
||||
mark.js: 8.11.1
|
||||
minisearch: 7.2.0
|
||||
shiki: 3.23.0
|
||||
vite: 7.3.2
|
||||
vue: 3.5.32
|
||||
vue: 3.5.32(typescript@6.0.3)
|
||||
optionalDependencies:
|
||||
postcss: 8.5.10
|
||||
transitivePeerDependencies:
|
||||
@@ -1449,12 +1472,14 @@ snapshots:
|
||||
- universal-cookie
|
||||
- yaml
|
||||
|
||||
vue@3.5.32:
|
||||
vue@3.5.32(typescript@6.0.3):
|
||||
dependencies:
|
||||
'@vue/compiler-dom': 3.5.32
|
||||
'@vue/compiler-sfc': 3.5.32
|
||||
'@vue/runtime-dom': 3.5.32
|
||||
'@vue/server-renderer': 3.5.32(vue@3.5.32)
|
||||
'@vue/server-renderer': 3.5.32(vue@3.5.32(typescript@6.0.3))
|
||||
'@vue/shared': 3.5.32
|
||||
optionalDependencies:
|
||||
typescript: 6.0.3
|
||||
|
||||
zwitch@2.0.4: {}
|
||||
|
||||
14
tsconfig.json
Normal file
14
tsconfig.json
Normal file
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"target": "ES2022",
|
||||
"module": "ESNext",
|
||||
"moduleResolution": "bundler",
|
||||
"strict": true,
|
||||
"skipLibCheck": true,
|
||||
"esModuleInterop": true,
|
||||
"resolveJsonModule": true,
|
||||
"isolatedModules": true,
|
||||
"noEmit": true
|
||||
},
|
||||
"include": ["docs/.vitepress/**/*"]
|
||||
}
|
||||
Reference in New Issue
Block a user