Skip to content

Commit 76be565

Browse files
authored
chore: upgrade deps, migrate theme to TypeScript, and fix security advisories (#18)
Bump vite/esbuild via pnpm overrides to resolve GHSA advisories, add SECURITY.md and Dependabot, and convert the VitePress theme entry from JS to TS.
1 parent 293ca9d commit 76be565

10 files changed

Lines changed: 587 additions & 268 deletions

File tree

.github/dependabot.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: npm
4+
directory: /
5+
schedule:
6+
interval: weekly
7+
open-pull-requests-limit: 10
8+
groups:
9+
vitepress:
10+
patterns:
11+
- vitepress*
12+
- vite*
13+
- vue*
14+
- typescript
15+
16+
- package-ecosystem: github-actions
17+
directory: /
18+
schedule:
19+
interval: weekly

.github/workflows/compress.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
if: github.repository == 'doocs/coding-interview'
1717
steps:
1818
- name: Checkout Branch
19-
uses: actions/checkout@v2
19+
uses: actions/checkout@v4
2020

2121
- name: Compress Images
2222
id: calibre

.github/workflows/prettier.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212

1313
steps:
1414
- name: Checkout
15-
uses: actions/checkout@v2
15+
uses: actions/checkout@v4
1616
with:
1717
ref: ${{ github.head_ref }}
1818

SECURITY.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Security Policy
2+
3+
## Supported Versions
4+
5+
| Version | Supported |
6+
| ------- | ------------------ |
7+
| main | :white_check_mark: |
8+
9+
## Reporting a Vulnerability
10+
11+
This project is a static documentation site built with [VitePress](https://vitepress.dev/). It does not run a backend service or process untrusted user input on a server.
12+
13+
If you discover a security issue in this repository (for example, a dependency vulnerability, leaked secret, or unsafe workflow configuration), please report it responsibly:
14+
15+
1. **Do not** open a public GitHub issue for security-sensitive reports.
16+
2. Email the maintainers at [szuyanglb@outlook.com](mailto:szuyanglb@outlook.com) with a description of the issue, steps to reproduce, and potential impact.
17+
3. You can also use [GitHub Private Vulnerability Reporting](https://github.com/doocs/coding-interview/security/advisories/new) if enabled for this repository.
18+
19+
We aim to acknowledge reports within 7 days and will coordinate a fix and disclosure timeline with you.
20+
21+
## Dependency Security
22+
23+
Dependency updates and known vulnerability fixes are tracked via Dependabot and `pnpm audit`. Pull requests that bump vulnerable transitive dependencies are welcome.

docs/.vitepress/env.d.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
/// <reference types="vite/client" />
2+
3+
declare module "*.vue" {
4+
import type { DefineComponent } from "vue";
5+
const component: DefineComponent<object, object, unknown>;
6+
export default component;
7+
}
Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import type { Theme } from "vitepress";
12
import DefaultTheme from "vitepress/theme";
23
import giscusTalk from "vitepress-plugin-comment-with-giscus";
34
import { useData, useRoute } from "vitepress";
@@ -6,7 +7,7 @@ import Layout from "./Layout.vue";
67

78
export default {
89
extends: DefaultTheme,
9-
Layout: Layout,
10+
Layout,
1011
enhanceApp(ctx) {
1112
DefaultTheme.enhanceApp(ctx);
1213
},
@@ -35,4 +36,4 @@ export default {
3536
true
3637
);
3738
},
38-
};
39+
} satisfies Theme;

package.json

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,15 @@
11
{
22
"devDependencies": {
3-
"vitepress": "^2.0.0-alpha.17"
3+
"typescript": "^5.9.3",
4+
"vitepress": "^2.0.0-alpha.17",
5+
"vue": "^3.5.32",
6+
"vue-tsc": "^3.0.8"
47
},
58
"scripts": {
69
"docs:dev": "vitepress dev docs",
710
"docs:build": "vitepress build docs",
8-
"docs:preview": "vitepress preview docs"
11+
"docs:preview": "vitepress preview docs",
12+
"docs:typecheck": "vue-tsc --noEmit"
913
},
1014
"dependencies": {
1115
"vitepress-plugin-comment-with-giscus": "^1.1.15"

0 commit comments

Comments
 (0)