Skip to content

Commit 41801f8

Browse files
committed
[fix] Path compatibility of Koa Router 15
[optimize] update Upstream packages
1 parent 1ccc69c commit 41801f8

File tree

6 files changed

+539
-547
lines changed

6 files changed

+539
-547
lines changed

package.json

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@
1414
"test": "lint-staged && tsc --noEmit"
1515
},
1616
"dependencies": {
17-
"@koa/router": "^15.0.0",
17+
"@koa/router": "^15.1.1",
1818
"@mdx-js/loader": "^3.1.1",
1919
"@mdx-js/react": "^3.1.1",
20-
"@next/mdx": "^16.0.7",
20+
"@next/mdx": "^16.1.0",
2121
"core-js": "^3.47.0",
2222
"echarts-jsx": "^0.6.0",
2323
"file-type": "^21.1.1",
@@ -36,13 +36,13 @@
3636
"mobx-restful": "^2.1.4",
3737
"mobx-restful-table": "^2.6.3",
3838
"mobx-strapi": "^0.8.1",
39-
"next": "^16.0.7",
39+
"next": "^16.1.0",
4040
"next-pwa": "^5.6.0",
41-
"next-ssr-middleware": "^1.0.3",
41+
"next-ssr-middleware": "^1.1.0",
4242
"open-react-map": "^0.9.1",
43-
"react": "^19.2.1",
43+
"react": "^19.2.3",
4444
"react-bootstrap": "^2.10.10",
45-
"react-dom": "^19.2.1",
45+
"react-dom": "^19.2.3",
4646
"react-typed-component": "^1.0.6",
4747
"remark-frontmatter": "^5.0.0",
4848
"remark-mdx-frontmatter": "^5.2.0",
@@ -55,34 +55,34 @@
5555
"@babel/plugin-transform-typescript": "^7.28.5",
5656
"@babel/preset-react": "^7.28.5",
5757
"@cspell/eslint-plugin": "^9.4.0",
58-
"@eslint/js": "^9.39.1",
59-
"@next/eslint-plugin-next": "^16.0.7",
58+
"@eslint/js": "^9.39.2",
59+
"@next/eslint-plugin-next": "^16.1.0",
6060
"@open-source-bazaar/china-ngo-database": "^0.6.0",
6161
"@softonus/prettier-plugin-duplicate-remover": "^1.1.2",
6262
"@stylistic/eslint-plugin": "^5.6.1",
6363
"@types/eslint-config-prettier": "^6.11.3",
6464
"@types/koa": "^3.0.1",
6565
"@types/next-pwa": "^5.6.9",
66-
"@types/node": "^22.19.1",
66+
"@types/node": "^22.19.3",
6767
"@types/react": "^19.2.7",
6868
"@types/react-dom": "^19.2.3",
69-
"eslint": "^9.39.1",
70-
"eslint-config-next": "^16.0.7",
69+
"eslint": "^9.39.2",
70+
"eslint-config-next": "^16.1.0",
7171
"eslint-config-prettier": "^10.1.8",
7272
"eslint-plugin-react": "^7.37.5",
7373
"eslint-plugin-simple-import-sort": "^12.1.1",
7474
"globals": "^16.5.0",
7575
"husky": "^9.1.7",
7676
"jiti": "^2.6.1",
77-
"less": "^4.4.2",
77+
"less": "^4.5.1",
7878
"less-loader": "^12.3.0",
7979
"lint-staged": "^16.2.7",
8080
"next-with-less": "^3.0.1",
8181
"prettier": "^3.7.4",
8282
"prettier-plugin-css-order": "^2.1.2",
83-
"sass": "^1.94.2",
83+
"sass": "^1.97.1",
8484
"typescript": "~5.9.3",
85-
"typescript-eslint": "^8.48.1"
85+
"typescript-eslint": "^8.50.0"
8686
},
8787
"resolutions": {
8888
"mobx-react-helper": "$mobx-react-helper",
@@ -92,6 +92,7 @@
9292
"onlyBuiltDependencies": [
9393
"@parcel/watcher",
9494
"core-js",
95+
"less",
9596
"sharp",
9697
"unrs-resolver"
9798
]

pages/_document.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ export default class CustomDocument extends Document<CustomDocumentProps> {
3939
href="https://unpkg.com/[email protected]/github-markdown.css"
4040
/>
4141
<link rel="stylesheet" href="https://unpkg.com/[email protected]/dist/index.css" />
42+
<link rel="stylesheet" href="https://unpkg.com/[email protected]/dist/index.css" />
4243
<link rel="stylesheet" href="https://unpkg.com/[email protected]/dist/leaflet.css" />
4344
</Head>
4445

pages/api/GitHub/[...slug].ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@ export const config = { api: { bodyParser: false } };
77

88
const router = createKoaRouter(import.meta.url);
99

10-
router.get('/(.*)', safeAPI, proxyGitHubAll);
10+
router.get('/*slug', safeAPI, proxyGitHubAll);
1111

1212
export default withKoaRouter(router);

pages/api/GitHub/raw/[...slug].ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ export const config = { api: { bodyParser: false } };
99

1010
const router = createKoaRouter(import.meta.url);
1111

12-
router.all('/(.*)', safeAPI, async (context: Context) => {
12+
router.all('/*slug', safeAPI, async (context: Context) => {
1313
const { method, url, headers, body } = context;
1414

1515
delete headers.host;

pages/api/Lark/bitable/v1/[...slug].ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,6 @@ router.get('/apps/:app/tables/:table/records', safeAPI, async (context: Context)
3636
context.body = body;
3737
});
3838

39-
router.all('/(.*)', safeAPI, proxyLarkAll);
39+
router.all('/*slug', safeAPI, proxyLarkAll);
4040

4141
export default withKoaRouter(router);

0 commit comments

Comments
 (0)