Skip to content

Commit 8b42468

Browse files
authored
(chore): Switch from yarn v3 to pnpm (#92)
1 parent 52aa8c2 commit 8b42468

File tree

9 files changed

+2938
-5276
lines changed

9 files changed

+2938
-5276
lines changed

.github/CONTRIBUTING.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,13 @@ To set up the repository on your local machine, follow these steps:
1212

1313
1. Clone the repository using `git clone https://github.com/AdiRishi/turborepo-remote-cache-cloudflare.git`.
1414
2. Move into the project directory with `cd turborepo-remote-cache-cf`.
15-
3. Install the project dependencies by running `yarn install`.
15+
3. Install the project dependencies by running `pnpm install`.
1616

1717
## Making a Pull Request
1818

1919
Before submitting a pull request, ensure you adhere to the following:
2020

21-
1. Run lint and test commands to check for any errors. You can do this by running `yarn lint` and `yarn test`.
21+
1. Run lint and test commands to check for any errors. You can do this by running `pnpm lint` and `pnpm test`.
2222
2. Write unit tests for any changes you make. This helps maintain the quality of the code and ensures that your changes don't accidentally break anything.
2323
3. Always sign your commits. This confirms that the changes come from a trusted source. Read [this documentation](https://docs.github.com/en/authentication/managing-commit-signature-verification/about-commit-signature-verification) to learn how to sign commits.
2424

.github/workflows/ci.yml

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,15 @@ jobs:
1212
runs-on: ubuntu-latest
1313
steps:
1414
- uses: actions/checkout@v4
15+
- uses: pnpm/action-setup@v2
16+
with:
17+
version: 8
1518
- uses: actions/setup-node@v3
1619
with:
1720
node-version: 18
18-
cache: 'yarn'
19-
- run: yarn install
20-
- run: yarn lint
21-
- run: yarn typecheck
22-
- run: yarn build
23-
- run: yarn test
21+
cache: 'pnpm'
22+
- run: pnpm install
23+
- run: pnpm lint
24+
- run: pnpm typecheck
25+
- run: pnpm build
26+
- run: pnpm test

.github/workflows/deploy.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,14 @@ jobs:
1111
name: Build & Deploy
1212
steps:
1313
- uses: actions/checkout@v4
14+
- uses: pnpm/action-setup@v2
15+
with:
16+
version: 8
1417
- uses: actions/setup-node@v3
1518
with:
1619
node-version: 18
17-
cache: 'yarn'
18-
- run: yarn install
20+
cache: 'pnpm'
21+
- run: pnpm install
1922
- name: Deploy
2023
uses: cloudflare/wrangler-action@v3
2124
env:

.yarn/releases/yarn-3.6.3.cjs

Lines changed: 0 additions & 874 deletions
This file was deleted.

.yarnrc.yml

Lines changed: 0 additions & 3 deletions
This file was deleted.

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ For a more hands-on deployment using the CLI, follow the steps below:
2929
git clone https://github.com/AdiRishi/turborepo-remote-cache-cloudflare.git custom-cache
3030

3131
# 2. Install packages
32-
yarn install
32+
pnpm install
3333

3434
# 3. Create the R2 bucket for storage
3535
wrangler r2 bucket create turborepo-cache
@@ -79,7 +79,7 @@ Install the `dotenv-cli` npm package:
7979

8080
```sh
8181
# You may have to add -W if you are installing this on your workspace root
82-
yarn add --dev dotenv-cli
82+
pnpm add -D dotenv-cli
8383
```
8484

8585
### Step 3: Create a `.env` File
@@ -122,8 +122,8 @@ And that's it 🎉🎉
122122
Whenever you run a turbo command you will see `Remote cache enabled` in it's log output
123123

124124
```
125-
yarn lint
126-
yarn run v1.22.19
125+
pnpm lint
126+
127127
$ dotenv -- turbo run lint
128128
• Packages in scope: turborepo-project, webapp, docs
129129
• Running lint in 3 packages

package.json

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,20 @@
2626
"license": "MIT",
2727
"readme": "README.md",
2828
"type": "module",
29+
"private": true,
30+
"engines": {
31+
"node": ">=16",
32+
"pnpm": ">=8"
33+
},
34+
"scripts": {
35+
"build": "wrangler deploy --dry-run --outdir dist",
36+
"dev": "wrangler dev --test-scheduled",
37+
"test": "NODE_OPTIONS=--experimental-vm-modules NODE_NO_WARNINGS=1 vitest run --coverage",
38+
"test:watch": "NODE_OPTIONS=--experimental-vm-modules NODE_NO_WARNINGS=1 vitest",
39+
"lint": "eslint . --ext .ts,.js,.cjs,.mjs --fix",
40+
"format": "prettier --write .",
41+
"typecheck": "tsc --noEmit"
42+
},
2943
"devDependencies": {
3044
"@cloudflare/workers-types": "^4.20231002.0",
3145
"@typescript-eslint/eslint-plugin": "^6.7.4",
@@ -41,20 +55,9 @@
4155
"vitest-environment-miniflare": "^2.14.1",
4256
"wrangler": "^3.10.1"
4357
},
44-
"private": true,
45-
"scripts": {
46-
"build": "wrangler deploy --dry-run --outdir dist",
47-
"dev": "wrangler dev --test-scheduled",
48-
"test": "NODE_OPTIONS=--experimental-vm-modules NODE_NO_WARNINGS=1 vitest run --coverage",
49-
"test:watch": "NODE_OPTIONS=--experimental-vm-modules NODE_NO_WARNINGS=1 vitest",
50-
"lint": "eslint . --ext .ts,.js,.cjs,.mjs --fix",
51-
"format": "prettier --write .",
52-
"typecheck": "tsc --noEmit"
53-
},
5458
"dependencies": {
5559
"@hono/zod-validator": "^0.1.9",
5660
"hono": "^3.7.3",
5761
"zod": "^3.22.2"
58-
},
59-
"packageManager": "yarn@3.6.3"
62+
}
6063
}

0 commit comments

Comments
 (0)