Skip to content

Commit f9e1925

Browse files
authored
refactor: replace yarn with pnpm (#3571)
* refactor: replace yarn with pnpm * chore: install pnpm * chore: disable cache * ignore pnpm-lock.yaml * resolve deps * setup pnpm
1 parent 53a5194 commit f9e1925

39 files changed

+12224
-15235
lines changed

β€Ž.eslintignoreβ€Ž

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@ node_modules
22
dist
33
packages/*/es
44
packages/*/lib
5+
pnpm-lock.yaml

β€Ž.github/workflows/master-deploy.ymlβ€Ž

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -17,30 +17,32 @@ jobs:
1717
with:
1818
node-version: '16'
1919

20-
- name: Install dependencies
21-
run: yarn bootstrap
20+
- name: Setup pnpm
21+
uses: pnpm/action-setup@v2
22+
with:
23+
version: 6.15.1
2224

23-
- name: Init docs
24-
run: cd docs && yarn
25+
- name: Install dependencies
26+
run: pnpm bootstrap
2527

2628
- name: Fetch Crowdin token for pulling languages
27-
run: yarn docs:crowdin
29+
run: pnpm docs:crowdin
2830
env:
2931
CROWDIN_TOKEN: ${{secrets.CROWDIN_TOKEN}}
3032

3133
- name: Pull Crowdin translations
32-
run: cd docs && yarn crowdin download
34+
run: cd docs && pnpx crowdin download
3335

3436
- name: Generate common locale
35-
run: yarn docs:gen-locale
37+
run: pnpm docs:gen-locale
3638

3739
- name: Build website
38-
run: yarn docs:build
40+
run: pnpm docs:build
3941
env:
4042
DOC_ENV: production
4143

4244
# - name: Build Indices
43-
# run: yarn build:indices
45+
# run: pnpm build:indices
4446
# env:
4547
# ALGOLIA_KEY: ${{secrets.ALGOLIA_KEY}}
4648

β€Ž.github/workflows/preview-build.ymlβ€Ž

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,20 +18,22 @@ jobs:
1818
node-version: '16'
1919
registry-url: https://registry.npmjs.com/
2020

21-
- name: Install dependencies
22-
run: yarn bootstrap
21+
- name: Setup pnpm
22+
uses: pnpm/action-setup@v2
23+
with:
24+
version: 6.15.1
2325

24-
- name: Init docs
25-
run: cd docs && yarn
26+
- name: Install dependencies
27+
run: pnpm bootstrap
2628

2729
- name: Generate common locale
28-
run: yarn docs:gen-locale
30+
run: pnpm docs:gen-locale
2931

3032
- name: Build Element Plus
3133
run: sh scripts/build.sh
3234

3335
- name: Build website
34-
run: yarn docs:build
36+
run: pnpm docs:build
3537
env:
3638
DOC_ENV: preview
3739

β€Ž.github/workflows/publish-npm.ymlβ€Ž

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,16 @@ jobs:
1313
uses: actions/setup-node@v2
1414
with:
1515
node-version: '14'
16+
- name: Setup pnpm
17+
uses: pnpm/action-setup@v2
18+
with:
19+
version: 6.15.1
1620
- name: Install dependencies
17-
run: yarn bootstrap
21+
run: pnpm bootstrap
1822
- name: Lint
19-
run: yarn lint
23+
run: pnpm lint
2024
- name: Test
21-
run: yarn test
25+
run: pnpm test
2226

2327
publish:
2428
needs: test
@@ -29,12 +33,16 @@ jobs:
2933
with:
3034
node-version: '14'
3135
registry-url: https://registry.npmjs.com/
36+
- name: Setup pnpm
37+
uses: pnpm/action-setup@v2
38+
with:
39+
version: 6.15.1
3240
- name: Get version
3341
run: echo "TAG_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
3442
- name: Get git head
3543
run: echo "GIT_HEAD=${GITHUB_SHA}" >> $GITHUB_ENV
3644
- name: Gen npmrc
37-
run: echo "//registry.npmjs.com/:_authToken=${{ secrets.NPM_PUBLISH_TOKEN }}" > ./.npmrc
45+
run: echo "//registry.npmjs.com/:_authToken=${{ secrets.NPM_PUBLISH_TOKEN }}" >> ./.npmrc
3846
- name: Build&publish
3947
run: sh ./scripts/publish.sh
4048
env:

β€Ž.github/workflows/staging-preview.ymlβ€Ž

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,31 +19,33 @@ jobs:
1919
with:
2020
node-version: '16'
2121

22+
- name: Setup pnpm
23+
uses: pnpm/action-setup@v2
24+
with:
25+
version: 6.15.1
26+
2227
- name: Install dependencies
23-
run: yarn bootstrap
28+
run: pnpm bootstrap
2429

2530
- name: Compile Element Plus
2631
run: sh scripts/build.sh
2732

28-
- name: Init docs
29-
run: cd docs && yarn
30-
3133
- name: Init Crowdin token
32-
run: yarn docs:crowdin
34+
run: pnpm docs:crowdin
3335
env:
3436
CROWDIN_TOKEN: ${{secrets.CROWDIN_TOKEN}}
3537

3638
- name: Upload source files
37-
run: cd docs && yarn crowdin upload sources
39+
run: cd docs && pnpx crowdin upload sources
3840

3941
- name: Pull Crowdin translations
40-
run: cd docs && yarn crowdin download
42+
run: cd docs && pnpx crowdin download
4143

4244
- name: Generate common locale
43-
run: yarn docs:gen-locale
45+
run: pnpm docs:gen-locale
4446

4547
- name: Build website
46-
run: yarn docs:build
48+
run: pnpm docs:build
4749
env:
4850
DOC_ENV: staging
4951

β€Ž.github/workflows/unit-test.ymlβ€Ž

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,18 @@ jobs:
1616
node-name: 'Latest'
1717
steps:
1818
- uses: actions/checkout@v2
19+
- name: Setup pnpm
20+
uses: pnpm/action-setup@v2
21+
with:
22+
version: 6.15.1
1923
- name: Setup node
2024
uses: actions/setup-node@v2
2125
with:
2226
node-version: ${{ matrix.node-version }}
23-
cache: 'yarn'
27+
cache: 'pnpm'
2428
- name: Install dependencies
25-
run: yarn bootstrap
29+
run: pnpm bootstrap
2630
- name: Lint
27-
run: yarn lint
31+
run: pnpm lint
2832
- name: Test
29-
run: yarn test
33+
run: pnpm test

β€Ž.gitignoreβ€Ž

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,7 @@
33

44
# Package Manager
55
node_modules
6-
lerna-debug.json
7-
lerna-debug.log
8-
yarn-debug.log*
9-
yarn-error.log*
6+
.pnpm-debug.log*
107

118
# System
129
.DS_Store

β€Ž.npmrcβ€Ž

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
shamefully-hoist = true

β€Ž.nvmrcβ€Ž

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
v16

β€Ž.prettierignoreβ€Ž

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@ node_modules
33
packages/*/es
44
packages/*/lib
55
coverage
6+
pnpm-lock.yaml

0 commit comments

Comments
Β (0)