Skip to content

Commit a88c8c0

Browse files
committed
chore: migrate from Bun to pnpm for package management
- Removed Bun-related files and configurations, including bun.lock and bunfig.toml. - Updated all scripts and documentation to use pnpm commands instead of Bun. - Adjusted CI workflows to set up pnpm and install dependencies accordingly. - Cleaned up .gitignore to exclude Bun-specific files. - Enhanced README and contributing guidelines to reflect the transition to pnpm.
1 parent 21b00f5 commit a88c8c0

51 files changed

Lines changed: 8180 additions & 1966 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.changeset/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ We have a quick list of common questions to get you started engaging with this p
1212
To add a changeset, run:
1313

1414
```bash
15-
bun changeset
15+
pnpm changeset
1616
```
1717

1818
This will prompt you to:
@@ -25,6 +25,6 @@ This will prompt you to:
2525
When ready to release:
2626

2727
```bash
28-
bun version-packages # Updates versions and changelogs
29-
bun release # Publishes to npm
28+
pnpm run version-packages # Updates versions and changelogs
29+
pnpm run release # Publishes to npm
3030
```

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ What actually happened.
3636

3737
- Package version:
3838
- Node.js version:
39-
- Runtime: [e.g., Bun, Node.js, Browser]
39+
- Runtime: [e.g., Node.js, Browser]
4040
- Framework: [e.g., Next.js, Vite, Remix]
4141
- OS: [e.g., macOS, Windows, Linux]
4242

.github/workflows/ci.yml

Lines changed: 24 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -19,22 +19,28 @@ jobs:
1919
- name: Checkout
2020
uses: actions/checkout@v4
2121

22-
- name: Setup Bun
23-
uses: oven-sh/setup-bun@v2
22+
- name: Setup pnpm
23+
uses: pnpm/action-setup@v4
2424
with:
25-
bun-version: latest
25+
version: 10.11.1
26+
27+
- name: Setup Node.js
28+
uses: actions/setup-node@v4
29+
with:
30+
node-version: 20
31+
cache: pnpm
2632

2733
- name: Install dependencies
28-
run: bun install
34+
run: pnpm install --frozen-lockfile
2935

3036
- name: Build packages
31-
run: bun run build
37+
run: pnpm run build
3238

3339
- name: Type check
34-
run: bun run typecheck
40+
run: pnpm run typecheck
3541

3642
- name: Run tests
37-
run: bun run test
43+
run: pnpm run test
3844

3945
lint:
4046
name: Lint
@@ -44,14 +50,20 @@ jobs:
4450
- name: Checkout
4551
uses: actions/checkout@v4
4652

47-
- name: Setup Bun
48-
uses: oven-sh/setup-bun@v2
53+
- name: Setup pnpm
54+
uses: pnpm/action-setup@v4
55+
with:
56+
version: 10.11.1
57+
58+
- name: Setup Node.js
59+
uses: actions/setup-node@v4
4960
with:
50-
bun-version: latest
61+
node-version: 20
62+
cache: pnpm
5163

5264
- name: Install dependencies
53-
run: bun install
65+
run: pnpm install --frozen-lockfile
5466

5567
- name: Lint
56-
run: bun run lint
68+
run: pnpm run lint
5769
continue-on-error: true

.github/workflows/release.yml

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,29 +22,30 @@ jobs:
2222
- name: Checkout
2323
uses: actions/checkout@v4
2424

25-
- name: Setup Bun
26-
uses: oven-sh/setup-bun@v2
25+
- name: Setup pnpm
26+
uses: pnpm/action-setup@v4
2727
with:
28-
bun-version: latest
28+
version: 10.11.1
2929

3030
- name: Setup Node.js
3131
uses: actions/setup-node@v4
3232
with:
3333
node-version: 20
3434
registry-url: 'https://registry.npmjs.org'
35+
cache: pnpm
3536

3637
- name: Install dependencies
37-
run: bun install
38+
run: pnpm install --frozen-lockfile
3839

