Skip to content

Commit 209324b

Browse files
authored
[migrate] upgrade to Cell-Router 4, MobX-GitHub 0.5, Node.js 22, PNPM 10, Lint-Staged 16 & other latest Upstream packages (#12)
1 parent a657d98 commit 209324b

File tree

30 files changed

+3100
-2994
lines changed

30 files changed

+3100
-2994
lines changed

.github/workflows/main.yml

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,25 @@ name: CI & CD
22
on:
33
push:
44
branches:
5-
- main
5+
- '**'
66
jobs:
77
Build-and-Deploy:
8+
env:
9+
VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }}
10+
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
11+
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}
812
runs-on: ubuntu-latest
13+
permissions:
14+
contents: write
915
steps:
1016
- uses: actions/checkout@v4
1117

1218
- uses: pnpm/action-setup@v4
1319
with:
14-
version: 9
20+
version: 10
1521
- uses: actions/setup-node@v4
1622
with:
17-
node-version: 20
23+
node-version: 22
1824
cache: pnpm
1925
- name: Install & Build
2026
run: |
@@ -23,6 +29,7 @@ jobs:
2329
2430
- name: Deploy to GitHub pages
2531
uses: peaceiris/actions-gh-pages@v4
32+
if: github.ref == 'refs/heads/main'
2633
with:
2734
publish_dir: ./dist
2835
cname: bootstrap.web-cell.dev
@@ -31,10 +38,11 @@ jobs:
3138

3239
- name: Deploy to Vercel
3340
uses: amondnet/vercel-action@v25
41+
if: ${{ env.VERCEL_TOKEN && env.VERCEL_ORG_ID && env.VERCEL_PROJECT_ID }}
3442
with:
3543
vercel-token: ${{ secrets.VERCEL_TOKEN }}
3644
github-token: ${{ secrets.GITHUB_TOKEN }}
3745
vercel-org-id: ${{ secrets.VERCEL_ORG_ID }}
3846
vercel-project-id: ${{ secrets.VERCEL_PROJECT_ID }}
3947
working-directory: ./dist
40-
vercel-args: --prod
48+
vercel-args: ${{ github.ref == 'refs/heads/main' && '--prod' || '' }}

.github/workflows/push.yml

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

create-index.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ console.time(title);
3030
sourceCode.push(`{
3131
path: '${path.replace(MDXPattern, '')}',
3232
${meta},
33-
component: lazy(loadMDX(() => import('./${path}')))
33+
component: loadMDX(() => import('./${path}'))
3434
}`);
3535
}
3636

