Skip to content

Commit eab4dee

Browse files
committed
[migrate] upgrade to Vercel CLI 50.x & Open-Source-Bazaar/feishu-action@v3
[migrate] upgrade to ESLint 10 & other latest Upstream packages/extensions
1 parent b52ae00 commit eab4dee

File tree

5 files changed

+2137
-2238
lines changed

5 files changed

+2137
-2238
lines changed

.github/workflows/main.yml

Lines changed: 54 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -23,45 +23,65 @@ jobs:
2323
- run: git submodule update --init --remote --recursive
2424
if: ${{ env.VERCEL_TOKEN && env.VERCEL_ORG_ID && env.VERCEL_PROJECT_ID }}
2525

26+
- uses: actions/setup-node@v6
27+
if: ${{ env.VERCEL_TOKEN && env.VERCEL_ORG_ID && env.VERCEL_PROJECT_ID }}
28+
with:
29+
node-version: 24
30+
2631
- name: Deploy to Vercel
2732
id: vercel-deployment
28-
uses: amondnet/vercel-action@v25
2933
if: ${{ env.VERCEL_TOKEN && env.VERCEL_ORG_ID && env.VERCEL_PROJECT_ID }}
30-
with:
31-
vercel-token: ${{ secrets.VERCEL_TOKEN }}
32-
github-token: ${{ secrets.GITHUB_TOKEN }}
33-
vercel-org-id: ${{ secrets.VERCEL_ORG_ID }}
34-
vercel-project-id: ${{ secrets.VERCEL_PROJECT_ID }}
35-
working-directory: ./
36-
vercel-args: ${{ github.ref == 'refs/heads/main' && ' --prod' || '' }}
34+
shell: bash
35+
run: |
36+
set -euo pipefail
37+
38+
npm install vercel -g
39+
40+
if [[ "$GITHUB_REF" == 'refs/heads/main' ]]; then
41+
DeployOutput=$(vercel -t "$VERCEL_TOKEN" --prod)
42+
else
43+
DeployOutput=$(vercel -t "$VERCEL_TOKEN")
44+
fi
45+
echo "$DeployOutput"
46+
47+
ParsedURL=$(echo "$DeployOutput" | grep -Eo 'https://[^[:space:]]*\.vercel\.app' | tail -n 1)
48+
49+
if [[ -z "$ParsedURL" ]]; then
50+
echo "Failed to parse Vercel URL from deploy output"
51+
exit 1
52+
fi
53+
vercel inspect "$ParsedURL" -t "$VERCEL_TOKEN" -F json > vercel-inspect.json
54+
55+
InspectURL=$(jq -r '.url // empty' vercel-inspect.json)
56+
57+
if [[ -z "$InspectURL" ]]; then
58+
echo "Failed to parse inspect url from vercel-inspect.json"
59+
exit 1
60+
fi
61+
if [[ "$InspectURL" != http* ]]; then
62+
InspectURL="https://$InspectURL"
63+
fi
64+
echo "preview-url=$InspectURL" >> "$GITHUB_OUTPUT"
3765
3866
- name: Lark notification
39-
uses: Open-Source-Bazaar/feishu-action@v2
67+
uses: Open-Source-Bazaar/feishu-action@v3
4068
with:
4169
url: ${{ secrets.LARK_CHATBOT_HOOK_URL }}
42-
msg_type: post
70+
msg_type: interactive
4371
content: |
44-
post:
45-
en_us:
46-
title: "Vercel Preview Environment"
47-
content:
48-
- - tag: text
49-
text: "Git Repository: "
50-
- tag: a
51-
text: ${{ github.server_url }}/${{ github.repository }}
52-
href: ${{ github.server_url }}/${{ github.repository }}
53-
- - tag: text
54-
text: "Code Branch: "
55-
- tag: a
56-
text: ${{ github.ref }}
57-
href: ${{ github.server_url }}/${{ github.repository }}/tree/${{ github.ref_name }}
58-
- - tag: text
59-
text: "Commit Author: "
60-
- tag: a
61-
text: ${{ github.actor }}
62-
href: ${{ github.server_url }}/${{ github.actor }}
63-
- - tag: text
64-
text: "Preview Link: "
65-
- tag: a
66-
text: ${{ steps.vercel-deployment.outputs.preview-url }}
67-
href: ${{ steps.vercel-deployment.outputs.preview-url }}
72+
schema: "2.0"
73+
config:
74+
wide_screen_mode: true
75+
header:
76+
title:
77+
tag: plain_text
78+
content: Vercel 预览部署
79+
template: blue
80+
body:
81+
elements:
82+
- tag: markdown
83+
content: |
84+
- **Git 仓库**: [${{ github.server_url }}/${{ github.repository }}](${{ github.server_url }}/${{ github.repository }})
85+
- **代码分支**: [${{ github.ref }}](${{ github.server_url }}/${{ github.repository }}/tree/${{ github.ref_name }})
86+
- **提交作者**: [${{ github.actor }}](${{ github.server_url }}/${{ github.actor }})
87+
- **预览链接**: [${{ steps.vercel-deployment.outputs.preview-url }}](${{ steps.vercel-deployment.outputs.preview-url }})