3940
- name: Build packages
40-
run: bun run build
41+
run: pnpm run build
4142

4243
- name: Create Release Pull Request or Publish
4344
id: changesets
4445
uses: changesets/action@v1
4546
with:
46-
version: bun run version-packages
47-
publish: bun run release:ci
47+
version: pnpm run version-packages
48+
publish: pnpm run release:ci
4849
title: 'chore: release packages'
4950
commit: 'chore: release packages'
5051
env:

.gitignore

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,6 @@ node_modules/
44
# Build output
55
dist/
66

7-
# Bun
8-
bun.lockb
9-
107
# IDE
118
.idea/
129
.vscode/

CONTRIBUTING.md

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Please read and follow our [Code of Conduct](./CODE_OF_CONDUCT.md).
88

99
## Monorepo Structure
1010

11-
This project is a monorepo managed with [Turborepo](https://turbo.build/) and [Bun](https://bun.sh/).
11+
This project is a monorepo managed with [Turborepo](https://turbo.build/) and [pnpm](https://pnpm.io/).
1212

1313
```
1414
create-markdown/
@@ -23,7 +23,7 @@ create-markdown/
2323

2424
## Prerequisites
2525

26-
- [Bun](https://bun.sh/) v1.0.0+
26+
- [pnpm](https://pnpm.io/) v10+
2727
- [Node.js](https://nodejs.org/) 20+
2828

2929
## Getting Started
@@ -38,25 +38,25 @@ create-markdown/
3838
2. **Install dependencies**
3939

4040
```bash
41-
bun install
41+
pnpm install
4242
```
4343

4444
3. **Build all packages**
4545

4646
```bash
47-
bun run build
47+
pnpm run build
4848
```
4949

5050
4. **Run tests**
5151

5252
```bash
53-
bun run test
53+
pnpm run test
5454
```
5555

5656
5. **Run the playground**
5757

5858
```bash
59-
bun run playground
59+
pnpm run playground
6060
```
6161

6262
## Development Workflow
@@ -68,32 +68,32 @@ Each package can be developed independently:
6868
```bash
6969
# Build a specific package
7070
cd packages/core
71-
bun run build
71+
pnpm run build
7272

7373
# Watch mode
74-
bun run dev
74+
pnpm run dev
7575

7676
# Run package tests
77-
bun run test
77+
pnpm run test
7878
```
7979

8080
### Available Scripts
8181

8282
| Script | Description |
8383
|--------|-------------|
84-
| `bun run build` | Build all packages |
85-
| `bun run test` | Run all tests |
86-
| `bun run typecheck` | Type check all packages |
87-
| `bun run lint` | Lint all packages |
88-
| `bun run clean` | Clean all build artifacts |
89-
| `bun run playground` | Run the demo playground |
84+
| `pnpm run build` | Build all packages |
85+
| `pnpm run test` | Run all tests |
86+
| `pnpm run typecheck` | Type check all packages |
87+
| `pnpm run lint` | Lint all packages |
88+
| `pnpm run clean` | Clean all build artifacts |
89+
| `pnpm run playground` | Run the demo playground |
9090

9191
### Adding a Changeset
9292

9393
When making changes that should be released, add a changeset:
9494

9595
```bash
96-
bun changeset
96+
pnpm changeset
9797
```
9898

9999
This will prompt you to:
@@ -180,15 +180,15 @@ docs(react): add useBlockEditor examples
180180
3. **Run checks locally**
181181

182182
```bash
183-
bun run build
184-
bun run typecheck
185-
bun run test
183+
pnpm run build
184+
pnpm run typecheck
185+
pnpm run test
186186
```
187187

188188
4. **Add a changeset** (if applicable)
189189

190190
```bash
191-
bun changeset
191+
pnpm changeset
192192
```
193193

194194
5. **Push and create a PR**
@@ -236,7 +236,7 @@ export function parse(
236236

237237
- 2-space indentation
238238
- Single quotes for strings
239-
- No semicolons (Bun style)
239+
- No semicolons
240240
- Max line length: 100 characters
241241

242242
### File Organization
@@ -275,17 +275,17 @@ We use [Vitest](https://vitest.dev/) for testing.
275275

276276
```bash
277277
# Run all tests
278-
bun run test
278+
pnpm run test
279279

280280
# Run tests for a specific package
281281
cd packages/core
282-
bun run test
282+
pnpm run test
283283

284284
# Watch mode
285-
bun run test:watch
285+
pnpm run test:watch
286286

287287
# With coverage
288-
bun run test -- --coverage
288+
pnpm run test -- --coverage
289289
```
290290

291291
### Writing Tests

INTEGRATION.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -49,35 +49,35 @@ Install only what you need for smaller bundle sizes:
4949

5050
```bash
5151
# Core only (parsing/serialization)
52-
bun add @create-markdown/core
52+
pnpm add @create-markdown/core
5353
# or
5454
npm install @create-markdown/core
5555

5656
# With React support
57-
bun add @create-markdown/core @create-markdown/react
57+
pnpm add @create-markdown/core @create-markdown/react
5858
# or
5959
npm install @create-markdown/core @create-markdown/react
6060

6161
# With HTML preview (for non-React projects or SSG)
62-
bun add @create-markdown/core @create-markdown/preview
62+
pnpm add @create-markdown/core @create-markdown/preview
6363
# or
6464
npm install @create-markdown/core @create-markdown/preview
6565

6666
# With syntax highlighting and diagrams
67-
bun add @create-markdown/core @create-markdown/preview shiki mermaid
67+
pnpm add @create-markdown/core @create-markdown/preview shiki mermaid
6868
```
6969

7070
### Convenience Bundle
7171

7272
For projects that need everything:
7373

7474
```bash
75-
bun add create-markdown
75+
pnpm add create-markdown
7676
# or
7777
npm install create-markdown
7878

7979
# With optional peer dependencies
80-
bun add create-markdown react shiki mermaid
80+
pnpm add create-markdown react shiki mermaid
8181
```
8282

8383
---
@@ -89,7 +89,7 @@ bun add create-markdown react shiki mermaid
8989
#### Installation
9090

9191
```bash
92-
bun add @create-markdown/core @create-markdown/react
92+
pnpm add @create-markdown/core @create-markdown/react
9393
```
9494

9595
#### Client Components
@@ -961,13 +961,13 @@ Some packages have optional peer dependencies:
961961

962962
```bash
963963
# If using syntax highlighting with @create-markdown/preview
964-
bun add shiki
964+
pnpm add shiki
965965

966966
# If using Mermaid diagrams
967-
bun add mermaid
967+
pnpm add mermaid
968968

969969
# If using @create-markdown/react
970-
bun add react react-dom
970+
pnpm add react react-dom
971971
```
972972

973973
### TypeScript Path Resolution

README.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,12 @@ Lightweight, block-based markdown solution (_zero dependencies_). Parse, create,
3333
## Installation
3434
```bash
3535
# Install individual packages (recommended)
36-
bun add @create-markdown/core
37-
bun add @create-markdown/react
38-
bun add @create-markdown/preview
36+
pnpm add @create-markdown/core
37+
pnpm add @create-markdown/react
38+
pnpm add @create-markdown/preview
3939

4040
# Or install the convenience bundle
41-
bun add create-markdown
41+
pnpm add create-markdown
4242
```
4343

4444
## Quick Start
@@ -208,19 +208,19 @@ registerPreviewElement({ shadowMode: 'none' });
208208

209209
```bash
210210
# Install dependencies
211-
bun install
211+
pnpm install
212212

213213
# Build all packages
214-
bun run build
214+
pnpm run build
215215

216216
# Run tests
217-
bun run test
217+
pnpm run test
218218

219219
# Type check
220-
bun run typecheck
220+
pnpm run typecheck
221221

222222
# Run the playground
223-
bun run playground
223+
pnpm run playground
224224
```
225225

226226
## Monorepo Structure

0 commit comments

Comments
 (0)