Skip to content

Commit

Permalink
Move to bun
Browse files Browse the repository at this point in the history
  • Loading branch information
jacksongoode committed Nov 23, 2024
1 parent 69281fc commit 9e9a7bd
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 5,411 deletions.
20 changes: 6 additions & 14 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,28 +17,20 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

- name: Install pnpm
uses: pnpm/action-setup@v3
id: pnpm-install
- name: Install Bun
uses: oven-sh/setup-bun@v2
with:
version: 9.12.2
run_install: false

- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'pnpm'
bun-version: latest

- name: Install dependencies
run: pnpm install --frozen-lockfile --strict-peer-dependencies
run: bun install --frozen-lockfile

- name: Run test
run: pnpm test
run: bun test

# TODO Enable those lines below if you use a Redis cache, you'll also need to configure GitHub Repository Secrets
# env:
# REDIS_HOST: ${{ secrets.REDIS_HOST }}
# REDIS_PASSWORD: ${{ secrets.REDIS_PASSWORD }}
# - name: Build
# run: pnpm build
# run: bun run build
Binary file added bun.lockb
Binary file not shown.
46 changes: 19 additions & 27 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,51 +15,50 @@
"build": "next build",
"start": "next start",
"deploy": "vercel deploy",
"deps:update": "[ -z $GITHUB_ACTIONS ] && pnpm up -L notion-client notion-types notion-utils react-notion-x || echo 'Skipping deps:update on CI'",
"deps:update": "[ -z $GITHUB_ACTIONS ] && bun update notion-client notion-types notion-utils react-notion-x || echo 'Skipping deps:update on CI'",
"deps:link": "[ -z $GITHUB_ACTIONS ] && run-s deps:link:* || echo 'Skipping deps:update on CI'",
"deps:unlink": "[ -z $GITHUB_ACTIONS ] && pnpm add notion-client notion-types notion-utils react-notion-x || echo 'Skipping deps:update on CI'",
"deps:link:notion-types": "pnpm link ../react-notion-x/packages/notion-types",
"deps:link:notion-utils": "pnpm link ../react-notion-x/packages/notion-utils",
"deps:link:notion-client": "pnpm link ../react-notion-x/packages/notion-client",
"deps:link:react-notion-x": "pnpm link ../react-notion-x/packages/react-notion-x",
"deps:unlink": "[ -z $GITHUB_ACTIONS ] && bun add notion-client notion-types notion-utils react-notion-x || echo 'Skipping deps:update on CI'",
"deps:link:notion-types": "bun link ../react-notion-x/packages/notion-types",
"deps:link:notion-utils": "bun link ../react-notion-x/packages/notion-utils",
"deps:link:notion-client": "bun link ../react-notion-x/packages/notion-client",
"deps:link:react-notion-x": "bun link ../react-notion-x/packages/react-notion-x",
"analyze": "cross-env ANALYZE=true next build",
"analyze:server": "cross-env BUNDLE_ANALYZE=server next build",
"analyze:browser": "cross-env BUNDLE_ANALYZE=browser next build",
"test": "run-p test:*",
"test:lint": "eslint .",
"test:prettier": "prettier '**/*.{js,jsx,ts,tsx}' --check",
"preinstall": "npx only-allow pnpm",
"postinstall": "pnpm rebuild sharp"
"preinstall": "npx only-allow bun"
},
"dependencies": {
"@fisch0920/use-dark-mode": "^2.4.0",
"@keyvhq/core": "^2.1.1",
"@keyvhq/redis": "^2.1.5",
"@vercel/analytics": "^1.4.0",
"@vercel/og": "^0.6.3",
"@vercel/analytics": "^1.4.1",
"@vercel/og": "^0.6.4",
"canvas": "^2.11.2",
"classnames": "^2.5.1",
"date-fns": "^4.1.0",
"eslint-config-next": "15.0.3",
"expiry-map": "^2.0.0",
"fathom-client": "^3.7.2",
"got": "^14.4.4",
"got": "^14.4.5",
"isomorphic-unfetch": "^4.0.2",
"ky": "^1.7.2",
"lqip-modern": "^2.2.1",
"next": "15.0.3",
"notion-client": "^7.1.3",
"notion-types": "^7.1.3",
"notion-utils": "^7.1.3",
"notion-client": "^7.1.5",
"notion-types": "^7.1.5",
"notion-utils": "^7.1.5",
"p-map": "^7.0.2",
"p-memoize": "^7.1.1",
"posthog-js": "^1.186.1",
"posthog-js": "^1.188.0",
"prismjs": "^1.29.0",
"react": "^18.3.1",
"react-body-classname": "^1.3.1",
"react-dom": "^18.3.1",
"react-icons": "^5.3.0",
"react-notion-x": "^7.2.3",
"react-notion-x": "^7.2.5",
"react-tweet-embed": "^2.0.0",
"react-use": "^17.5.1",
"rss": "^1.2.2",
Expand All @@ -71,24 +70,17 @@
"@next/bundle-analyzer": "15.0.3",
"@trivago/prettier-plugin-sort-imports": "^4.3.0",
"@types/got": "^9.6.12",
"@types/node": "^22.9.0",
"@types/node": "^22.9.3",
"@types/react": "^18.3.12",
"@typescript-eslint/eslint-plugin": "^8.14.0",
"@typescript-eslint/parser": "^8.14.0",
"@typescript-eslint/eslint-plugin": "^8.15.0",
"@typescript-eslint/parser": "^8.15.0",
"cross-env": "^7.0.3",
"eslint": "^9.15.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-react": "^7.37.2",
"eslint-plugin-react-hooks": "^5.0.0",
"npm-run-all": "^4.1.5",
"prettier": "^3.3.3",
"typescript": "^5.6.3"
},
"pnpm": {
"overrides": {
"@types/react": "^18.2.0",
"react": "^18.2.0",
"react-dom": "^18.2.0"
}
"typescript": "^5.7.2"
}
}
Loading

0 comments on commit 9e9a7bd

Please sign in to comment.