Skip to content

Commit ffa86f7

Browse files
committed
[optimize] merge GitHub actions for all branches's deployment
[migrate] upgrade to React 19, React Router 7 (with Class-tools 0.2), MobX-i18n 0.7, MobX-GitHub 0.5, Node.js 22, PNPM 10, Lint-Staged 16 & other latest Upstream packages
1 parent 02fef45 commit ffa86f7

File tree

11 files changed

+4096
-4435
lines changed

11 files changed

+4096
-4435
lines changed

.github/workflows/main.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: CI & CD
22
on:
33
push:
44
branches:
5-
- master
5+
- '**'
66
jobs:
77
Build-and-Deploy:
88
runs-on: ubuntu-latest
@@ -17,10 +17,10 @@ jobs:
1717

1818
- uses: pnpm/action-setup@v4
1919
with:
20-
version: 9
20+
version: 10
2121
- uses: actions/setup-node@v4
2222
with:
23-
node-version: 20
23+
node-version: 22
2424
cache: pnpm
2525
- name: Install & Build
2626
run: |
@@ -29,6 +29,7 @@ jobs:
2929
3030
- name: Deploy to GitHub pages
3131
uses: peaceiris/actions-gh-pages@v4
32+
if: github.ref == 'refs/heads/master'
3233
with:
3334
publish_dir: ./dist
3435
personal_token: ${{ secrets.GITHUB_TOKEN }}
@@ -43,4 +44,4 @@ jobs:
4344
vercel-org-id: ${{ secrets.VERCEL_ORG_ID }}
4445
vercel-project-id: ${{ secrets.VERCEL_PROJECT_ID }}
4546
working-directory: ./dist
46-
vercel-args: --prod
47+
vercel-args: ${{ github.ref == 'refs/heads/master' && '--prod' || '' }}

.github/workflows/pull-request.yml

Lines changed: 0 additions & 35 deletions
This file was deleted.

.github/workflows/replace-repository-name.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,7 @@ TargetName=$4
77

88
sed -i "s/$SourceOwner\/$SourceName/$TargetOwner\/$TargetName/ig" \
99
$(grep -i $SourceOwner/$SourceName -rl . --exclude-dir=.git --exclude-dir=node_modules)
10+
sed -i "s/$SourceOwner/$TargetOwner/ig" \
11+
$(grep -i $SourceOwner -rl . --exclude-dir=.git --exclude-dir=node_modules)
1012
sed -i "s/$SourceName/$TargetName/ig" \
1113
$(grep -i $SourceName -rl . --exclude-dir=.git --exclude-dir=node_modules)

ReadMe.md

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -11,28 +11,27 @@
1111

1212
## Technology stack
1313

14-
- Language: [TypeScript v5][2]
15-
- Component engine: [React v18][1]
16-
- State management: [MobX v6][3]
17-
- Component suite: [React Bootstrap v2][10]
18-
- HTTP Client: [KoAJAX v1][11]
19-
- PWA framework: [Workbox v7][12]
20-
- Package bundler: [Parcel v2][13]
21-
- CI / CD: GitHub [Actions][14] + [Pages][15]
14+
- Language: [TypeScript v5][2]
15+
- Component engine: [React v19][1]
16+
- State management: [MobX v6][3]
17+
- Component suite: [React Bootstrap v2][10]
18+
- HTTP Client: [KoAJAX v3][11]
19+
- PWA framework: [Workbox v7][12]
20+
- Package bundler: [Parcel v2][13]
21+
- CI / CD: GitHub [Actions][14] + [Pages][15]
2222

2323
## Extra components
2424

2525
1. [Component Sample](src/component/TSXSample.tsx)
2626
2. Rich-text editor
27-
- [HTML version][18]
28-
- [JSON version](src/component/Editor.tsx)
27+
- [HTML version][18]
28+
- [JSON version](src/component/Editor.tsx)
2929
3. [GitHub logo](src/component/Git/Logo.tsx)
3030
4. [GitHub card](src/component/Git/Card.tsx)
3131

