Skip to content

Commit d5fe804

Browse files
committed
[switch-to-pnpm] Switch from yarn to pnpm
1 parent 045a058 commit d5fe804

File tree

11 files changed

+86900
-89931
lines changed

11 files changed

+86900
-89931
lines changed

.gitattributes

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
yarn.lock binary linguist-generated=true
1+
pnpm-lock.yaml linguist-generated=true
22
dist/*.js binary linguist-generated=true

.github/actions/setup/action.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,17 @@ description: 'Setup node, and install dependencies'
44
runs:
55
using: composite
66
steps:
7+
- name: Setup pnpm
8+
uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4
9+
with:
10+
run_install: false
11+
712
- name: Setup Node
813
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
914
with:
1015
node-version: "20.x"
16+
cache: "pnpm"
1117

1218
- name: Install dependencies
1319
shell: bash
14-
run: yarn
20+
run: pnpm install

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
uses: ./.github/actions/setup
1919

2020
- name: Build dist folder
21-
run: yarn run build
21+
run: pnpm run build
2222

2323
- name: Commit files
2424
run: |

.github/workflows/pr-actions.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
uses: ./.github/actions/setup
1414

1515
- name: Run jest coverage
16-
run: yarn test --coverage
16+
run: pnpm test --coverage
1717

1818
- name: Run flow
19-
run: yarn flow
19+
run: pnpm flow

.github/workflows/pr-autofix.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,11 @@ jobs:
2929

3030
- name: Run prettier
3131
if: steps.changed-js.outputs.filtered != '[]'
32-
run: echo '${{ steps.changed-js.outputs.filtered }}' | jq -r .[] | xargs yarn run format-files
32+
run: echo '${{ steps.changed-js.outputs.filtered }}' | jq -r .[] | xargs pnpm run format-files
3333

3434
- name: Rebuild our "dist" file
3535
if: steps.changed.outputs.files != '[]'
36-
run: yarn build
36+
run: pnpm build
3737

3838
- uses: Khan/autofix-commit-action@7ad29653a245c4bc54859d8644f233f94a99a183 # main
3939
env:

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ js
33
coverage
44
.vscode
55
package-lock.json
6-
yarn-error.log
6+
pnpm-debug.log

CONTRIBUTING.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ To work in the `gerald` repository, follow these steps:
2525

2626
1. Clone the repository
2727
`gh repo clone Khan/wonder-stuff`
28-
2. Install `yarn` (see [🔗yarnpkg.com](https://yarnpkg.com))
29-
3. Run `yarn install` to install the dependencies
28+
2. Install `pnpm` (see [🔗pnpm.io](https://pnpm.io))
29+
3. Run `pnpm install` to install the dependencies
3030

3131
You can now work on `gerald`. We prefer [🔗Visual Studio Code](https://code.visualstudio.com/) as our development environment (it's cross-platform and awesome), but please use what you feel comfortable with (we'll even forgive you for using vim).
3232

@@ -46,18 +46,18 @@ We love code reviews. If there are open pull requests, please feel free to revie
4646

4747
To ensure code quality, we use prettier, Flow, eslint, and jest. These are executed automatically by the workflows.
4848

49-
To execute these operations outside of a pull request or commit operation, you can use `yarn`.
49+
To execute these operations outside of a pull request or commit operation, you can use `pnpm`.
5050

51-
- `yarn flow`
52-
- `yarn lint`
53-
- `yarn test`
54-
- `yarn format`
51+
- `pnpm flow`
52+
- `pnpm lint`
53+
- `pnpm test`
54+
- `pnpm format`
5555

5656
💭**REMEMBER** If you would like to contribute code changes to the project, first make sure there's a corresponding issue for the change you wish to make.
5757

5858
## 📦 Build And Publish
5959

60-
Anyone can create a local build of the distributed code by running `yarn build`. Our `pr-autofix` workflow will also perform this process and commit the result.
60+
Anyone can create a local build of the distributed code by running `pnpm build`. Our `pr-autofix` workflow will also perform this process and commit the result.
6161

6262
### Publishing
6363

dist/index.js

Lines changed: 78490 additions & 83399 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"version": "4.0.0",
3+
"packageManager": "pnpm@10.26.0+sha512.3b3f6c725ebe712506c0ab1ad4133cf86b1f4b687effce62a9b38b4d72e3954242e643190fc51fa1642949c735f403debd44f5cb0edd657abe63a8b6a7e1e402",
34
"scripts": {
45
"build": "rm -rf js && babel src/*.js -d js/ && npm run dist",
56
"dist": "ncc build js/gerald.js",

0 commit comments

Comments
 (0)