Skip to content

Commit 3a46b99

Browse files
committed
fix(ci): update tsnode for node18 limit
1 parent 3da153f commit 3a46b99

File tree

10 files changed

+7153
-6477
lines changed

10 files changed

+7153
-6477
lines changed

.github/workflows/deploy-github.yml

Lines changed: 20 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -19,23 +19,32 @@ jobs:
1919
with:
2020
ref: ${{ github.head_ref }}
2121

22+
- name: Setup Node 20
23+
uses: actions/setup-node@v4
24+
with:
25+
node-version: 20
26+
- name: Setup pnpm
27+
uses: pnpm/action-setup@v3
28+
with:
29+
version: 8
30+
run_install: |
31+
- recursive: true
32+
args: [--frozen-lockfile, --strict-peer-dependencies]
33+
34+
- name: Get pnpm store directory
35+
shell: bash
36+
run: |
37+
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
38+
2239
- name: Cache pnpm modules and build
2340
uses: actions/cache@v3
2441
with:
2542
path: |
26-
node_modules
43+
${{ env.STORE_PATH }}
2744
build/taro-docs
28-
key: ${{ runner.os }}-github
45+
key: ${{ runner.os }}-pnpm-store-github
2946
restore-keys: |
30-
${{ runner.os }}-
31-
32-
- name: install
33-
uses: pnpm/action-setup@v2
34-
with:
35-
version: 7
36-
run_install: |
37-
- recursive: true
38-
args: [--frozen-lockfile, --strict-peer-dependencies]
47+
${{ runner.os }}-pnpm-store-
3948
4049
- name: Build
4150
run: pnpm run build:github

.github/workflows/deploy-preview.yml

Lines changed: 20 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -15,23 +15,32 @@ jobs:
1515
with:
1616
ref : ${{ github.ref || github.head_ref || github.ref_name }}
1717

18+
- name: Setup Node 20
19+
uses: actions/setup-node@v4
20+
with:
21+
node-version: 20
22+
- name: Setup pnpm
23+
uses: pnpm/action-setup@v3
24+
with:
25+
version: 8
26+
run_install: |
27+
- recursive: true
28+
args: [--frozen-lockfile, --strict-peer-dependencies]
29+
30+
- name: Get pnpm store directory
31+
shell: bash
32+
run: |
33+
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
34+
1835
- name: Cache pnpm modules and build
1936
uses: actions/cache@v3
2037
with:
2138
path: |
22-
node_modules
39+
${{ env.STORE_PATH }}
2340
build/taro-docs
24-
key: ${{ runner.os }}-preview
41+
key: ${{ runner.os }}-pnpm-store-preview
2542
restore-keys: |
26-
${{ runner.os }}-
27-
28-
- name: install
29-
uses: pnpm/action-setup@v2
30-
with:
31-
version: 7
32-
run_install: |
33-
- recursive: true
34-
args: [--frozen-lockfile, --strict-peer-dependencies]
43+
${{ runner.os }}-pnpm-store-
3544
3645
- name: Build
3746
run: pnpm run build:zone

.github/workflows/deploy-tcb.yml

Lines changed: 20 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -19,23 +19,32 @@ jobs:
1919
with:
2020
ref: ${{ github.head_ref }}
2121

22+
- name: Setup Node 20
23+
uses: actions/setup-node@v4
24+
with:
25+
node-version: 20
26+
- name: Setup pnpm
27+
uses: pnpm/action-setup@v3
28+
with:
29+
version: 8
30+
run_install: |
31+
- recursive: true
32+
args: [--frozen-lockfile, --strict-peer-dependencies]
33+
34+
- name: Get pnpm store directory
35+
shell: bash
36+
run: |
37+
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
38+
2239
- name: Cache pnpm modules and build
2340
uses: actions/cache@v3
2441
with:
2542
path: |
26-
node_modules
43+
${{ env.STORE_PATH }}
2744
build/taro-docs
28-
key: ${{ runner.os }}-tcb
45+
key: ${{ runner.os }}-pnpm-store-tcb
2946
restore-keys: |
30-
${{ runner.os }}-
31-
32-
- name: install
33-
uses: pnpm/action-setup@v2
34-
with:
35-
version: 7
36-
run_install: |
37-
- recursive: true
38-
args: [--frozen-lockfile, --strict-peer-dependencies]
47+
${{ runner.os }}-pnpm-store-
3948
4049
- name: Build
4150
run: pnpm run build:zone

