Skip to content

Commit b262678

Browse files
committed
chore: use pnpm
1 parent ebc2f76 commit b262678

File tree

10 files changed

+9849
-8006
lines changed

10 files changed

+9849
-8006
lines changed

.github/workflows/build.yml

Lines changed: 36 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
name: CI
32

43
on:
@@ -17,44 +16,50 @@ jobs:
1716
if: "!startsWith(github.head_ref, 'renovate/')"
1817

1918
steps:
20-
- name: Checkout
21-
uses: actions/checkout@v4
19+
- name: Checkout
20+
uses: actions/checkout@v4
2221

23-
- name: Setup Node.js
24-
uses: actions/setup-node@v4
25-
with:
26-
node-version: 'lts/*'
27-
cache: 'yarn'
22+
- name: Install pnpm
23+
uses: pnpm/action-setup@v2
2824

29-
- name: Install dependencies
30-
run: yarn install --frozen-lockfile --non-interactive
25+
- name: Setup Node.js
26+
uses: actions/setup-node@v4
27+
with:
28+
node-version: 'lts/*'
29+
cache: 'pnpm'
30+
31+
- name: Install dependencies
32+
run: pnpm install --frozen-lockfile
3133

32-
- name: Unit tests
33-
run: yarn test --ci --coverage
34+
- name: Unit tests
35+
run: pnpm test -- --coverage
3436

35-
- name: Upload coverage to Codecov
36-
uses: codecov/codecov-action@v4
37+
- name: Upload coverage to Codecov
38+
uses: codecov/codecov-action@v4
3739

3840
lint:
3941
name: Lint
4042
runs-on: ubuntu-latest
4143
if: "!startsWith(github.head_ref, 'renovate/')"
4244

4345
steps:
44-
- name: Checkout
45-
uses: actions/checkout@v4
46+
- name: Checkout
47+
uses: actions/checkout@v4
4648

47-
- name: Setup Node.js
48-
uses: actions/setup-node@v4
49-
with:
50-
node-version: 'lts/*'
51-
cache: 'yarn'
49+
- name: Install pnpm
50+
uses: pnpm/action-setup@v2
5251

53-
- name: Install dependencies
54-
run: yarn install --frozen-lockfile --non-interactive
52+
- name: Setup Node.js
53+
uses: actions/setup-node@v4
54+
with:
55+
node-version: 'lts/*'
56+
cache: 'pnpm'
57+
58+
- name: Install dependencies
59+
run: pnpm install --frozen-lockfile
5560

56-
- name: Lint
57-
run: yarn lint
61+
- name: Lint
62+
run: pnpm lint
5863

5964
release:
6065
needs: [tests, lint]
@@ -73,17 +78,20 @@ jobs:
7378
with:
7479
fetch-depth: 0
7580

81+
- name: Install pnpm
82+
uses: pnpm/action-setup@v2
83+
7684
- name: Setup Node.js
7785
uses: actions/setup-node@v4
7886
with:
7987
node-version: 'lts/*'
80-
cache: 'yarn'
88+
cache: 'pnpm'
8189

8290
- name: Install dependencies
83-
run: yarn install --frozen-lockfile --non-interactive
91+
run: pnpm install --frozen-lockfile
8492

8593
- name: Release
86-
run: npx semantic-release --branches main
94+
run: pnpm dlx semantic-release --branches main
8795
env:
8896
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
8997
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

.github/workflows/pkg-size-report.yml

Lines changed: 23 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: Package size report
22

33
on:
44
pull_request:
5-
branches: [ main, next ]
5+
branches: [main, next]
66

77
permissions:
88
pull-requests: write
@@ -13,22 +13,25 @@ jobs:
1313
runs-on: ubuntu-latest
1414