@@ -39,8 +39,6 @@ console.time(title);
3939
`// This file is created by "${title}" script,
4040
// please don't edit it manually!
4141
42-
import { lazy } from 'web-cell';
43-
4442
import { loadMDX } from '../utility';
4543
4644
export default [

document/source/components/Form/HTMLEditor.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ render(
3939
new Promise(resolve =>
4040
setTimeout(
4141
() =>
42-
resolve('https://web-cell.dev/WebCell-1.fb612fdb.png'),
42+
resolve('https://web-cell.dev/WebCell-0.a6336415.png'),
4343
1000
4444
)
4545
)
@@ -60,7 +60,7 @@ render(
6060
new Promise(resolve =>
6161
setTimeout(
6262
() =>
63-
resolve('https://web-cell.dev/WebCell-1.fb612fdb.png'),
63+
resolve('https://web-cell.dev/WebCell-0.a6336415.png'),
6464
1000
6565
)
6666
)

document/source/components/Form/MarkdownEditor.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ You can **paste** or **drop** images into the editor, and **upload** them on `<f
3030
<FileUploader
3131
transport={() => ({
3232
path: Promise.resolve(
33-
'https://web-cell.dev/WebCell-1.fb612fdb.png'
33+
'https://web-cell.dev/WebCell-0.a6336415.png'
3434
)
3535
})}
3636
>
@@ -58,7 +58,7 @@ render(
5858
<FileUploader
5959
transport={() => ({
6060
path: Promise.resolve(
61-
'https://web-cell.dev/WebCell-1.fb612fdb.png'
61+
'https://web-cell.dev/WebCell-0.a6336415.png'
6262
)
6363
})}
6464
>

document/source/components/Media/Image.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ In addition to our [border-radius utilities][1], you can use `thumbnail` propert
4141
<Example>
4242
<Image
4343
thumbnail
44-
src="https://web-cell.dev/WebCell-0.f1ffd28b.png"
44+
src="https://web-cell.dev/WebCell-0.a6336415.png"
4545
alt="Thumbnail image"
4646
/>
4747
</Example>
@@ -53,7 +53,7 @@ import { Image } from 'boot-cell/source/Media/Image';
5353
render(
5454
<Image
5555
thumbnail
56-
src="https://web-cell.dev/WebCell-0.f1ffd28b.png"
56+
src="https://web-cell.dev/WebCell-0.a6336415.png"
5757
alt="Thumbnail image"
5858
/>
5959
);

document/source/components/Navigator/NavBar.mdx

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,10 @@ import { Example } from '../../../../source/component/Example';
2222

2323
Here’s what you need to know before getting started with the navbar:
2424

25-
- Navbars and their contents are fluid by default.
26-
- Use our [spacing][1] and [flex][2] utility classes for controlling spacing and alignment within navbars.
27-
- Navbars are responsive by default, but you can easily modify them to change that.
28-
- Navbars are hidden by default when printing. Force them to be printed by adding `.d-print` to the `<NavBar />`. See the [display][3] utility class.
25+
- Navbars and their contents are fluid by default.
26+
- Use our [spacing][1] and [flex][2] utility classes for controlling spacing and alignment within navbars.
27+
- Navbars are responsive by default, but you can easily modify them to change that.
28+
- Navbars are hidden by default when printing. Force them to be printed by adding `.d-print` to the `<NavBar />`. See the [display][3] utility class.
2929

3030
In addition, `<NavBar />` uses [`ResizeObserver`][4] to detect **Viewport resizing**, so a polyfill may be required:
3131

@@ -42,8 +42,8 @@ Read on for an example and list of supported sub-components.
4242

4343
Navbars come with built-in support for a handful of sub-components. Choose from the following as needed:
4444

45-
- `<Form inline />` for any form controls and actions.
46-
- `.navbar-text` for adding vertically centered strings of text.
45+
- `<Form inline />` for any form controls and actions.
46+
- `.navbar-text` for adding vertically centered strings of text.
4747

4848
Here’s an example of all the sub-components included in a responsive light-themed navbar
4949
that automatically collapses at the `lg` (large) breakpoint.
@@ -160,7 +160,7 @@ Here are some examples to demonstrate.
160160
brand={
161161
<Image
162162
style={{ width: '30px', height: '30px' }}
163-
src="https://web-cell.dev/WebCell-0.f1ffd28b.png"
163+
src="https://web-cell.dev/WebCell-0.a6336415.png"
164164
/>
165165
}
166166
/>
@@ -171,7 +171,7 @@ Here are some examples to demonstrate.
171171
<Image
172172
className="d-inline-block align-top"
173173
style={{ width: '30px', height: '30px' }}
174-
src="https://web-cell.dev/WebCell-0.f1ffd28b.png"
174+
src="https://web-cell.dev/WebCell-0.a6336415.png"
175175
/>
176176
BootCell
177177
</>
@@ -189,15 +189,15 @@ render(
189189
<NavBar brand={
190190
<Image
191191
style={{ width: '30px', height: '30px' }}
192-
src="https://web-cell.dev/WebCell-0.f1ffd28b.png"
192+
src="https://web-cell.dev/WebCell-0.a6336415.png"
193193
/>
194194
} />
195195
<NavBar brand={
196196
<>
197197
<Image
198198
className="d-inline-block align-top"
199199
style={{ width: '30px', height: '30px' }}
200-
src="https://web-cell.dev/WebCell-0.f1ffd28b.png"
200+
src="https://web-cell.dev/WebCell-0.a6336415.png"
201201
/>
202202
BootCell
203203
</>

package.json

Lines changed: 30 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -6,38 +6,47 @@
66
"node": ">=20"
77
},
88
"dependencies": {
9-
"boot-cell": "^2.0.0-beta.29",
10-
"cell-router": "^3.0.1",
9+
"boot-cell": "^2.0.0-rc.19",
10+
"cell-router": "^4.0.4",
1111
"classnames": "^2.5.1",
12-
"dom-renderer": "^2.6.0",
12+
"dom-renderer": "^2.6.2",
1313
"github-web-widget": "^4.0.0",
1414
"iterable-observer": "^1.1.0",
15-
"mobx": "^6.13.5",
16-
"mobx-github": "^0.3.5",
17-
"web-cell": "^3.0.3",
18-
"web-utility": "^4.4.2"
15+
"mobx": "^6.15.0",
16+
"mobx-github": "^0.5.1",
17+
"web-cell": "^3.2.2",
18+
"web-utility": "^4.6.1"
1919
},
2020
"devDependencies": {
21-
"@parcel/config-default": "~2.13.0",
22-
"@parcel/packager-raw-url": "~2.13.0",
23-
"@parcel/transformer-less": "~2.13.0",
24-
"@parcel/transformer-typescript-tsc": "~2.13.0",
25-
"@parcel/transformer-webmanifest": "~2.13.0",
21+
"@parcel/config-default": "~2.16.0",
22+
"@parcel/packager-raw-url": "~2.16.0",
23+
"@parcel/transformer-less": "~2.16.0",
24+
"@parcel/transformer-typescript-tsc": "~2.16.0",
25+
"@parcel/transformer-webmanifest": "~2.16.0",
2626
"@types/mdx": "^2.0.13",
27-
"@types/node": "^20.17.6",
28-
"fs-match": "^1.7.2",
27+
"@types/node": "^22.18.6",
28+
"fs-match": "^1.7.3",
2929
"husky": "^9.1.7",
30-
"lint-staged": "^15.2.10",
31-
"parcel": "~2.13.0",
30+
"lint-staged": "^16.2.1",
31+
"parcel": "~2.16.0",
3232
"parcel-transformer-mdx": "^0.4.2",
33-
"postcss": "^8.4.49",
33+
"postcss": "^8.5.6",
3434
"postcss-modules": "^6.0.1",
35-
"prettier": "^3.3.3",
35+
"prettier": "^3.6.2",
3636
"svgo": "^3.3.2",
37-
"tsx": "^4.19.2",
38-
"typescript": "~5.6.3",
37+
"tsx": "^4.20.6",
38+
"typescript": "~5.9.2",
3939
"workbox-cli": "^7.3.0",
40-
"yaml": "^2.6.1"
40+
"yaml": "^2.8.1"
41+
},
42+
"pnpm": {
43+
"onlyBuiltDependencies": [
44+
"@parcel/watcher",
45+
"@swc/core",
46+
"esbuild",
47+
"lmdb",
48+
"msgpackr-extract"
49+
]
4150
},
4251
"prettier": {
4352
"singleQuote": true,

0 commit comments

Comments
 (0)