.github/workflows/nodejs.yml

Lines changed: 20 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -18,23 +18,32 @@ jobs:
1818
with:
1919
ref : ${{ github.ref || github.head_ref || github.ref_name }}
2020

21+
- name: Setup Node 20
22+
uses: actions/setup-node@v4
23+
with:
24+
node-version: 20
25+
- name: Setup pnpm
26+
uses: pnpm/action-setup@v3
27+
with:
28+
version: 8
29+
run_install: |
30+
- recursive: true
31+
args: [--frozen-lockfile, --strict-peer-dependencies]
32+
33+
- name: Get pnpm store directory
34+
shell: bash
35+
run: |
36+
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
37+
2138
- name: Cache pnpm modules and build
2239
uses: actions/cache@v3
2340
with:
2441
path: |
25-
node_modules
42+
${{ env.STORE_PATH }}
2643
build/taro-docs
27-
key: ${{ runner.os }}-github
44+
key: ${{ runner.os }}-pnpm-store-nodejs
2845
restore-keys: |
29-
${{ runner.os }}-
30-
31-
- name: install
32-
uses: pnpm/action-setup@v2
33-
with:
34-
version: 7
35-
run_install: |
36-
- recursive: true
37-
args: [--frozen-lockfile, --strict-peer-dependencies]
46+
${{ runner.os }}-pnpm-store-
3847
3948
- name: Build
4049
run: pnpm run build:github

.github/workflows/notion-update.yml

Lines changed: 21 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -16,22 +16,33 @@ jobs:
1616
- name: Checkout
1717
uses: actions/checkout@v4
1818

19-
- name: Cache pnpm modules and build
20-
uses: actions/cache@v3
19+
- name: Setup Node 20
20+
uses: actions/setup-node@v4
2121
with:
22-
path: ~/.pnpm-store
23-
key: ${{ runner.os }}-types
24-
restore-keys: |
25-
${{ runner.os }}-
26-
27-
- name: Installation Dependencies
28-
uses: pnpm/action-setup@v2
22+
node-version: 20
23+
- name: Setup pnpm
24+
uses: pnpm/action-setup@v3
2925
with:
30-
version: 7
26+
version: 8
3127
run_install: |
3228
- recursive: true
3329
args: [--frozen-lockfile, --strict-peer-dependencies]
3430
31+
- name: Get pnpm store directory
32+
shell: bash
33+
run: |
34+
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
35+
36+
- name: Cache pnpm modules and build
37+
uses: actions/cache@v3
38+
with:
39+
path: |
40+
${{ env.STORE_PATH }}
41+
build/taro-docs
42+
key: ${{ runner.os }}-pnpm-store-notion
43+
restore-keys: |
44+
${{ runner.os }}-pnpm-store-
45+
3546
- name: Fetch notion database
3647
run: |
3748
pnpm notion:update

.github/workflows/sync-components-types.yml

Lines changed: 21 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,22 +15,33 @@ jobs:
1515
- name: Checkout
1616
uses: actions/checkout@v4
1717

18-
- name: Cache pnpm modules and build
19-
uses: actions/cache@v3
18+
- name: Setup Node 20
19+
uses: actions/setup-node@v4
2020
with:
21-
path: ~/.pnpm-store
22-
key: ${{ runner.os }}-types
23-
restore-keys: |
24-
${{ runner.os }}-
25-
26-
- name: Installation Dependencies
27-
uses: pnpm/action-setup@v2
21+
node-version: 20
22+
- name: Setup pnpm
23+
uses: pnpm/action-setup@v3
2824
with:
29-
version: 7
25+
version: 8
3026
run_install: |
3127
- recursive: true
3228
args: [--frozen-lockfile, --strict-peer-dependencies]
3329
30+
- name: Get pnpm store directory
31+
shell: bash
32+
run: |
33+
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
34+
35+
- name: Cache pnpm modules and build
36+
uses: actions/cache@v3
37+
with:
38+
path: |
39+
${{ env.STORE_PATH }}
40+
build/taro-docs
41+
key: ${{ runner.os }}-pnpm-store-types
42+
restore-keys: |
43+
${{ runner.os }}-pnpm-store-
44+
3445
- name: Push changes
3546
id: auto-commit-action
3647
uses: stefanzweifel/git-auto-commit-action@v4

