Skip to content

Commit 3e23428

Browse files
authored
ci: migrate from yarn to pnpm (#296)
1 parent 73992b5 commit 3e23428

File tree

19 files changed

+19256
-15570
lines changed

19 files changed

+19256
-15570
lines changed

Diff for: .changeset/few-poems-allow.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@cube-dev/ui-kit': patch
3+
---
4+
5+
@react-stately/selection added as a direct dependency

Diff for: .github/workflows/main.yml

+19-31
Original file line numberDiff line numberDiff line change
@@ -15,29 +15,25 @@ jobs:
1515
steps:
1616
- uses: actions/checkout@v2
1717

18+
- name: Install pnpm
19+
uses: pnpm/action-setup@v2
20+
with:
21+
version: 7
22+
1823
- name: Setup Node.js
1924
uses: actions/setup-node@v3
2025
with:
2126
node-version-file: '.nvmrc'
22-
23-
- uses: actions/cache@v2
24-
id: yarn-cache
25-
with:
26-
path: |
27-
**/node_modules
28-
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
29-
restore-keys: |
30-
${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
31-
${{ runner.os }}-yarn
27+
cache: 'pnpm'
3228

3329
- name: Install Dependencies
34-
run: yarn --frozen-lockfile
30+
run: pnpm install
3531

3632
- name: Create Release Pull Request or Publish to npm
3733
id: changesets
3834
uses: changesets/action@v1
3935
with:
40-
publish: yarn release
36+
publish: pnpm release
4137
commit: 'chore: release'
4238
env:
4339
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -58,15 +54,10 @@ jobs:
5854
with:
5955
fetch-depth: 0
6056

61-
- uses: actions/cache@v2
62-
id: yarn-cache
57+
- name: Install pnpm
58+
uses: pnpm/action-setup@v2
6359
with:
64-
path: |
65-
**/node_modules
66-
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
67-
restore-keys: |
68-
${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
69-
${{ runner.os }}-yarn
60+
version: 7
7061

7162
- uses: actions/cache@v2
7263
name: Download storybook cache
@@ -80,9 +71,10 @@ jobs:
8071
- uses: actions/setup-node@v3
8172
with:
8273
node-version-file: '.nvmrc'
74+
cache: 'pnpm'
8375

8476
- name: Install dependencies
85-
run: yarn --frozen-lockfile
77+
run: pnpm install
8678

8779
- name: Publish to Chromatic
8880
id: publish_chromatic
@@ -107,15 +99,10 @@ jobs:
10799
steps:
108100
- uses: actions/checkout@v2
109101

110-
- uses: actions/cache@v2
111-
id: yarn-cache
102+
- name: Install pnpm
103+
uses: pnpm/action-setup@v2
112104
with:
113-
path: |
114-
**/node_modules
115-
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
116-
restore-keys: |
117-
${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
118-
${{ runner.os }}-yarn
105+
version: 7
119106

120107
- uses: actions/cache@v2
121108
name: Download storybook cache
@@ -129,12 +116,13 @@ jobs:
129116
- uses: actions/setup-node@v3
130117
with:
131118
node-version-file: '.nvmrc'
119+
cache: 'pnpm'
132120

133121
- name: Install dependencies
134-
run: yarn --frozen-lockfile
122+
run: pnpm install
135123

136124
- name: Build Docs
137-
run: yarn build-docs --quiet
125+
run: pnpm build-docs --quiet
138126

139127
- name: Deploy docs to Netlify
140128
uses: South-Paw/[email protected]

Diff for: .github/workflows/pull-request.yml

+24-41
Original file line numberDiff line numberDiff line change
@@ -19,23 +19,18 @@ jobs:
1919
steps:
2020
- uses: actions/checkout@v3
2121

22-
- uses: actions/cache@v2
23-
name: Download yarn cache
24-
id: yarn-cache
22+
- name: Install pnpm
23+
uses: pnpm/action-setup@v2
2524
with:
26-
path: |
27-
**/node_modules
28-
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
29-
restore-keys: |
30-
${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
31-
${{ runner.os }}-yarn
25+
version: 7
3226

3327
- uses: actions/setup-node@v3
3428
with:
3529
node-version-file: '.nvmrc'
30+
cache: 'pnpm'
3631

3732
- name: Install dependencies
38-
run: yarn --frozen-lockfile
33+
run: pnpm install
3934

4035
- name: Set env
4136
run: echo "SHORT_SHA=$(git rev-parse --short "$GITHUB_SHA")" >> $GITHUB_ENV
@@ -44,7 +39,7 @@ jobs:
4439
run: npm version 0.0.0-canary-$SHORT_SHA --no-git-tag-version
4540

4641
- name: Build project
47-
run: yarn build
42+
run: pnpm build
4843

4944
- name: Publish canary
5045
id: publish
@@ -78,15 +73,10 @@ jobs:
7873
steps:
7974
- uses: actions/checkout@v2
8075

81-
- uses: actions/cache@v2
82-
id: yarn-cache
76+
- name: Install pnpm
77+
uses: pnpm/action-setup@v2
8378
with:
84-
path: |
85-
**/node_modules
86-
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
87-
restore-keys: |
88-
${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
89-
${{ runner.os }}-yarn
79+
version: 7
9080

9181
- uses: actions/cache@v2
9282
name: Download eslint cache
@@ -98,15 +88,16 @@ jobs:
9888
- uses: actions/setup-node@v3
9989
with:
10090
node-version-file: '.nvmrc'
91+
cache: 'pnpm'
10192

10293
- name: Install dependencies
103-
run: yarn --frozen-lockfile
94+
run: pnpm install
10495

10596
- name: Run the lint
106-
run: yarn lint
97+
run: pnpm lint
10798

10899
- name: Run the tests
109-
run: yarn test --no-cache
100+
run: pnpm test -- --no-cache
110101

111102
deploy-chromatic:
112103
name: 'Prepare Storybook for review & tests'
@@ -122,15 +113,10 @@ jobs:
122113
with:
123114
fetch-depth: 0
124115

125-
- uses: actions/cache@v2
126-
id: yarn-cache
116+
- name: Install pnpm
117+
uses: pnpm/action-setup@v2
127118
with:
128-
path: |
129-
**/node_modules
130-
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
131-
restore-keys: |
132-
${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
133-
${{ runner.os }}-yarn
119+
version: 7
134120

135121
- uses: actions/cache@v2
136122
name: Download storybook cache
@@ -144,9 +130,10 @@ jobs:
144130
- uses: actions/setup-node@v3
145131
with:
146132
node-version-file: '.nvmrc'
133+
cache: 'pnpm'
147134

148135
- name: Install dependencies
149-
run: yarn --frozen-lockfile
136+
run: pnpm install
150137

151138
- name: Publish to Chromatic
152139
id: publish_chromatic
@@ -187,15 +174,10 @@ jobs:
187174
steps:
188175
- uses: actions/checkout@v2
189176

190-
- uses: actions/cache@v2
191-
id: yarn-cache
177+
- name: Install pnpm
178+
uses: pnpm/action-setup@v2
192179
with:
193-
path: |
194-
**/node_modules
195-
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
196-
restore-keys: |
197-
${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
198-
${{ runner.os }}-yarn
180+
version: 7
199181

200182
- uses: actions/cache@v2
201183
name: Download storybook cache
@@ -209,12 +191,13 @@ jobs:
209191
- uses: actions/setup-node@v3
210192
with:
211193
node-version-file: '.nvmrc'
194+
cache: 'pnpm'
212195

213196
- name: Install dependencies
214-
run: yarn --frozen-lockfile
197+
run: pnpm install
215198

216199
- name: Build Docs
217-
run: yarn build-docs --quiet
200+
run: pnpm build-docs --quiet
218201

219202
- name: Deploy docs to Netlify
220203
id: publish_docs

Diff for: .github/workflows/size-limit.yml

+6-11
Original file line numberDiff line numberDiff line change
@@ -20,26 +20,21 @@ jobs:
2020
steps:
2121
- uses: actions/checkout@v3
2222

23-
- uses: actions/cache@v2
24-
name: Download yarn cache
25-
id: yarn-cache
23+
- name: Install pnpm
24+
uses: pnpm/action-setup@v2
2625
with:
27-
path: |
28-
**/node_modules
29-
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
30-
restore-keys: |
31-
${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
32-
${{ runner.os }}-yarn
26+
version: 7
3327

3428
- uses: actions/setup-node@v3
3529
with:
3630
node-version-file: '.nvmrc'
31+
cache: 'pnpm'
3732

3833
- name: Install dependencies
39-
run: yarn --frozen-lockfile
34+
run: pnpm install
4035

4136
- name: Build project
42-
run: yarn build
37+
run: pnpm build
4338

4439
- name: Download baseline stats
4540
uses: dawidd6/action-download-artifact@v2

Diff for: .husky/commit-msg

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
#!/bin/sh
22
. "$(dirname "$0")/_/husky.sh"
33

4-
yarn commitlint --edit $1
4+
pnpm commitlint --edit $1

Diff for: .husky/pre-commit

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
#!/bin/sh
22
. "$(dirname "$0")/_/husky.sh"
33

4-
yarn lint-staged
4+
pnpm lint-staged

Diff for: .lintstagedrc

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
"*.(js|ts|tsx|jsx)": ["yarn prettier --write", "yarn eslint --cache --fix", "yarn test --bail --findRelatedTests"],
2+
"*.(js|ts|tsx|jsx)": ["prettier --write", "eslint --cache --fix", "pnpm test -- --bail --findRelatedTests"]
33
}

Diff for: .yarnclean

-2
This file was deleted.

Diff for: CONTRIBUTING.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,9 @@ https://www.conventionalcommits.org/ or check out the
4444
commit type. `scope` is just a short id that describes the scope of work.
4545
2. Make and commit your changes following the
4646
[commit convention](https://github.com/cube-js/cube-ui-kit/blob/main/CONTRIBUTING.md#commit-convention).
47-
As you develop, you can run `yarn build` and
48-
`yarn test` to make sure everything works as expected.
49-
3. Run `yarn changeset` to create a detailed description of your changes. This
47+
As you develop, you can run `pnpm build` and
48+
`pnpm test` to make sure everything works as expected.
49+
3. Run `pnpm changeset` to create a detailed description of your changes. This
5050
will be used to generate a changelog when we publish an update.
5151
[Learn more about Changeset](https://github.com/atlassian/changesets/tree/master/packages/cli).
5252
> You can make it earlier after you have created a PR.
@@ -58,7 +58,7 @@ https://www.conventionalcommits.org/ or check out the
5858
` ```jsx live=false`
5959

6060
> If you made minor changes like CI config, prettier, etc, you can run
61-
> `yarn changeset add --empty` to generate an empty changeset file to document
61+
> `pnpm changeset add --empty` to generate an empty changeset file to document
6262
> your changes.
6363
6464
### Tests

Diff for: README.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -2,25 +2,25 @@
22

33
## Available Scripts
44

5-
### yarn start
5+
### pnpm start
66

77
Runs the test page in the development mode.
88
Open http://localhost:8080 to view it in the browser.
99

1010
The page will reload if you make edits.
1111
You will also see any lint errors in the console.
1212

13-
### yarn storybook
13+
### pnpm storybook
1414

1515
Run storybook with all the components of UI Kit.
1616

1717
Deployed version of the Storybook from the `main` branch is here: https://cube-uikit-storybook.netlify.app/
1818

19-
### yarn build
19+
### pnpm build
2020

2121
Builds a static copy of UIKit to the `dist/` folder.
2222
Your app is ready to be deployed!
2323

24-
### yarn test
24+
### pnpm test
2525

2626
Not yet implemented

0 commit comments

Comments
 (0)