Skip to content

Commit 865eea0

Browse files
Feat/intorg 411 use pnpm locally (#44)
## Summary Migrated local development and CMS tooling from Bun to pnpm, and removed remaining Bun references from docs, templates, config comments, and workflow steps to keep the repo consistent. ## Related Issue Fixes INTORG-411 ## Manual Test 1. From repo root: `pnpm install && pnpm run format && pnpm run lint && pnpm run build` ## Checks - [x] `pnpm run format` - [x] `pnpm run lint` ## PR Checklist - [x] PR title follows Conventional Commits (e.g. `feat: ...`, `fix: ...`) - [x] Linked issue included
1 parent 94718d5 commit 865eea0

24 files changed

Lines changed: 28079 additions & 49641 deletions

.env.example

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Server (generate with: bun -e "console.log('APP_KEYS=' + ...)" etc. - see cms/README.md)
1+
# Server (generate with: pnpm dlx tsx -e "console.log('APP_KEYS=' + ...)" etc. - see cms/README.md)
22
APP_KEYS=...
33
API_TOKEN_SALT=...
44
ADMIN_JWT_SECRET=...

.github/copilot-instructions.md

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ This repository contains **interledger.org** – the official Interledger Founda
66

77
**Repository Size**: Medium (~600 files, ~3MB)
88
**Primary Language**: TypeScript/JavaScript (Astro components, MDX, config files)
9-
**Package Manager**: Bun (v1.3.3+)
10-
**Lockfile**: `bun.lock` (Bun v1 uses a text lockfile; no `bun.lockb`)
9+
**Package Manager**: pnpm
10+
**Lockfile**: `pnpm-lock.yaml`
1111
**Node Requirement**: Node.js >=18.20.8 (critical - 18.19.1 is insufficient)
1212
**Development Port**: localhost:1103
1313

@@ -16,37 +16,37 @@ This repository contains **interledger.org** – the official Interledger Founda
1616
### Prerequisites
1717
Ensure these are installed before running any commands:
1818
- **Node.js**: >=18.20.8 (NOT 18.19.1). Check with `node --version`. If using nvm, ensure .nvmrc is respected.
19-
- **Bun**: Any recent version (verify with `bun --version`)
19+
- **pnpm**: Any recent version (verify with `pnpm --version`)
2020

2121
### Essential Commands (must run in repository root)
2222

2323
| Command | Purpose | Duration | Notes |
2424
|---------|---------|----------|-------|
25-
| `bun install` | Install dependencies | ~30s | Always run before build/start |
26-
| `bun run start` | Start dev server | - | Runs on localhost:1103 |
27-
| `bun run build` | Build production site to ./dist/ | ~30-45s | **Will fail with Node < 18.20.8** |
28-
| `bun run lint` | Check code formatting and linting | ~20-30s | Fails if ANY ESLint warnings exist |
29-
| `bun run format` | Auto-fix formatting and run lint | ~30-40s | Fixes Prettier issues; some warnings may remain |
30-
| `bun run preview` | Preview the built site locally | - | Run `bun run build` first |
25+
| `pnpm install` | Install dependencies | ~30s | Always run before build/start |
26+
| `pnpm run start` | Start dev server | - | Runs on localhost:1103 |
27+
| `pnpm run build` | Build production site to ./dist/ | ~30-45s | **Will fail with Node < 18.20.8** |
28+
| `pnpm run lint` | Check code formatting and linting | ~20-30s | Fails if ANY ESLint warnings exist |
29+
| `pnpm run format` | Auto-fix formatting and run lint | ~30-40s | Fixes Prettier issues; some warnings may remain |
30+
| `pnpm run preview` | Preview the built site locally | - | Run `pnpm run build` first |
3131

3232
### CI Validation Pipeline
3333

3434
The GitHub Actions workflow (`.github/workflows/test-build.yml`) runs on every PR:
3535
1. Checkout code
3636
2. Setup Node.js (v18)
37-
3. Setup Bun
38-
4. `bun install`
39-
5. **`bun run lint`** – Must pass with zero warnings
40-
6. **`bun run build`** – Must succeed
37+
3. Setup pnpm
38+
4. `pnpm install`
39+
5. **`pnpm run lint`** – Must pass with zero warnings
40+
6. **`pnpm run build`** – Must succeed
4141

42-
**To replicate CI locally**: Run `bun install && bun run lint && bun run build`. Both lint and build must pass with no output errors.
42+
**To replicate CI locally**: Run `pnpm install && pnpm run lint && pnpm run build`. Both lint and build must pass with no output errors.
4343

4444
### Important Caveats
4545

4646
- **Node Version**: The system may have multiple Node versions. If build fails with "Node.js vX.X.X is not supported by Astro", upgrade to >=18.20.8. The .nvmrc specifies `lts/iron` (Node 20), which is recommended.
47-
- **Linting Warnings**: The repository has existing ESLint warnings in `cms/src/api/page/content-types/page/lifecycles.ts` that cause lint to fail. These are pre-existing and are not blocking the build itself – only linting checks. `bun run format` will attempt to fix issues but may not resolve all warnings.
48-
- **Package Manager**: Do NOT use npm or yarn. Only use Bun for this project.
49-
- **Bun Lockfile**: Netlify or scripts may expect `bun.lockb`, but Bun v1 generates `bun.lock` only. Update checks or docs if needed.
47+
- **Linting Warnings**: The repository has existing ESLint warnings in `cms/src/api/page/content-types/page/lifecycles.ts` that cause lint to fail. These are pre-existing and are not blocking the build itself – only linting checks. `pnpm run format` will attempt to fix issues but may not resolve all warnings.
48+
- **Package Manager**: Only use pnpm for this project.
49+
- **Lockfile**: Keep `pnpm-lock.yaml` committed so CI and local installs stay deterministic.
5050

5151
## Project Layout and Architecture
5252

@@ -74,7 +74,7 @@ The GitHub Actions workflow (`.github/workflows/test-build.yml`) runs on every P
7474
│ ├── config/ # Strapi configuration
7575
│ ├── scripts/ # MDX generation scripts
7676
│ ├── public/uploads/ # Uploaded media
77-
│ └── package.json # CMS dependencies (npm)
77+
│ └── package.json # CMS dependencies (pnpm)
7878
├── public/ # Static assets
7979
│ ├── img/ # Images (organized by section/date)
8080
│ ├── documents/ # PDFs and docs
@@ -124,22 +124,22 @@ The GitHub Actions workflow (`.github/workflows/test-build.yml`) runs on every P
124124

125125
## Known Issues and Workarounds
126126

127-
1. **ESLint warnings in CMS**: The file `cms/src/api/page/content-types/page/lifecycles.ts` contains warnings about unused variables and `any` types. These exist in the repo and are pre-existing. They do not block the build but do prevent `bun run lint` from passing.
127+
1. **ESLint warnings in CMS**: The file `cms/src/api/page/content-types/page/lifecycles.ts` contains warnings about unused variables and `any` types. These exist in the repo and are pre-existing. They do not block the build but do prevent `pnpm run lint` from passing.
128128

129129
2. **Node version mismatch in CI**: The GitHub Actions workflow uses Node 18, but newer patch versions (>=18.20.8) are required. The workflow's `actions/setup-node@v3` should install a compatible patch version automatically.
130130

131131
3. **Translation structure commented out**: `src/config` in astro.config.mjs has an i18n config block commented with TODO. Do not enable without understanding the full routing implications.
132132

133-
4. **Formatters**: Prettier and ESLint run together. `bun run format` runs Prettier, then ESLint with auto-fix. Some ESLint warnings may remain unfixed and require manual intervention.
133+
4. **Formatters**: Prettier and ESLint run together. `pnpm run format` runs Prettier, then ESLint with auto-fix. Some ESLint warnings may remain unfixed and require manual intervention.
134134

135135
## CMS Information
136136

137-
The CMS (Strapi v5.31.3) runs independently and uses **npm** (not Bun):
137+
The CMS (Strapi v5.31.3) runs independently and uses **pnpm**:
138138
```bash
139139
cd cms
140-
npm install
141-
npm run develop # Runs on localhost:1337/admin
142-
npm run build # Production build
140+
pnpm install
141+
pnpm run develop # Runs on localhost:1337/admin
142+
pnpm run build # Production build
143143
```
144144

145145
Content published in the CMS automatically generates MDX files in `src/content/foundation-pages/` via lifecycle hooks. MDX generation is handled by `cms/scripts/sync-mdx.cjs`.
@@ -151,12 +151,12 @@ CMS code changes are deployed to the Strapi VM when merged to `staging`. Content
151151
## Making Changes
152152

153153
When making changes to Astro components, pages, or styles:
154-
1. Run `bun run start` to start the dev server (hot reload enabled)
154+
1. Run `pnpm run start` to start the dev server (hot reload enabled)
155155
2. Make changes in `src/`
156156
3. Test locally at localhost:1103
157-
4. Before committing, run `bun run format` to fix formatting issues
157+
4. Before committing, run `pnpm run format` to fix formatting issues
158158
5. If format fails due to ESLint warnings, address warnings manually (check files listed in format output)
159-
6. Verify `bun run build` succeeds (no output errors)
159+
6. Verify `pnpm run build` succeeds (no output errors)
160160

161161
For content changes (MDX files), they are hot-reloaded during dev. For navigation changes, edit `src/config/navigation.json` and verify the sidebar updates correctly.
162162

@@ -174,7 +174,7 @@ These files are auto-generated or have special constraints and should not be man
174174

175175
This guide contains validated information about the build process, commands, and known issues. If a command fails:
176176
1. Check if Node version is >=18.20.8
177-
2. Verify you ran `bun install` first
177+
2. Verify you ran `pnpm install` first
178178
3. Check the command in the table above for expected duration/behavior
179179
4. Review the known issues section if the failure is pre-existing
180180

.github/pull_request_template.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99

1010
## Checks
1111

12-
- [ ] `bun run format`
13-
- [ ] `bun run lint`
12+
- [ ] `pnpm run format`
13+
- [ ] `pnpm run lint`
1414

1515
## PR Checklist
1616

.github/workflows/lint.yml

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,16 @@ jobs:
1111

1212
steps:
1313
- uses: actions/checkout@v4
14-
14+
15+
- uses: pnpm/action-setup@v4
16+
with:
17+
version: 10
18+
1519
- uses: actions/setup-node@v4
1620
with:
1721
node-version: 18
18-
cache: npm
22+
cache: pnpm
23+
24+
- run: pnpm install --no-frozen-lockfile
1925

20-
- run: npm ci
21-
22-
- run: npm run lint
26+
- run: pnpm run lint

.github/workflows/main-merge.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,9 @@ jobs:
5959
# Stops the service while we are busy
6060
sudo systemctl stop strapi.service
6161
# Perform installs in case there are new dependencies from the merged PRs
62-
bun install
62+
pnpm install
6363
# Rebuild with more memory to avoid OOM errors during build
64-
NODE_OPTIONS="--max-old-space-size=4096" bun run build
64+
NODE_OPTIONS="--max-old-space-size=4096" pnpm run build
6565
sudo systemctl start strapi.service
6666
sleep 5
6767
sudo systemctl status strapi.service

.gitignore

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,8 @@ dist/
88
node_modules/
99

1010
# logs
11-
npm-debug.log*
12-
yarn-debug.log*
11+
*-debug.log*
1312
yarn-error.log*
14-
pnpm-debug.log*
1513

1614
# environment variables
1715
.env
@@ -23,10 +21,6 @@ pnpm-debug.log*
2321
# macOS-specific files
2422
.DS_Store
2523

26-
# lock files
27-
# bun.lock # Netlify needs this file to detect the package manager, so we keep it in the repo
28-
pnpm-lock.yaml
29-
3024
# webstorm
3125
.idea/
3226

README.md

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@ The official [Interledger.org](https://interledger.org/) website built with [Ast
66

77
```bash
88
# Install dependencies
9-
bun install
9+
pnpm install
1010

1111
# Start dev server (localhost:1103)
12-
bun run start
12+
pnpm run start
1313

1414
# Build for production
15-
bun run build
15+
pnpm run build
1616
```
1717

1818
## Architecture Overview
@@ -100,20 +100,20 @@ flowchart
100100

101101
## Commands
102102

103-
| Command | Action |
104-
| :---------------- | :----------------------------------- |
105-
| `bun run start` | Start dev server at `localhost:1103` |
106-
| `bun run build` | Build production site to `./dist/` |
107-
| `bun run preview` | Preview production build locally |
108-
| `bun run format` | Format code with Prettier/ESLint |
109-
| `bun run lint` | Check code formatting and linting |
103+
| Command | Action |
104+
| :----------------- | :----------------------------------- |
105+
| `pnpm run start` | Start dev server at `localhost:1103` |
106+
| `pnpm run build` | Build production site to `./dist/` |
107+
| `pnpm run preview` | Preview production build locally |
108+
| `pnpm run format` | Format code with Prettier/ESLint |
109+
| `pnpm run lint` | Check code formatting and linting |
110110

111111
## CMS
112112

113113
```bash
114114
cd cms
115-
npm install
116-
npm run develop
115+
pnpm install
116+
pnpm run develop
117117
```
118118

119119
Admin panel: <http://localhost:1337/admin>
@@ -135,14 +135,14 @@ Why this was added:
135135
Default MDX output locations:
136136

137137
- Pages: `src/content/foundation-pages/` (localized pages: `src/content/{locale}/foundation-pages/`)
138-
- Blog posts: `src/content/blog/`
138+
- Blog posts: `src/content/foundation-blog-posts/`
139139
- Grant tracks: `src/content/grants/`
140140

141141
### 🔍 Code Formatting
142142

143143
This project uses [ESLint](https://eslint.org/) for code linting and [Prettier](https://prettier.io/) for code formatting. Before submitting a pull request, please ensure your code is properly formatted:
144144

145-
1. **Fix issues**: Run `bun run format` to automatically format code and fix linting issues
146-
2. **Check before pushing**: Run `bun run lint` to verify everything passes (CI will also run this)
145+
1. **Fix issues**: Run `pnpm run format` to automatically format code and fix linting issues
146+
2. **Check before pushing**: Run `pnpm run lint` to verify everything passes (CI will also run this)
147147

148148
ESLint is configured to work with TypeScript and Astro files. The configuration extends recommended rules from ESLint, TypeScript ESLint, and Astro ESLint plugins, and integrates with Prettier to avoid conflicts.

0 commit comments

Comments
 (0)