Skip to content

Commit

Permalink
build: stop using Yarn as package manager
Browse files Browse the repository at this point in the history
  • Loading branch information
jonahsnider committed Mar 30, 2024
1 parent e567f85 commit 678ef4a
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 12,438 deletions.
20 changes: 9 additions & 11 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,26 +16,24 @@ jobs:
steps:
- name: Checkout Git repository
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
- name: Setup Bun
uses: oven-sh/setup-bun@v1
with:
node-version: 'lts/*'
cache: 'yarn'
- name: Install dependencies with Yarn
run: yarn install --immutable
bun-version: latest
- name: Install dependencies with Bun
run: bun install --frozen-lockfile
- name: Pull environment variables
run: yarn vercel env pull --environment development .env --token ${{ secrets.VERCEL_TOKEN }}
run: bun vercel env pull --environment development .env --token ${{ secrets.VERCEL_TOKEN }}
- name: Cache Next.js
uses: actions/cache@v4
with:
# See here for caching with `yarn` https://github.com/actions/cache/blob/main/examples.md#node---yarn or you can leverage caching with actions/setup-node https://github.com/actions/setup-node
path: |
~/.npm
${{ github.workspace }}/apps/web/.next/cache
# Generate a new cache whenever packages or source files change.
key: ${{ runner.os }}-nextjs-${{ hashFiles('**/yarn.lock') }}-${{ hashFiles('**/*.js', '**/*.jsx', '**/*.ts', '**/*.tsx') }}
key: ${{ runner.os }}-nextjs-${{ hashFiles('**/bun.lockb') }}-${{ hashFiles('**/*.js', '**/*.jsx', '**/*.ts', '**/*.tsx') }}
# If source files changed but packages didn't, rebuild from a prior cache.
restore-keys: |
${{ runner.os }}-nextjs-${{ hashFiles('**/yarn.lock') }}-
${{ runner.os }}-nextjs-${{ hashFiles('**/bun.lockb') }}-
- name: Build and test
run: yarn run test
run: bun run test
9 changes: 0 additions & 9 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -241,12 +241,3 @@ $RECYCLE.BIN/

# Turbo
.turbo

# Yarn
.pnp.*
.yarn/*
!.yarn/patches
!.yarn/plugins
!.yarn/releases
!.yarn/sdks
!.yarn/versions
247 changes: 0 additions & 247 deletions .prettierignore

This file was deleted.

893 changes: 0 additions & 893 deletions .yarn/releases/yarn-4.1.1.cjs

This file was deleted.

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

This file was deleted.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"lint:fix": "biome check . --apply-unsafe",
"migrate": "bun ./migrate.ts",
"migrate:create": "drizzle-kit generate:pg",
"test": "yarn run lint && yarn run format && turbo run build type-check",
"test": "bun run lint && bun run format && turbo run build type-check",
"type-check": "turbo run type-check"
},
"dependencies": {
Expand All @@ -31,7 +31,7 @@
"turbo": "1.13.0",
"vercel": "33.6.1"
},
"packageManager": "[email protected]",
"packageManager": "[email protected]",
"trustedDependencies": [
"@biomejs/biome"
]
Expand Down
3 changes: 1 addition & 2 deletions railway.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@
"phases": {
"install": {
"aptPkgs": ["unzip"],
"nixPkgs": ["bun"],
"cmds": ["bun upgrade"]
"cmds": ["bun upgrade", "bun install --frozen-lockfile"]
}
}
}
Expand Down
Loading

0 comments on commit 678ef4a

Please sign in to comment.