3232
## Best practice
3333

3434
1. Install GitHub apps in your organization or account:
35-
3635
1. [Probot settings][16]: set up Issue labels & Pull Request rules
3736
2. [PR badge][17]: set up Online [VS Code][18] editor entries in Pull Request description
3837

eslint.config.mjs renamed to eslint.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ export default tsEslint.config(
1919
plugins: {
2020
'@typescript-eslint': tsEslint.plugin,
2121
// - https://github.com/jsx-eslint/eslint-plugin-react/issues/3838#issuecomment-2395472758
22-
react: /** @type {import('eslint').ESLint.Plugin} */ (react),
22+
react: /** @type {import('eslint').ESLint.Plugin} */ react,
2323
'simple-import-sort': simpleImportSortPlugin,
2424
'@cspell': cspellPlugin
2525
}

package.json

Lines changed: 61 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -5,76 +5,83 @@
55
"author": "[email protected]",
66
"dependencies": {
77
"@editorjs/code": "^2.9.3",
8-
"@editorjs/editorjs": "^2.30.7",
8+
"@editorjs/editorjs": "^2.31.0",
99
"@editorjs/header": "^2.8.8",
10-
"@editorjs/image": "^2.10.1",
10+
"@editorjs/image": "^2.10.3",
1111
"@editorjs/link": "^2.6.2",
12-
"@editorjs/list": "^2.0.2",
13-
"@editorjs/paragraph": "^2.11.6",
14-
"@editorjs/quote": "^2.7.4",
15-
"browser-fs-access": "^0.35.0",
12+
"@editorjs/list": "^2.0.8",
13+
"@editorjs/paragraph": "^2.11.7",
14+
"@editorjs/quote": "^2.7.6",
15+
"browser-fs-access": "^0.38.0",
1616
"browser-unhandled-rejection": "^1.0.2",
1717
"echarts-jsx": "^1.2.1",
18-
"editorjs-html": "^3.4.3",
19-
"idea-react": "^2.0.0-rc.8",
20-
"koajax": "^3.0.3",
18+
"editorjs-html": "^4.0.5",
19+
"idea-react": "^2.0.0-rc.13",
20+
"koajax": "^3.1.2",
2121
"lodash": "^4.17.21",
22-
"mobx": "^6.13.5",
23-
"mobx-downloader": "^0.3.0",
24-
"mobx-github": "^0.3.5",
25-
"mobx-i18n": "^0.6.0",
26-
"mobx-react": "^9.1.1",
27-
"mobx-restful": "^2.0.0",
28-
"mobx-restful-table": "^2.0.0",
29-
"react": "^18.3.1",
30-
"react-bootstrap": "^2.10.6",
31-
"react-bootstrap-editor": "^2.0.4",
32-
"react-dom": "^18.3.1",
22+
"mobx": "^6.13.7",
23+
"mobx-downloader": "^0.3.1",
24+
"mobx-github": "^0.5.1",
25+
"mobx-i18n": "^0.7.2",
26+
"mobx-react": "^9.2.0",
27+
"mobx-restful": "^2.1.0",
28+
"mobx-restful-table": "^2.5.4",
29+
"react": "^19.1.1",
30+
"react-bootstrap": "^2.10.10",
31+
"react-bootstrap-editor": "^2.1.1",
32+
"react-dom": "^19.1.1",
3333
"react-editor-js": "^2.1.0",
34-
"react-router-class-tools": "^0.1.3",
35-
"react-router-dom": "^6.28.0",
36-
"web-utility": "^4.4.2"
34+
"react-router-class-tools": "^0.2.1",
35+
"react-router-dom": "^7.9.1",
36+
"web-utility": "^4.6.0"
3737
},
3838
"devDependencies": {
39-
"@babel/runtime": "^7.26.0",
40-
"@cspell/eslint-plugin": "^8.16.1",
41-
"@eslint/compat": "^1.2.3",
42-
"@eslint/js": "^9.15.0",
43-
"@parcel/config-default": "~2.13.2",
44-
"@parcel/packager-raw-url": "~2.13.2",
45-
"@parcel/transformer-less": "~2.13.2",
46-
"@parcel/transformer-typescript-tsc": "~2.13.2",
47-
"@parcel/transformer-webmanifest": "~2.13.2",
39+
"@babel/runtime": "^7.28.4",
40+
"@cspell/eslint-plugin": "^9.2.1",
41+
"@eslint/compat": "^1.3.2",
42+
"@eslint/js": "^9.35.0",
43+
"@parcel/config-default": "~2.15.4",
44+
"@parcel/packager-raw-url": "~2.15.4",
45+
"@parcel/transformer-less": "~2.15.4",
46+
"@parcel/transformer-typescript-tsc": "~2.15.4",
47+
"@parcel/transformer-webmanifest": "~2.15.4",
4848
"@softonus/prettier-plugin-duplicate-remover": "^1.1.2",
4949
"@types/eslint-config-prettier": "^6.11.3",
50-
"@types/eslint__eslintrc": "^2.1.2",
51-
"@types/eslint__js": "^8.42.3",
52-
"@types/lodash": "^4.17.13",
53-
"@types/node": "^20.17.9",
54-
"@types/react": "^18.3.12",
55-
"@types/react-dom": "^18.3.1",
56-
"@typescript-eslint/eslint-plugin": "^8.16.00",
57-
"@typescript-eslint/parser": "^8.16.0",
50+
"@types/lodash": "^4.17.20",
51+
"@types/node": "^22.18.3",
52+
"@types/react": "^19.1.13",
53+
"@types/react-dom": "^19.1.9",
54+
"@typescript-eslint/eslint-plugin": "^8.43.0",
55+
"@typescript-eslint/parser": "^8.43.0",
5856
"buffer": "^6.0.3",
59-
"eslint": "^9.15.0",
60-
"eslint-config-prettier": "^9.1.0",
61-
"eslint-plugin-react": "^7.37.2",
57+
"eslint": "^9.35.0",
58+
"eslint-config-prettier": "^10.1.8",
59+
"eslint-plugin-react": "^7.37.5",
6260
"eslint-plugin-simple-import-sort": "^12.1.1",
6361
"eslint-plugin-spellcheck": "^0.0.20",
64-
"globals": "^15.12.0",
62+
"globals": "^16.4.0",
6563
"husky": "^9.1.7",
66-
"lint-staged": "^15.2.10",
67-
"parcel": "~2.13.2",
64+
"jiti": "^2.5.1",
65+
"lint-staged": "^16.1.6",
66+
"parcel": "~2.15.4",
6867
"parcel-transformer-mdx": "^0.4.2",
69-
"postcss": "^8.4.49",
70-
"prettier": "^3.4.1",
68+
"postcss": "^8.5.6",
69+
"prettier": "^3.6.2",
7170
"prettier-plugin-css-order": "2.1.2",
72-
"prismjs": "^1.29.0",
71+
"prismjs": "^1.30.0",
7372
"process": "^0.11.10",
74-
"typescript": "~5.7.2",
75-
"typescript-eslint": "^8.16.0",
73+
"typescript": "~5.9.2",
74+
"typescript-eslint": "^8.43.0",
7675
"workbox-cli": "^7.3.0"
7776
},
77+
"pnpm": {
78+
"onlyBuiltDependencies": [
79+
"@parcel/watcher",
80+
"@swc/core",
81+
"lmdb",
82+
"msgpackr-extract"
83+
]
84+
},
7885
"prettier": {
7986
"singleQuote": true,
8087
"trailingComma": "none",
@@ -90,6 +97,9 @@
9097
"*.{js,mjs,ts,tsx}": "eslint --fix"
9198
},
9299
"browserslist": "> 0.5%, last 2 versions, not dead, IE 11",
100+
"@parcel/resolver-default": {
101+
"packageExports": true
102+
},
93103
"scripts": {
94104
"prepare": "husky",
95105
"test": "lint-staged",

0 commit comments

Comments
 (0)