Skip to content

Commit

Permalink
(chore): Switch from yarn v3 to pnpm (#92)
Browse files Browse the repository at this point in the history
  • Loading branch information
AdiRishi authored Oct 3, 2023
1 parent 52aa8c2 commit 8b42468
Show file tree
Hide file tree
Showing 9 changed files with 2,938 additions and 5,276 deletions.
4 changes: 2 additions & 2 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@ To set up the repository on your local machine, follow these steps:

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

## Making a Pull Request

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

1. Run lint and test commands to check for any errors. You can do this by running `yarn lint` and `yarn test`.
1. Run lint and test commands to check for any errors. You can do this by running `pnpm lint` and `pnpm test`.
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.
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.

Expand Down
15 changes: 9 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,15 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v2
with:
version: 8
- uses: actions/setup-node@v3
with:
node-version: 18
cache: 'yarn'
- run: yarn install
- run: yarn lint
- run: yarn typecheck
- run: yarn build
- run: yarn test
cache: 'pnpm'
- run: pnpm install
- run: pnpm lint
- run: pnpm typecheck
- run: pnpm build
- run: pnpm test
7 changes: 5 additions & 2 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,14 @@ jobs:
name: Build & Deploy
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v2
with:
version: 8
- uses: actions/setup-node@v3
with:
node-version: 18
cache: 'yarn'
- run: yarn install
cache: 'pnpm'
- run: pnpm install
- name: Deploy
uses: cloudflare/wrangler-action@v3
env:
Expand Down
874 changes: 0 additions & 874 deletions .yarn/releases/yarn-3.6.3.cjs

This file was deleted.

3 changes: 0 additions & 3 deletions .yarnrc.yml

This file was deleted.

8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ For a more hands-on deployment using the CLI, follow the steps below:
git clone https://github.com/AdiRishi/turborepo-remote-cache-cloudflare.git custom-cache

# 2. Install packages
yarn install
pnpm install

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

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

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

```
yarn lint
yarn run v1.22.19
pnpm lint
$ dotenv -- turbo run lint
• Packages in scope: turborepo-project, webapp, docs
• Running lint in 3 packages
Expand Down
27 changes: 15 additions & 12 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,20 @@
"license": "MIT",
"readme": "README.md",
"type": "module",
"private": true,
"engines": {
"node": ">=16",
"pnpm": ">=8"
},
"scripts": {
"build": "wrangler deploy --dry-run --outdir dist",
"dev": "wrangler dev --test-scheduled",
"test": "NODE_OPTIONS=--experimental-vm-modules NODE_NO_WARNINGS=1 vitest run --coverage",
"test:watch": "NODE_OPTIONS=--experimental-vm-modules NODE_NO_WARNINGS=1 vitest",
"lint": "eslint . --ext .ts,.js,.cjs,.mjs --fix",
"format": "prettier --write .",
"typecheck": "tsc --noEmit"
},
"devDependencies": {
"@cloudflare/workers-types": "^4.20231002.0",
"@typescript-eslint/eslint-plugin": "^6.7.4",
Expand All @@ -41,20 +55,9 @@
"vitest-environment-miniflare": "^2.14.1",
"wrangler": "^3.10.1"
},
"private": true,
"scripts": {
"build": "wrangler deploy --dry-run --outdir dist",
"dev": "wrangler dev --test-scheduled",
"test": "NODE_OPTIONS=--experimental-vm-modules NODE_NO_WARNINGS=1 vitest run --coverage",
"test:watch": "NODE_OPTIONS=--experimental-vm-modules NODE_NO_WARNINGS=1 vitest",
"lint": "eslint . --ext .ts,.js,.cjs,.mjs --fix",
"format": "prettier --write .",
"typecheck": "tsc --noEmit"
},
"dependencies": {
"@hono/zod-validator": "^0.1.9",
"hono": "^3.7.3",
"zod": "^3.22.2"
},
"packageManager": "[email protected]"
}
}
Loading

0 comments on commit 8b42468

Please sign in to comment.