Skip to content

Commit

Permalink
chore: replace pnpm with bun
Browse files Browse the repository at this point in the history
  • Loading branch information
mrevanzak committed May 2, 2024
1 parent 2d15b51 commit 477fd0b
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 20 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
run: cp .env.example .env

- name: Lint
run: pnpm lint && pnpm lint:ws
run: bun lint && bun lint:ws

format:
runs-on: ubuntu-latest
Expand All @@ -43,7 +43,7 @@ jobs:
uses: ./tooling/github/setup

- name: Format
run: pnpm format
run: bun format

typecheck:
runs-on: ubuntu-latest
Expand All @@ -54,4 +54,4 @@ jobs:
uses: ./tooling/github/setup

- name: Typecheck
run: pnpm typecheck
run: bun typecheck
2 changes: 1 addition & 1 deletion .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"name": "Next.js",
"type": "node-terminal",
"request": "launch",
"command": "pnpm dev",
"command": "bun dev",
"cwd": "${workspaceFolder}/apps/nextjs/",
"skipFiles": ["<node_internals>/**"]
}
Expand Down
6 changes: 3 additions & 3 deletions apps/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
"private": true,
"type": "module",
"scripts": {
"build": "pnpm with-env next build",
"build": "bun with-env next build",
"clean": "git clean -xdf .next .turbo node_modules",
"dev": "pnpm with-env next dev",
"dev": "bun with-env next dev",
"format": "prettier --check . --ignore-path ../../.gitignore",
"lint": "eslint",
"start": "pnpm with-env next start",
"start": "bun with-env next start",
"typecheck": "tsc --noEmit",
"with-env": "dotenv -e ../../.env --"
},
Expand Down
Binary file modified bun.lockb
Binary file not shown.
4 changes: 2 additions & 2 deletions packages/ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@
},
"license": "MIT",
"scripts": {
"add": "pnpm dlx shadcn-ui add",
"add": "bun x shadcn-ui add",
"clean": "rm -rf .turbo node_modules",
"format": "prettier --check . --ignore-path ../../.gitignore",
"lint": "eslint",
"typecheck": "tsc --noEmit --emitDeclarationOnly false",
"ui-add": "pnpm dlx shadcn-ui add && prettier src --write --list-different"
"ui-add": "bun x shadcn-ui add && prettier src --write --list-different"
},
"dependencies": {
"@hookform/resolvers": "^3.3.4",
Expand Down
10 changes: 4 additions & 6 deletions tooling/github/setup/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,12 @@ description: "Common setup steps for Actions"
runs:
using: composite
steps:
- uses: pnpm/action-setup@v2
- uses: actions/setup-node@v4
- uses: oven-sh/setup-bun@v1
with:
node-version: 18
cache: "pnpm"
bun-version: latest

- shell: bash
run: pnpm add -g turbo
run: bun add -g turbo

- shell: bash
run: pnpm install
run: bun install
10 changes: 5 additions & 5 deletions turbo/generators/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,12 +79,12 @@ export default function generator(plop: PlopTypes.NodePlopAPI): void {
* Install deps and format everything
*/
if ("name" in answers && typeof answers.name === "string") {
// execSync("pnpm dlx sherif@latest --fix", {
// stdio: "inherit",
// });
execSync("pnpm i", { stdio: "inherit" });
execSync("bun x sherif@latest --fix", {
stdio: "inherit",
});
execSync("bun i", { stdio: "inherit" });
execSync(
`pnpm prettier --write packages/${answers.name}/** --list-different`,
`bun prettier --write packages/${answers.name}/** --list-different`,
);
return "Package scaffolded";
}
Expand Down

0 comments on commit 477fd0b

Please sign in to comment.