package.json

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"preinstall": "npx only-allow pnpm",
66
"prepare": "husky install",
77
"build": "npm run build:github",
8-
"build:docs-api": "ts-node --project ./scripts/tsconfig.json ./scripts/docs",
8+
"build:docs-api": "pnpm run tsx ./scripts/docs",
99
"build:github": "cross-env NODE_OPTIONS=--max-old-space-size=20480 BASE=taro docusaurus build --out-dir build/taro-docs",
1010
"build:independent": "cross-env NODE_OPTIONS=--max-old-space-size=20480 docusaurus build --out-dir dist",
1111
"build:zone": "cross-env NODE_OPTIONS=--max-old-space-size=20480 BASE=zone docusaurus build --out-dir dist",
@@ -15,13 +15,14 @@
1515
"docusaurus": "docusaurus",
1616
"lint": "eslint ./ --ext js,ts,tsx,md,mdx",
1717
"lint:style": "stylelint ./**/*.{css,scss}",
18-
"notion": "ts-node -r tsconfig-paths/register --project ./scripts/tsconfig.json --files ./scripts/notion/sync",
19-
"notion:update": "ts-node -r tsconfig-paths/register --project ./scripts/tsconfig.json --files ./scripts/notion/update",
18+
"notion": "pnpm run tsx --files ./scripts/notion/sync",
19+
"notion:update": "pnpm run tsx --files ./scripts/notion/update",
2020
"serve": "docusaurus serve",
2121
"start": "cross-env NODE_OPTIONS=--max-old-space-size=20480 BASE=taro docusaurus start",
2222
"start:en": "cross-env NODE_OPTIONS=--max-old-space-size=20480 BASE=taro docusaurus start --locale en",
2323
"swizzle": "docusaurus swizzle",
24-
"trans:en": "docusaurus write-translations --locale en"
24+
"trans:en": "docusaurus write-translations --locale en",
25+
"tsx": "ts-node --skipIgnore --project ./scripts/tsconfig.json"
2526
},
2627
"dependencies": {
2728
"@docusaurus/core": "^2.4.3",
@@ -36,17 +37,17 @@
3637
"miniapp-types": "^1.1.18",
3738
"prism-react-renderer": "^1.3.1",
3839
"react": "^17.0.2",
39-
"react-dom": "^17.0.2",
40-
"tsconfig-paths": "^3.14.1"
40+
"react-dom": "^17.0.2"
4141
},
4242
"devDependencies": {
4343
"@algolia/client-search": "^4.13.0",
4444
"@babel/core": "^7.19.1",
45-
"@commitlint/cli": "^16.3.0",
46-
"@commitlint/config-conventional": "^16.2.4",
45+
"@commitlint/cli": "^17.6.6",
46+
"@commitlint/config-conventional": "^17.6.6",
4747
"@tarojs/components": "latest",
4848
"@tarojs/runtime": "latest",
4949
"@tsconfig/docusaurus": "^1.0.5",
50+
"@tsconfig/node18": "^18.2.2",
5051
"@types/lodash": "^4.14.182",
5152
"@types/node": "^17.0.30",
5253
"@types/react": "^17.0.44",
@@ -84,8 +85,9 @@
8485
"stylelint-config-standard-scss": "^3.0.0",
8586
"stylelint-order": "^5.0.0",
8687
"swc-loader": "^0.1.16",
87-
"ts-node": "^10.7.0",
88-
"typescript": "^5.2.2",
88+
"ts-node": "^10.9.1",
89+
"tsconfig-paths": "^3.14.1",
90+
"typescript": "^5.3.3",
8991
"unique-commit-id": "^1.0.0",
9092
"vue": "^3.2.39",
9193
"webpack": "^5.88.2",

0 commit comments

Comments
 (0)