.vscode/extensions.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,13 @@
77
"redhat.vscode-yaml",
88
"clinyong.vscode-css-modules",
99
"akamud.vscode-caniuse",
10-
"visualstudioexptteam.intellicode-api-usage-examples",
1110
"pflannery.vscode-versionlens",
1211
"christian-kohler.npm-intellisense",
1312
"esbenp.prettier-vscode",
1413
"rangav.vscode-thunder-client",
1514
"eamodio.gitlens",
1615
"github.vscode-pull-request-github",
1716
"github.vscode-github-actions",
18-
"GitHub.copilot"
17+
"GitHub.copilot-chat"
1918
]
2019
}

package.json

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -9,72 +9,72 @@
99
"dependencies": {
1010
"@mdx-js/loader": "^3.1.1",
1111
"@mdx-js/react": "^3.1.1",
12-
"@next/mdx": "^16.1.4",
13-
"@sentry/nextjs": "^10.35.0",
12+
"@next/mdx": "^16.1.7",
13+
"@sentry/nextjs": "^10.44.0",
1414
"copy-webpack-plugin": "^13.0.1",
15-
"core-js": "^3.47.0",
16-
"file-type": "^21.3.0",
15+
"core-js": "^3.49.0",
16+
"file-type": "^21.3.3",
1717
"idea-react": "^2.0.0-rc.13",
18-
"koa": "^3.1.1",
18+
"koa": "^3.1.2",
1919
"koajax": "^3.1.2",
20-
"less": "^4.5.1",
21-
"less-loader": "^12.3.0",
22-
"lodash": "^4.17.21",
23-
"marked": "^17.0.1",
20+
"less": "^4.6.4",
21+
"less-loader": "^12.3.2",
22+
"lodash": "^4.17.23",
23+
"marked": "^17.0.4",
2424
"mime": "^4.1.0",
2525
"mobx": "^6.15.0",
2626
"mobx-github": "^0.6.2",
2727
"mobx-i18n": "^0.7.2",
28-
"mobx-lark": "^2.6.4",
28+
"mobx-lark": "^2.7.0",
2929
"mobx-react": "^9.2.1",
3030
"mobx-react-helper": "^0.5.1",
3131
"mobx-restful": "^2.1.4",
3232
"mobx-restful-table": "^2.6.3",
33-
"next": "^16.1.4",
33+
"next": "^16.1.7",
3434
"next-pwa": "~5.6.0",
3535
"next-ssr-middleware": "^1.1.0",
3636
"next-with-less": "^3.0.1",
37-
"react": "^19.2.3",
37+
"react": "^19.2.4",
3838
"react-bootstrap": "^2.10.10",
3939
"react-bootstrap-editor": "^2.1.1",
40-
"react-dom": "^19.2.3",
40+
"react-dom": "^19.2.4",
4141
"remark-frontmatter": "^5.0.0",
4242
"remark-gfm": "^4.0.1",
4343
"remark-mdx-frontmatter": "^5.2.0",
44-
"undici": "^7.18.2",
44+
"undici": "^7.24.4",
4545
"web-utility": "^4.6.4",
46-
"webpack": "^5.104.1",
46+
"webpack": "^5.105.4",
4747
"yaml": "^2.8.2"
4848
},
4949
"devDependencies": {
50-
"@babel/plugin-proposal-decorators": "^7.28.6",
50+
"@babel/plugin-proposal-decorators": "^7.29.0",
5151
"@babel/plugin-transform-typescript": "^7.28.6",
5252
"@babel/preset-react": "^7.28.5",
53-
"@cspell/eslint-plugin": "^9.6.0",
54-
"@eslint/js": "^9.39.2",
55-
"@next/eslint-plugin-next": "^16.1.4",
53+
"@cspell/eslint-plugin": "^9.7.0",
54+
"@eslint/js": "^10.0.1",
55+
"@next/eslint-plugin-next": "^16.1.7",
5656
"@octokit/openapi-types": "^27.0.0",
5757
"@softonus/prettier-plugin-duplicate-remover": "^1.1.2",
58-
"@stylistic/eslint-plugin": "^5.7.0",
58+
"@stylistic/eslint-plugin": "^5.10.0",
5959
"@types/eslint-config-prettier": "^6.11.3",
6060
"@types/koa": "^3.0.1",
61-
"@types/lodash": "^4.17.23",
61+
"@types/lodash": "^4.17.24",
6262
"@types/next-pwa": "^5.6.9",
63-
"@types/node": "^24.10.9",
64-
"@types/react": "^19.2.8",
65-
"eslint": "^9.39.2",
66-
"eslint-config-next": "^16.1.4",
63+
"@types/node": "^24.12.0",
64+
"@types/react": "^19.2.14",
65+
"eslint": "^10.0.3",
66+
"eslint-config-next": "^16.1.7",
6767
"eslint-config-prettier": "^10.1.8",
6868
"eslint-plugin-react": "^7.37.5",
6969
"eslint-plugin-simple-import-sort": "^12.1.1",
70-
"globals": "^17.0.0",
70+
"globals": "^17.4.0",
7171
"husky": "^9.1.7",
7272
"jiti": "^2.6.1",
73-
"lint-staged": "^16.2.7",
74-
"prettier": "^3.8.0",
73+
"lint-staged": "^16.4.0",
74+
"prettier": "^3.8.1",
7575
"prettier-plugin-css-order": "^2.2.0",
7676
"typescript": "~5.9.3",
77-
"typescript-eslint": "^8.53.1"
77+
"typescript-eslint": "^8.57.1"
7878
},
7979
"resolutions": {
8080
"next": "$next"

0 commit comments

Comments
 (0)