Skip to content

Commit 7b66ea0

Browse files
committed
Switch CI and docs to Bun so the lockfile can't drift again
This PR's dependency bump updated bun.lock but not package-lock.json, so npm ci failed on a manifest/lockfile mismatch and CI never ran. The repo only ever used bun.lock in practice — bun was already the working package manager, npm was vestigial and had already drifted once. Rather than regenerate a second lockfile that can drift the same way next time, drop it and standardize CI, README, CONTRIBUTING, and the PR template on Bun. Verified locally: bun install --frozen-lockfile, bun run lint, bun run test (161 passed), and bun run build all pass. Note bun test invokes Bun's own test runner, not Vitest, so docs use `bun run test` to hit the actual package.json script. Refs #13
1 parent 5e88b66 commit 7b66ea0

5 files changed

Lines changed: 28 additions & 6828 deletions

File tree

‎.github/PULL_REQUEST_TEMPLATE.md‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@
2424

2525
## Checklist
2626

27-
- [ ] `npm run lint` passes
28-
- [ ] `npm test` passes
29-
- [ ] `npm run build` passes (includes typecheck)
27+
- [ ] `bun run lint` passes
28+
- [ ] `bun run test` passes
29+
- [ ] `bun run build` passes (includes typecheck)
3030
- [ ] New logic in `src/lib/` has colocated unit tests
3131
- [ ] I kept the change focused on a single concern

‎.github/workflows/ci.yml‎

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,19 +11,18 @@ jobs:
1111
steps:
1212
- uses: actions/checkout@v4
1313

14-
- uses: actions/setup-node@v4
14+
- uses: oven-sh/setup-bun@v2
1515
with:
16-
node-version: 22
17-
cache: npm
16+
bun-version: latest
1817

1918
- name: Install dependencies
20-
run: npm ci
19+
run: bun install --frozen-lockfile
2120

2221
- name: Lint
23-
run: npm run lint
22+
run: bun run lint
2423

2524
- name: Test
26-
run: npm test
25+
run: bun run test
2726

2827
- name: Build
29-
run: npm run build
28+
run: bun run build

‎CONTRIBUTING.md‎

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@ the conventions the codebase follows, and what to expect from the review process
99
2. Install dependencies and start the dev server:
1010

1111
```sh
12-
npm install
13-
npm run dev
12+
bun install
13+
bun run dev
1414
```
1515

16-
Requires Node.js 20+. The dev server proxies API calls to
16+
Requires [Bun](https://bun.sh) 1.1+. The dev server proxies API calls to
1717
`https://node.gitlawb.com` — no backend setup needed.
1818

1919
3. Create a branch off `main` for your change:
@@ -27,12 +27,12 @@ the conventions the codebase follows, and what to expect from the review process
2727
Run the full check suite locally — CI runs the same three commands:
2828

2929
```sh
30-
npm run lint
31-
npm test
32-
npm run build
30+
bun run lint
31+
bun run test
32+
bun run build
3333
```
3434

35-
All three must pass. `npm run build` includes the TypeScript project build
35+
All three must pass. `bun run build` includes the TypeScript project build
3636
(`tsc -b`), so type errors fail there.
3737

3838
### Editing the security headers

‎README.md‎

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,13 @@ push events, straight from the node's REST API.
2323

2424
## Quick start
2525

26-
Requires Node.js 20+.
26+
Requires [Bun](https://bun.sh) 1.1+.
2727

2828
```sh
2929
git clone https://github.com/Gitlawb/node-explorer.git
3030
cd node-explorer
31-
npm install
32-
npm run dev
31+
bun install
32+
bun run dev
3333
```
3434

3535
The dev server proxies `/api/*` and `/node-info` to `https://node.gitlawb.com`
@@ -41,12 +41,12 @@ through a same-origin proxy. To point at a different node, change the proxy
4141

4242
| Command | What it does |
4343
| --- | --- |
44-
| `npm run dev` | Vite dev server with API proxy |
45-
| `npm run build` | Typecheck (`tsc -b`) + production build |
46-
| `npm test` | Run the unit test suite once (Vitest) |
47-
| `npm run test:watch` | Vitest in watch mode |
48-
| `npm run lint` | ESLint |
49-
| `npm run preview` | Serve the production build locally |
44+
| `bun run dev` | Vite dev server with API proxy |
45+
| `bun run build` | Typecheck (`tsc -b`) + production build |
46+
| `bun run test` | Run the unit test suite once (Vitest) |
47+
| `bun run test:watch` | Vitest in watch mode |
48+
| `bun run lint` | ESLint |
49+
| `bun run preview` | Serve the production build locally |
5050

5151
## Data source
5252

@@ -67,7 +67,7 @@ opt-in via an env flag (older nodes silently ignore unknown params, which would
6767
search appear to return everything):
6868

6969
```sh
70-
VITE_SERVER_SEARCH=true npm run dev
70+
VITE_SERVER_SEARCH=true bun run dev
7171
```
7272

7373
Until the flag is on, search and sort apply to the currently loaded page and the UI
@@ -99,8 +99,8 @@ parsing, language detection, API mapping/classification, TOC extraction) is cove
9999
network functions are tested against a stubbed `fetch`.
100100

101101
```sh
102-
npm test # single run
103-
npm run test:watch # watch mode
102+
bun run test # single run
103+
bun run test:watch # watch mode
104104
```
105105

106106
Tests live next to the modules they cover (`src/lib/foo.ts` → `src/lib/foo.test.ts`).

0 commit comments

Comments
 (0)