Skip to content
This repository was archived by the owner on Jan 23, 2024. It is now read-only.

Commit 0d31b37

Browse files
authored
chore: use pnpm (#939)
* chore: use pnpm * chore: use pnpm * chore: use pnpm * chore: use pnpm * chore: use pnpm
1 parent da7eff7 commit 0d31b37

File tree

12 files changed

+10075
-9066
lines changed

12 files changed

+10075
-9066
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: "Install"
2+
description: "Sets up Node.js and runs install"
3+
4+
runs:
5+
using: composite
6+
steps:
7+
- name: Install dependencies
8+
uses: pnpm/[email protected]
9+
with:
10+
version: 7
11+
12+
- name: Setup Node.js
13+
uses: actions/setup-node@v3
14+
with:
15+
node-version-file: ".nvmrc"
16+
registry-url: "https://registry.npmjs.org"
17+
cache: "pnpm"
18+
19+
- name: Setup Git User
20+
shell: bash
21+
run: |
22+
git config --global user.email "[email protected]"
23+
git config --global user.name "Segun Adebayo"
24+
25+
- name: Install dependencies
26+
shell: bash
27+
run: pnpm install

.github/workflows/changelog.yml

+5-22
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: Update Changelog RC
33
on:
44
push:
55
paths:
6-
- '.changeset/**'
6+
- ".changeset/**"
77
branches:
88
- main
99

@@ -12,38 +12,21 @@ jobs:
1212
if: ${{ 'chakra-ui/chakra-ui-docs' == github.repository }}
1313
runs-on: ubuntu-latest
1414
steps:
15-
- name: Get Yarn cache path
16-
id: yarn-cache
17-
run: echo "::set-output name=dir::$(yarn cache dir)"
18-
1915
- name: Checkout
2016
uses: actions/checkout@master
2117
with:
2218
ref: main
2319

24-
- name: Enable node
25-
uses: actions/setup-node@master
26-
with:
27-
node-version: 14.x
28-
29-
- name: Load Yarn cache
30-
uses: actions/cache@v2
31-
with:
32-
path: ${{ steps.yarn-cache.outputs.dir }}
33-
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
34-
restore-keys: |
35-
${{ runner.os }}-yarn-
36-
37-
- name: Install dependencies
38-
run: yarn install --frozen-lockfile
20+
- name: Install
21+
uses: ./.github/composite-actions/install
3922

4023
- name: Setup Git
4124
run: |
4225
git config user.name "github-actions[bot]"
4326
git config user.email "github-actions[bot]@users.noreply.github.com"
4427
4528
- name: Generate the new changelog
46-
run: yarn changelog:gen
29+
run: pnpm changelog:gen
4730

4831
- name: Commit changelog
4932
run: |
@@ -54,5 +37,5 @@ jobs:
5437
uses: peter-evans/create-pull-request@v3
5538
with:
5639
delete-branch: true
57-
title: 'docs: update .changelogrc'
40+
title: "docs: update .changelogrc"
5841
branch: docs/changelog-updates

.github/workflows/contributing.yml

+3-8
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,8 @@ jobs:
1616
- name: Checkout workspace
1717
uses: actions/checkout@v2
1818

19-
- name: Setup NodeJs
20-
uses: actions/setup-node@v2
21-
with:
22-
node-version: 14.x
23-
24-
- name: Install dependencies
25-
run: yarn install --frozen-lockfile
19+
- name: Install
20+
uses: ./.github/composite-actions/install
2621

2722
- name: Run Script
28-
run: yarn contributing:gen
23+
run: pnpm contributing:gen

.github/workflows/daily.yml

+9-22
Original file line numberDiff line numberDiff line change
@@ -10,38 +10,25 @@ jobs:
1010
if: ${{ 'chakra-ui/chakra-ui-docs' == github.repository }}
1111
runs-on: ubuntu-latest
1212
steps:
13-
- name: Get Yarn cache path
14-
id: yarn-cache
15-
run: echo "::set-output name=dir::$(yarn cache dir)"
13+
- name: Get pnpm cache path
14+
id: pnpm-cache
15+
run: echo "::set-output name=dir::$(pnpm cache dir)"
1616

1717
- name: Checkout
1818
uses: actions/checkout@master
1919
with:
2020
ref: main
2121

22-
- name: Enable node
23-
uses: actions/setup-node@master
24-
with:
25-
node-version: 14.x
26-
27-
- name: Load Yarn cache
28-
uses: actions/cache@v2
29-
with:
30-
path: ${{ steps.yarn-cache.outputs.dir }}
31-
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
32-
restore-keys: |
33-
${{ runner.os }}-yarn-
34-
35-
- name: Install dependencies
36-
run: yarn install --frozen-lockfile
22+
- name: Install
23+
uses: ./.github/composite-actions/install
3724

3825
- name: Setup Git
3926
run: |
4027
git config user.name "github-actions[bot]"
4128
git config user.email "github-actions[bot]@users.noreply.github.com"
4229
4330
- name: Generate avatars and all-sponsorsrc
44-
run: yarn avatars:gen
31+
run: pnpm avatars:gen
4532

4633
- name: Commit avatars and all-sponsorsrc
4734
run: |
@@ -52,23 +39,23 @@ jobs:
5239
git diff --staged --quiet || git commit -m "chore(.all-sponsorsrc): $GITHUB_SHA"
5340
5441
- name: Generate all-membersrc
55-
run: yarn members:gen
42+
run: pnpm members:gen
5643

5744
- name: Commit all-membersrc
5845
run: |
5946
git add .all-membersrc
6047
git diff --staged --quiet || git commit -m "chore(.all-membersrc): $GITHUB_SHA"
6148
6249
- name: Generate all-former-membersrc
63-
run: yarn former-members:gen
50+
run: pnpm former-members:gen
6451

6552
- name: Commit all-former-membersrc
6653
run: |
6754
git add .all-former-membersrc
6855
git diff --staged --quiet || git commit -m "chore(.all-former-membersrc): $GITHUB_SHA"
6956
7057
- name: Generate showcase.json
71-
run: yarn showcase-data:gen
58+
run: pnpm showcase-data:gen
7259

7360
- name: Commit showcase.json
7461
run: |

.github/workflows/release.yml

+7-20
Original file line numberDiff line numberDiff line change
@@ -6,46 +6,33 @@ jobs:
66
update_changelog:
77
runs-on: ubuntu-latest
88
steps:
9-
- name: Get Yarn cache path
10-
id: yarn-cache
11-
run: echo "::set-output name=dir::$(yarn cache dir)"
9+
- name: Get pnpm cache path
10+
id: pnpm-cache
11+
run: echo "::set-output name=dir::$(pnpm cache dir)"
1212

1313
- name: Checkout
1414
uses: actions/checkout@master
1515
with:
1616
ref: main
1717

18-
- name: Enable node
19-
uses: actions/setup-node@master
20-
with:
21-
node-version: 14.x
22-
23-
- name: Load Yarn cache
24-
uses: actions/cache@v2
25-
with:
26-
path: ${{ steps.yarn-cache.outputs.dir }}
27-
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
28-
restore-keys: |
29-
${{ runner.os }}-yarn-
30-
31-
- name: Install dependencies
32-
run: yarn install --frozen-lockfile
18+
- name: Install
19+
uses: ./.github/composite-actions/install
3320

3421
- name: Setup Git
3522
run: |
3623
git config user.name "github-actions[bot]"
3724
git config user.email "github-actions[bot]@users.noreply.github.com"
3825
3926
- name: 'Generate changelog'
40-
run: yarn changelog:gen
27+
run: pnpm changelog:gen
4128

4229
- name: Commit changelog
4330
run: |
4431
git add pages/changelog/index.mdx
4532
git diff --staged --quiet || git commit -m "docs(changelog): $GITHUB_SHA"
4633
4734
- name: Bump Chakra UI version
48-
run: yarn deps
35+
run: pnpm deps
4936

5037
- name: Commit package.json
5138
run: |

.npmrc

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
strict-peer-dependencies=false

.nvmrc

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
16.x

CONTRIBUTING.md

+20-20
Original file line numberDiff line numberDiff line change
@@ -30,51 +30,51 @@ git clone https://github.com/<your_github_username>/chakra-ui-docs.git
3030
cd chakra-ui-docs
3131
```
3232

33-
3. Setup all the dependencies and packages by running `yarn`.
33+
3. Setup all the dependencies and packages by running `pnpm i`.
3434

35-
4. Execute `yarn dev` to spin up a local development server. If you're running
35+
4. Execute `pnpm dev` to spin up a local development server. If you're running
3636
Windows, contentlayer might not work as expected, so you'd need to do
37-
`npx contentlayer build` before running `yarn dev` in order to generate the
37+
`npx contentlayer build` before running `pnpm dev` in order to generate the
3838
docsite content.
3939

4040
> If you run into any issues, kindly reach out to the Chakra UI React team here:
4141
> https://discord.gg/chakra-ui
4242
4343
### Commands
4444

45-
**`yarn`**: installs the dependency packages.
45+
**`pnpm`**: installs the dependency packages.
4646

47-
**`yarn dev`**: starts the local development server.
47+
**`pnpm dev`**: starts the local development server.
4848

49-
**`yarn build`**: builds the docsite for production.
49+
**`pnpm build`**: builds the docsite for production.
5050

51-
**`yarn lint`**: runs the nextjs linter which checks for code issues.
51+
**`pnpm lint`**: runs the nextjs linter which checks for code issues.
5252

53-
**`yarn avatars:gen`**: regenerates the avatars
53+
**`pnpm avatars:gen`**: regenerates the avatars
5454

55-
**`yarn members:gen`**: regenerates the members
55+
**`pnpm members:gen`**: regenerates the members
5656

57-
**`yarn former-members:gen`**: regenerates the former members
57+
**`pnpm former-members:gen`**: regenerates the former members
5858

59-
**`yarn search-meta:gen`**: regenerates the search meta
59+
**`pnpm search-meta:gen`**: regenerates the search meta
6060

61-
**`yarn showcase-data:gen`**: regenerates the showcase data
61+
**`pnpm showcase-data:gen`**: regenerates the showcase data
6262

63-
**`yarn changelog:gen`**: regenerates the Changelog
63+
**`pnpm changelog:gen`**: regenerates the Changelog
6464

65-
**`yarn cache:clean`**: deletes the `.contentlayer` folder
65+
**`pnpm cache:clean`**: deletes the `.contentlayer` folder
6666

67-
**`yarn clean`**: deletes the `yarn.lock` file and `node_modules`
67+
**`pnpm clean`**: deletes the `pnpm.lock` file and `node_modules`
6868

69-
**`yarn reinstall`**: reinstalls the dependency packages
69+
**`pnpm reinstall`**: reinstalls the dependency packages
7070

7171
## Updating the docs for new release
7272

7373
When a new version of `@chakra-ui/react` has been released, here's what you need
7474
to do to get it reflected in the docs:
7575

7676
- Bump the version of `@chakra-ui/react`
77-
- Run `yarn changelog:gen` to fetch the most recent changelog from the
77+
- Run `pnpm changelog:gen` to fetch the most recent changelog from the
7878
[main repository](https://github.com/chakra-ui/chakra-ui)
7979
- Open a Pull Request titled `docs: updates for new release`
8080

@@ -115,8 +115,8 @@ https://www.conventionalcommits.org/ or check out the
115115

116116
3. Make and commit your changes following the
117117
[commit convention](https://github.com/chakra-ui/chakra-ui-docs/blob/main/CONTRIBUTING.md#commit-convention).
118-
As you develop, you can run `yarn lint` to make sure everything works as
119-
expected. Please note that you might have to run `yarn` first in order to
118+
As you develop, you can run `pnpm lint` to make sure everything works as
119+
expected. Please note that you might have to run `pnpm` first in order to
120120
install all dependencies.
121121

122122
## Want to write a blog post or tutorial
@@ -149,4 +149,4 @@ echo "GITHUB_TOKEN=<PASTE YOUR TOKEN HERE>" >> .env
149149
## License
150150

151151
By contributing your code to the chakra-ui-docs GitHub repository, you agree to
152-
license your contribution under the MIT license.
152+
license your contribution under the MIT license.****

content/getting-started/contributing.mdx

+19-19
Original file line numberDiff line numberDiff line change
@@ -38,51 +38,51 @@ git clone https://github.com/<your_github_username>/chakra-ui-docs.git
3838
cd chakra-ui-docs
3939
```
4040

41-
3. Setup all the dependencies and packages by running `yarn`.
41+
3. Setup all the dependencies and packages by running `pnpm`.
4242

43-
4. Execute `yarn dev` to spin up a local development server. If you're running
43+
4. Execute `pnpm dev` to spin up a local development server. If you're running
4444
Windows, contentlayer might not work as expected, so you'd need to do
45-
`npx contentlayer build` before running `yarn dev` in order to generate the
45+
`npx contentlayer build` before running `pnpm dev` in order to generate the
4646
docsite content.
4747

4848
> If you run into any issues, kindly reach out to the Chakra UI React team here:
4949
> https://discord.gg/chakra-ui
5050
5151
### Commands
5252

53-
**`yarn`**: installs the dependency packages.
53+
**`pnpm`**: installs the dependency packages.
5454

55-
**`yarn dev`**: starts the local development server.
55+
**`pnpm dev`**: starts the local development server.
5656

57-
**`yarn build`**: builds the docsite for production.
57+
**`pnpm build`**: builds the docsite for production.
5858

59-
**`yarn lint`**: runs the nextjs linter which checks for code issues.
59+
**`pnpm lint`**: runs the nextjs linter which checks for code issues.
6060

61-
**`yarn avatars:gen`**: regenerates the avatars
61+
**`pnpm avatars:gen`**: regenerates the avatars
6262

63-
**`yarn members:gen`**: regenerates the members
63+
**`pnpm members:gen`**: regenerates the members
6464

65-
**`yarn former-members:gen`**: regenerates the former members
65+
**`pnpm former-members:gen`**: regenerates the former members
6666

67-
**`yarn search-meta:gen`**: regenerates the search meta
67+
**`pnpm search-meta:gen`**: regenerates the search meta
6868

69-
**`yarn showcase-data:gen`**: regenerates the showcase data
69+
**`pnpm showcase-data:gen`**: regenerates the showcase data
7070

71-
**`yarn changelog:gen`**: regenerates the Changelog
71+
**`pnpm changelog:gen`**: regenerates the Changelog
7272

73-
**`yarn cache:clean`**: deletes the `.contentlayer` folder
73+
**`pnpm cache:clean`**: deletes the `.contentlayer` folder
7474

75-
**`yarn clean`**: deletes the `yarn.lock` file and `node_modules`
75+
**`pnpm clean`**: deletes the `pnpm.lock` file and `node_modules`
7676

77-
**`yarn reinstall`**: reinstalls the dependency packages
77+
**`pnpm reinstall`**: reinstalls the dependency packages
7878

7979
## Updating the docs for new release
8080

8181
When a new version of `@chakra-ui/react` has been released, here's what you need
8282
to do to get it reflected in the docs:
8383

8484
- Bump the version of `@chakra-ui/react`
85-
- Run `yarn changelog:gen` to fetch the most recent changelog from the
85+
- Run `pnpm changelog:gen` to fetch the most recent changelog from the
8686
[main repository](https://github.com/chakra-ui/chakra-ui)
8787
- Open a Pull Request titled `docs: updates for new release`
8888

@@ -123,8 +123,8 @@ https://www.conventionalcommits.org/ or check out the
123123

124124
3. Make and commit your changes following the
125125
[commit convention](https://github.com/chakra-ui/chakra-ui-docs/blob/main/CONTRIBUTING.md#commit-convention).
126-
As you develop, you can run `yarn lint` to make sure everything works as
127-
expected. Please note that you might have to run `yarn` first in order to
126+
As you develop, you can run `pnpm lint` to make sure everything works as
127+
expected. Please note that you might have to run `pnpm` first in order to
128128
install all dependencies.
129129

130130
## Want to write a blog post or tutorial

0 commit comments

Comments
 (0)