Skip to content

Commit 32185eb

Browse files
committed
Switch from yarn to pnpm
Signed-off-by: Michael Mior <[email protected]>
1 parent 41ae108 commit 32185eb

File tree

10 files changed

+16524
-17099
lines changed

10 files changed

+16524
-17099
lines changed

Diff for: .github/workflows/chromatic.yml

+3-2
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,14 @@ jobs:
1616
with:
1717
fetch-depth: 0
1818

19+
- uses: pnpm/action-setup@v4
1920
- uses: actions/setup-node@v3
2021
with:
2122
node-version: 18
22-
cache: 'yarn'
23+
cache: 'pnpm'
2324

2425
- name: Install dependencies
25-
run: yarn
26+
run: pnpm install
2627
# 👇 Adds Chromatic as a step in the workflow
2728
- name: Publish to Chromatic
2829
uses: chromaui/action@v1

Diff for: .github/workflows/ci.yml

+10-9
Original file line numberDiff line numberDiff line change
@@ -28,28 +28,29 @@ jobs:
2828
with:
2929
fetch-depth: 0
3030

31+
- uses: pnpm/action-setup@v4
3132
- uses: actions/setup-node@v3
3233
with:
3334
node-version: 18
34-
cache: 'yarn'
35+
cache: 'pnpm'
3536

36-
- run: yarn install
37-
- run: yarn lint
38-
- run: yarn flow
39-
- run: yarn test --coverage
40-
- run: yarn build
41-
- run: yarn esdoc
37+
- run: pnpm install
38+
- run: pnpm run lint
39+
- run: pnpm run flow
40+
- run: pnpm run test --coverage
41+
- run: pnpm run build
42+
- run: pnpm esdoc
4243

4344
- name: BundleWatch
4445
env:
4546
BUNDLEWATCH_GITHUB_TOKEN: ${{ secrets.BUNDLEWATCH_GITHUB_TOKEN }}
4647
CI_BRANCH_BASE: main
4748
if: ${{ matrix.os == 'ubuntu-latest' }}
48-
run: yarn run bundlewatch
49+
run: pnpm bundlewatch
4950

5051
- name: Coveralls
5152
env:
5253
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
5354
if: ${{ matrix.os == 'ubuntu-latest' && github.ref == 'refs/heads/main' }}
54-
run: yarn coveralls
55+
run: pnpm run coveralls
5556
shell: bash

Diff for: .github/workflows/flow-typed.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,12 @@ jobs:
1313
with:
1414
ref: main
1515

16+
- uses: pnpm/action-setup@v4
1617
- name: Set up node
1718
uses: actions/setup-node@v3
1819
with:
1920
node-version: 18
20-
- run: yarn install --frozen-lockfile --non-interactive
21+
- run: pnpm install --frozen-lockfile
2122
- run: npx flow-typed install
2223

2324
- name: Create Pull Request

Diff for: README.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -10,32 +10,32 @@ This project was bootstrapped with [Create React App](https://github.com/faceboo
1010

1111
In the project directory, you can run:
1212

13-
### `yarn start`
13+
### `pnpm start`
1414

1515
Runs the app in the development mode.<br />
1616
Open [http://localhost:3000](http://localhost:3000) to view it in the browser.
1717

1818
The page will reload if you make edits.<br />
1919
You will also see any lint errors in the console.
2020

21-
### `yarn test`
21+
### `pnpm test`
2222

2323
Launches the test runner in the interactive watch mode.<br />
2424
See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information.
2525

26-
### `yarn build`
26+
### `pnpm build`
2727

2828
Builds the app for production to the `build` folder.<br />
2929
It correctly bundles React in production mode and optimizes the build for the best performance.
3030

3131
The build is minified and the filenames include the hashes.<br />
3232

33-
### `yarn flow`
33+
### `pnpm flow`
3434

3535
Type check all files in the `src` folder using [Flow](https://flow.org/).
3636
This check will also be run before commits.
3737

38-
### `yarn lint`
38+
### `pnpm lint`
3939

4040
Lint all files in `src` using [ESLint](https://eslint.org/) and [Prettier](https://prettier.io/).
4141
Files which have changed are also linted before every commit.

Diff for: netlify.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[build]
22
# Build command.
3-
command = "yarn run netlify-build"
3+
command = "pnpm run netlify-build"
44

55
# Publish diretory
66
publish = "build/"

Diff for: package.json

+9-3
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,12 @@
4242
"build": "react-scripts build",
4343
"build-storybook": "storybook build",
4444
"chromatic": "npx chromatic --project-token \"$CHROMATIC_PROJECT_TOKEN\"",
45-
"coveralls": "cat ./coverage/lcov.info | node node_modules/.bin/coveralls",
45+
"coveralls": "cat ./coverage/lcov.info | coveralls",
4646
"eject": "react-scripts eject",
4747
"flow": "flow check src",
48-
"lint": "node_modules/.bin/prettier --check src/**/*.{js,json} && eslint --ext .js,.yml . && npmPkgJsonLint -q . && pkg-ok && markdownlint *.md",
48+
"lint": "prettier --check src/**/*.{js,json} && eslint --ext .js,.yml . && npmPkgJsonLint -q . && pkg-ok && markdownlint *.md",
4949
"netlify-build": "REACT_APP_GIT_SHA=`([ -n \"$COMMIT_REF\" ] && echo \"$COMMIT_REF\") || git rev-parse HEAD` react-scripts build && storybook build -o build/storybook/ && esdoc && mv docs/ build/",
50+
"preinstall": "npx only-allow pnpm",
5051
"prepare": "husky",
5152
"start": "react-scripts start",
5253
"storybook": "storybook dev -p 9009",
@@ -113,6 +114,7 @@
113114
"storybook": "^8.4.0",
114115
"stylelint": "^16.9.0",
115116
"stylelint-config-standard": "^36.0.1",
117+
"universal-cookie": "^7.2.2",
116118
"webpack": "5"
117119
},
118120
"engines": {
@@ -137,5 +139,9 @@
137139
}
138140
]
139141
},
140-
"packageManager": "[email protected]"
142+
"pnpm": {
143+
"overrides": {
144+
"jest-environment-jsdom": "27.4.6"
145+
}
146+
}
141147
}

0 commit comments

Comments
 (0)