Skip to content

Commit 2cbf464

Browse files
committed
feat: migrate to pnpm
1 parent 69d348c commit 2cbf464

13 files changed

Lines changed: 11737 additions & 2074 deletions

File tree

.codesandbox/tasks.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@
33
"setupTasks": [
44
{
55
"name": "Install Dependencies",
6-
"command": "bun install"
6+
"command": "pnpm install"
77
}
88
],
99
"tasks": {
1010
"demo": {
1111
"name": "HyperDB Demo",
12-
"command": "bun run --filter='@will-be-done/hyperdb-demo-app' dev --host 0.0.0.0",
12+
"command": "pnpm --filter '@will-be-done/hyperdb-demo-app' dev --host 0.0.0.0",
1313
"runAtStart": true,
1414
"preview": {
1515
"port": 5173,

.github/workflows/ci.yaml

Lines changed: 34 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,21 @@ jobs:
1515
with:
1616
persist-credentials: false
1717

18-
- uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6
18+
- uses: pnpm/action-setup@v4
1919
with:
20-
bun-version: latest
20+
version: 11.8.0
21+
22+
- uses: actions/setup-node@v6
23+
with:
24+
node-version: 24
25+
cache: pnpm
26+
cache-dependency-path: pnpm-lock.yaml
2127

2228
- name: Install dependencies
23-
run: bun install
29+
run: pnpm install --frozen-lockfile
2430

2531
- name: Check formatting
26-
run: bun run format:check
32+
run: pnpm run format:check
2733

2834
hyperdb:
2935
runs-on: ubuntu-latest
@@ -33,27 +39,33 @@ jobs:
3339
with:
3440
persist-credentials: false
3541

36-
- uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6
42+
- uses: pnpm/action-setup@v4
43+
with:
44+
version: 11.8.0
45+
46+
- uses: actions/setup-node@v6
3747
with:
38-
bun-version: latest
48+
node-version: 24
49+
cache: pnpm
50+
cache-dependency-path: pnpm-lock.yaml
3951

4052
- name: Install dependencies
41-
run: bun install
53+
run: pnpm install --frozen-lockfile
4254

4355
- name: Lint
44-
run: bun run lint
56+
run: pnpm run lint
4557

4658
- name: TypeCheck
47-
run: bun run ts
59+
run: pnpm run ts
4860

4961
- name: Install Playwright browsers
50-
run: cd packages/hyperdb && bun run playwright install --with-deps chromium
62+
run: pnpm --filter '@will-be-done/hyperdb' exec playwright install --with-deps chromium
5163

5264
- name: Test
53-
run: bun run test
65+
run: pnpm run test
5466

5567
- name: Check import cycles
56-
run: bun run lint:cycles
68+
run: pnpm run lint:cycles
5769

5870
hyperdb-doc:
5971
runs-on: ubuntu-latest
@@ -63,12 +75,18 @@ jobs:
6375
with:
6476
persist-credentials: false
6577

66-
- uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6
78+
- uses: pnpm/action-setup@v4
79+
with:
80+
version: 11.8.0
81+
82+
- uses: actions/setup-node@v6
6783
with:
68-
bun-version: latest
84+
node-version: 24
85+
cache: pnpm
86+
cache-dependency-path: pnpm-lock.yaml
6987

7088
- name: Install dependencies
71-
run: bun install
89+
run: pnpm install --frozen-lockfile
7290

7391
- name: Build docs
74-
run: bun run --filter='@will-be-done/hyperdb-doc' build
92+
run: pnpm --filter '@will-be-done/hyperdb-doc' build

.github/workflows/release.yml

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -24,36 +24,37 @@ jobs:
2424
with:
2525
fetch-depth: 0
2626

27+
- uses: pnpm/action-setup@v4
28+
with:
29+
version: 11.8.0
30+
2731
- uses: actions/setup-node@v6
2832
with:
2933
node-version: 24
3034
registry-url: https://registry.npmjs.org
31-
package-manager-cache: false
32-
33-
- uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6
34-
with:
35-
bun-version: latest
35+
cache: pnpm
36+
cache-dependency-path: pnpm-lock.yaml
3637

3738
- name: Install dependencies
38-
run: bun install --frozen-lockfile
39+
run: pnpm install --frozen-lockfile
3940

4041
- name: Check formatting
41-
run: bun run format:check
42+
run: pnpm run format:check
4243

4344
- name: Lint
44-
run: bun run lint
45+
run: pnpm run lint
4546

4647
- name: TypeCheck
47-
run: bun run ts
48+
run: pnpm run ts
4849

4950
- name: Install Playwright browsers
50-
run: cd packages/hyperdb && bun run playwright install --with-deps chromium
51+
run: pnpm --filter '@will-be-done/hyperdb' exec playwright install --with-deps chromium
5152

5253
- name: Test
53-
run: bun run test
54+
run: pnpm run test
5455

5556
- name: Check import cycles
56-
run: bun run lint:cycles
57+
run: pnpm run lint:cycles
5758

5859
- name: Check release state
5960
id: release-state
@@ -75,8 +76,8 @@ jobs:
7576
if: steps.release-state.outputs.has_changesets == 'true' || steps.release-state.outputs.package_exists == 'true'
7677
uses: changesets/action@v1
7778
with:
78-
version: bun run version-packages
79-
publish: bun run release
79+
version: pnpm run version-packages
80+
publish: pnpm run release
8081
title: Version packages
8182
commit: Version packages
8283
env:

bun.lock

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

package.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"author": "quolpr",
55
"private": true,
66
"license": "MIT",
7-
"packageManager": "bun@1.3.14",
7+
"packageManager": "pnpm@11.8.0",
88
"repository": {
99
"type": "git",
1010
"url": "git+https://github.com/will-be-done/hyperdb.git"
@@ -13,15 +13,15 @@
1313
"packages/*"
1414
],
1515
"scripts": {
16-
"build": "bun run --filter='@will-be-done/hyperdb' build && bun run --filter='@will-be-done/hyperdb-devtool' build && bun run --filter='@will-be-done/hyperdb-doc' build",
16+
"build": "pnpm --filter '@will-be-done/hyperdb' build && pnpm --filter '@will-be-done/hyperdb-devtool' build && pnpm --filter '@will-be-done/hyperdb-doc' build",
1717
"changeset": "changeset",
1818
"format": "prettier --write .",
1919
"format:check": "prettier --check .",
20-
"lint": "bun run --filter='@will-be-done/hyperdb' lint && bun run --filter='@will-be-done/hyperdb-devtool' lint",
21-
"lint:cycles": "bun run --filter='@will-be-done/hyperdb' lint:cycles && bun run --filter='@will-be-done/hyperdb-devtool' lint:cycles",
22-
"release": "bun run --filter='@will-be-done/hyperdb' build && bun run --filter='@will-be-done/hyperdb-devtool' build && changeset publish",
23-
"test": "bun run --filter='@will-be-done/hyperdb' test && bun run --filter='@will-be-done/hyperdb-devtool' test",
24-
"ts": "bun run --filter='@will-be-done/hyperdb' ts && bun run --filter='@will-be-done/hyperdb-devtool' ts",
20+
"lint": "pnpm --filter '@will-be-done/hyperdb' lint && pnpm --filter '@will-be-done/hyperdb-devtool' lint",
21+
"lint:cycles": "pnpm --filter '@will-be-done/hyperdb' lint:cycles && pnpm --filter '@will-be-done/hyperdb-devtool' lint:cycles",
22+
"release": "pnpm --filter '@will-be-done/hyperdb' build && pnpm --filter '@will-be-done/hyperdb-devtool' build && changeset publish",
23+
"test": "pnpm --filter '@will-be-done/hyperdb' test && pnpm --filter '@will-be-done/hyperdb-devtool' test",
24+
"ts": "pnpm --filter '@will-be-done/hyperdb' ts && pnpm --filter '@will-be-done/hyperdb-devtool' ts",
2525
"version-packages": "changeset version"
2626
},
2727
"devDependencies": {
Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1-
import js from '@eslint/js'
2-
import globals from 'globals'
3-
import reactHooks from 'eslint-plugin-react-hooks'
4-
import reactRefresh from 'eslint-plugin-react-refresh'
5-
import tseslint from 'typescript-eslint'
6-
import { defineConfig, globalIgnores } from 'eslint/config'
1+
import js from "@eslint/js";
2+
import globals from "globals";
3+
import reactHooks from "eslint-plugin-react-hooks";
4+
import reactRefresh from "eslint-plugin-react-refresh";
5+
import tseslint from "typescript-eslint";
6+
import { defineConfig, globalIgnores } from "eslint/config";
77

88
export default defineConfig([
9-
globalIgnores(['dist']),
9+
globalIgnores(["dist"]),
1010
{
11-
files: ['**/*.{ts,tsx}'],
11+
files: ["**/*.{ts,tsx}"],
1212
extends: [
1313
js.configs.recommended,
1414
tseslint.configs.recommended,
@@ -19,4 +19,4 @@ export default defineConfig([
1919
globals: globals.browser,
2020
},
2121
},
22-
])
22+
]);

packages/hyperdb-demo/tsconfig.app.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,7 @@
2323
"@will-be-done/hyperdb/drivers/idb": [
2424
"../hyperdb/src/hyperdb/drivers/idb/idb-driver.ts"
2525
],
26-
"@will-be-done/hyperdb-devtool/react": [
27-
"../hyperdb-devtool/src/react.ts"
28-
]
26+
"@will-be-done/hyperdb-devtool/react": ["../hyperdb-devtool/src/react.ts"]
2927
},
3028
"moduleResolution": "bundler",
3129
"allowImportingTsExtensions": true,

packages/hyperdb-devtool/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,12 @@
2121
"build": "vite build && tsc",
2222
"lint": "eslint .",
2323
"lint:cycles": "depcruise src --config .dependency-cruiser.cjs",
24-
"prepack": "bun run build",
24+
"prepack": "pnpm run build",
2525
"ts": "tsc",
2626
"test": "vitest run"
2727
},
2828
"dependencies": {
29-
"@will-be-done/hyperdb": "0.0.0",
29+
"@will-be-done/hyperdb": "workspace:*",
3030
"goober": "^2.1.18"
3131
},
3232
"peerDependencies": {

packages/hyperdb-doc/README.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
[![Built with Starlight](https://astro.badg.es/v2/built-with-starlight/tiny.svg)](https://starlight.astro.build)
44

55
```
6-
bun create astro@latest -- --template starlight
6+
pnpm create astro@latest --template starlight
77
```
88

99
> 🧑‍🚀 **Seasoned astronaut?** Delete this file. Have fun!
@@ -35,14 +35,14 @@ Static assets, like favicons, can be placed in the `public/` directory.
3535

3636
All commands are run from the root of the project, from a terminal:
3737

38-
| Command | Action |
39-
| :-------------------- | :----------------------------------------------- |
40-
| `bun install` | Installs dependencies |
41-
| `bun dev` | Starts local dev server at `localhost:4321` |
42-
| `bun build` | Build your production site to `./dist/` |
43-
| `bun preview` | Preview your build locally, before deploying |
44-
| `bun astro ...` | Run CLI commands like `astro add`, `astro check` |
45-
| `bun astro -- --help` | Get help using the Astro CLI |
38+
| Command | Action |
39+
| :--------------------- | :----------------------------------------------- |
40+
| `pnpm install` | Installs dependencies |
41+
| `pnpm dev` | Starts local dev server at `localhost:4321` |
42+
| `pnpm build` | Build your production site to `./dist/` |
43+
| `pnpm preview` | Preview your build locally, before deploying |
44+
| `pnpm astro ...` | Run CLI commands like `astro add`, `astro check` |
45+
| `pnpm astro -- --help` | Get help using the Astro CLI |
4646

4747
## 👀 Want to learn more?
4848

packages/hyperdb/devtool.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -209,9 +209,9 @@ Tests:
209209
Validation:
210210

211211
- Run these from apps/hyperdb-lib:
212-
- bun run test
213-
- bun run ts
214-
- bun run build
212+
- pnpm run test
213+
- pnpm run ts
214+
- pnpm run build
215215
- Fix all failures caused by the implementation.
216216
- Do not run formatters that rewrite unrelated files.
217217
- Do not modify unrelated dirty files such as todo.md.

0 commit comments

Comments
 (0)