1515
steps:
16-
- name: Checkout
17-
uses: actions/checkout@v4
18-
19-
- name: Setup Node.js
20-
uses: actions/setup-node@v4
21-
with:
22-
node-version: 'lts/*'
23-
cache: 'yarn'
24-
25-
- name: Install dependencies
26-
run: yarn install --frozen-lockfile --non-interactive
27-
28-
- name: Package size report
29-
uses: pkg-size/action@v1
30-
env:
31-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
32-
with:
33-
hide-files: '*.{js,css}.map'
34-
display-size: uncompressed, gzip
16+
- name: Checkout
17+
uses: actions/checkout@v4
18+
19+
- name: Install pnpm
20+
uses: pnpm/action-setup@v2
21+
22+
- name: Setup Node.js
23+
uses: actions/setup-node@v4
24+
with:
25+
node-version: 'lts/*'
26+
cache: 'pnpm'
27+
28+
- name: Install dependencies
29+
run: pnpm install --frozen-lockfile
30+
31+
- name: Package size report
32+
uses: pkg-size/action@v1
33+
env:
34+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
35+
with:
36+
hide-files: '*.{js,css}.map'
37+
display-size: uncompressed, gzip

.github/workflows/website.yml

Lines changed: 20 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
name: Website
32

43
on:
@@ -17,20 +16,23 @@ jobs:
1716
runs-on: ubuntu-latest
1817

1918
steps:
20-
- name: Checkout
21-
uses: actions/checkout@v4
19+
- name: Checkout
20+
uses: actions/checkout@v4
2221

23-
- name: Setup Node.js
24-
uses: actions/setup-node@v4
25-
with:
26-
node-version: 'lts/*'
27-
cache: 'yarn'
22+
- name: Install pnpm
23+
uses: pnpm/action-setup@v2
24+
25+
- name: Setup Node.js
26+
uses: actions/setup-node@v4
27+
with:
28+
node-version: 'lts/*'
29+
cache: 'pnpm'
2830

29-
- name: Install dependencies
30-
run: yarn install --frozen-lockfile --non-interactive
31+
- name: Install dependencies
32+
run: pnpm install --frozen-lockfile
3133

32-
- name: Build website
33-
run: yarn website
34+
- name: Build website
35+
run: pnpm website
3436

3537
deploy:
3638
name: Deploy
@@ -42,17 +44,20 @@ jobs:
4244
- name: Checkout
4345
uses: actions/checkout@v4
4446

47+
- name: Install pnpm
48+
uses: pnpm/action-setup@v2
49+
4550
- name: Setup Node.js
4651
uses: actions/setup-node@v4
4752
with:
4853
node-version: 'lts/*'
49-
cache: 'yarn'
54+
cache: 'pnpm'
5055

5156
- name: Install dependencies
52-
run: yarn install --frozen-lockfile --non-interactive
57+
run: pnpm install --frozen-lockfile
5358

5459
- name: Build
55-
run: yarn website
60+
run: pnpm website
5661

5762
- name: Deploy
5863
uses: JamesIves/github-pages-deploy-action@v4

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,3 @@ node_modules/
55
npm-debug.log
66
lib/
77
esm/
8-
yarn-error.log

.gitpod.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11

22
tasks:
3-
- init: yarn install && yarn run build
3+
- init: pnpm install && pnpm run build
44

55
vscode:
66
extensions:

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,15 @@
1414
"format": "eslint src --fix --report-unused-disable-directives",
1515
"lint": "eslint src --report-unused-disable-directives",
1616
"prebump": "run-s lint test",
17-
"prepublishOnly": "yarn run build",
17+
"prepublishOnly": "pnpm run build",
1818
"test": "cross-env BABEL_OUTPUT=commonjs jest",
1919
"start": "webpack serve",
2020
"website": "run-s website:clean website:build website:redirect",
2121
"website:clean": "rimraf examples/dist",
2222
"website:build": "cross-env BABEL_TARGET=examples NODE_ENV=production webpack",
2323
"website:redirect": "cp -R examples/src/example examples/dist"
2424
},
25+
"packageManager": "[email protected]",
2526
"repository": {
2627
"type": "git",
2728
"url": "https://github.com/reactjs/react-tabs.git"

0 commit comments

Comments
 (0)