Skip to content

Commit c0be15d

Browse files
committed
Migrate project workflows and scripts to Bun
Replace Node/pnpm toolchain with Bun across CI and repo scripts. Workflows now use oven-sh/setup-bun and run bun install / bun run build / bun test; coverage action now uploads lcov.info. Update README to document Bun-based install, build, test and Biome linting. Update package.json scripts (build, dev, test, release flows), pin @types/bun, remove rimraf, and add clean/dev helpers. Adjust create-sei: add inquirer.d.ts, simplify tsconfig, add tsbuildinfo, change CLI messages and build/dev scripts. Update biome.json VCS and file includes and refresh bun.lock with dependency updates.
1 parent 3d588e8 commit c0be15d

54 files changed

Lines changed: 526 additions & 413 deletions

Some content is hidden

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

.github/workflows/checks.yml

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,21 +11,19 @@ jobs:
1111
with:
1212
fetch-depth: 0 # Fetch the full history instead of a shallow clone
1313

14-
- uses: actions/setup-node@v4
15-
with:
16-
node-version-file: '.nvmrc'
17-
18-
- name: Install pnpm
19-
uses: pnpm/action-setup@v4
14+
- uses: oven-sh/setup-bun@v2
2015

2116
- name: Install system dependencies
2217
run: sudo apt-get update && sudo apt-get install -y rsync
2318

2419
- name: Install dependencies
25-
run: pnpm install --frozen-lockfile
20+
run: bun install --frozen-lockfile
21+
22+
- name: Lint & Format Check
23+
run: bun run check
2624

2725
- name: Build All Packages
28-
run: pnpm build:all
26+
run: bun run build
2927

3028
- name: Test
31-
run: pnpm test:all
29+
run: bun test packages/*

.github/workflows/coverage.yml

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -18,32 +18,27 @@ jobs:
1818
uses: actions/checkout@v4
1919
with:
2020
fetch-depth: 0 # Fetch the full history instead of a shallow clone
21-
- name: Use Node.js
22-
uses: actions/setup-node@v4
23-
with:
24-
node-version-file: '.nvmrc'
21+
22+
- uses: oven-sh/setup-bun@v2
2523

2624
- uses: browser-actions/setup-chrome@v1
2725
- run: chrome --version
2826

29-
- name: Install pnpm
30-
uses: pnpm/action-setup@v4
31-
3227
- name: Install system dependencies
3328
run: sudo apt-get update && sudo apt-get install -y rsync
3429

3530
- name: Install dependencies
36-
run: pnpm install --frozen-lockfile
31+
run: bun install --frozen-lockfile
3732

3833
- name: Build packages
39-
run: pnpm build:all
34+
run: bun run build
4035

41-
- name: Run Jest tests
42-
run: pnpm test:coverage
36+
- name: Run tests with coverage
37+
run: bun test --coverage --coverage-reporter=lcov packages/*
4338

4439
- name: Upload coverage reports to Codecov
4540
uses: codecov/codecov-action@v4
4641
with:
47-
files: '**/coverage-final.json'
42+
files: '**/lcov.info'
4843
token: ${{ secrets.CODECOV_TOKEN }}
4944
fail_ci_if_error: true

.github/workflows/release.yml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,23 +29,22 @@ jobs:
2929
node-version: '24'
3030
registry-url: 'https://registry.npmjs.org'
3131

32-
- name: Install pnpm
33-
uses: pnpm/action-setup@v4
32+
- uses: oven-sh/setup-bun@v2
3433

3534
- name: Install system dependencies
3635
run: sudo apt-get update && sudo apt-get install -y rsync
3736

3837
- name: Install Dependencies
39-
run: pnpm install --frozen-lockfile
38+
run: bun install --frozen-lockfile
4039

4140
- name: Build Packages
42-
run: pnpm build:all
41+
run: bun run build
4342

4443
- name: Create Release Pull Request or Publish to npm
4544
id: changesets
4645
uses: changesets/action@v1
4746
with:
4847
# Release builds the packages and calls changeset publish
49-
publish: pnpm release
48+
publish: bun run release
5049
env:
5150
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

README.md

Lines changed: 22 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,20 +23,35 @@ please refer to the table below.
2323

2424
### Prerequisites
2525

26-
This project uses Yarn 4.7.0 with Corepack for package management. To get started:
26+
This project uses [Bun](https://bun.sh) for package management and testing. To get started:
2727

28-
1. **Enable Corepack** (if not already enabled):
28+
1. **Install Bun** (if not already installed):
2929
```bash
30-
corepack enable
30+
curl -fsSL https://bun.sh/install | bash
3131
```
3232

3333
2. **Install dependencies**:
3434
```bash
35-
yarn install
35+
bun install
3636
```
3737

38-
The correct Yarn version will be automatically used thanks to the `packageManager` field in `package.json` and Corepack.
39-
4038
### Building
4139

42-
To build all packages and docs, run `pnpm install` then `pnpm build:all`
40+
To build all packages, run:
41+
```bash
42+
bun run build
43+
```
44+
45+
### Testing
46+
47+
```bash
48+
bun test packages/*
49+
```
50+
51+
### Linting & Formatting
52+
53+
This project uses [Biome](https://biomejs.dev) for linting and formatting:
54+
```bash
55+
bun run check # lint + format check
56+
bun run check:fix # lint + format fix
57+
```

biome.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
{
22
"$schema": "https://biomejs.dev/schemas/2.4.5/schema.json",
33
"vcs": {
4-
"enabled": false,
4+
"enabled": true,
55
"clientKind": "git",
6-
"useIgnoreFile": false
6+
"useIgnoreFile": true
77
},
88
"files": {
99
"ignoreUnknown": false,
10-
"includes": ["packages/*/src/**/*.ts", "packages/*/tests/**/*.ts", "**/*.css", "!**/coverage", "!**/dist"]
10+
"includes": ["packages/*/src/**/*.ts", "packages/*/tests/**/*.ts", "**/*.css"]
1111
},
1212
"formatter": {
1313
"enabled": true,

bun.lock

Lines changed: 3 additions & 22 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,12 @@
77
"packages/*"
88
],
99
"scripts": {
10-
"build:all": "bun run --filter '*' build",
10+
"build": "bun run --filter '*' build",
11+
"dev": "bun run --filter '*' dev",
12+
"clean": "bun run --filter '*' clean && find . -name 'tsconfig.tsbuildinfo' -delete",
1113
"docs": "cd docs && bunx mint dev",
1214
"release": "changeset publish && git push --follow-tags",
13-
"release:internal": "bun run build:all && bunx changeset && bunx changeset version --snapshot internal && bunx changeset publish --no-git-tag --snapshot --tag internal",
15+
"release:internal": "bun run build && bunx changeset && bunx changeset version --snapshot internal && bunx changeset publish --no-git-tag --snapshot --tag internal",
1416
"test": "bun test packages/*",
1517
"test:coverage": "bun test --coverage packages/*",
1618
"lint": "biome lint .",
@@ -25,10 +27,9 @@
2527
},
2628
"devDependencies": {
2729
"@biomejs/biome": "^2.2.2",
28-
"@types/bun": "latest",
30+
"@types/bun": "^1.3.10",
2931
"@types/node": "^22.13.13",
3032
"mint": "^4.1.57",
31-
"rimraf": "^3.0.2",
3233
"typescript": "^5.8.2"
3334
}
3435
}

packages/create-sei/package.json

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,9 @@
1010
"type": "module",
1111
"bin": "./dist/main.js",
1212
"scripts": {
13-
"build": "rm -rf dist && tsc && chmod +x dist/main.js && rsync -av --exclude-from=.rsyncignore ./templates/ ./dist/templates/ && rsync -av --exclude-from=.rsyncignore ./extensions/ ./dist/extensions/",
14-
"dev": "node --loader ts-node/esm src/main.ts",
13+
"build": "tsc -b && chmod +x dist/main.js && rsync -av --exclude-from=.rsyncignore ./templates/ ./dist/templates/ && rsync -av --exclude-from=.rsyncignore ./extensions/ ./dist/extensions/",
14+
"dev": "tsc --watch",
15+
"clean": "rm -rf dist",
1516
"test": "bun test"
1617
},
1718
"dependencies": {
@@ -22,5 +23,8 @@
2223
"devDependencies": {
2324
"@types/node": "^20.14.10",
2425
"typescript": "^5.5.3"
26+
},
27+
"publishConfig": {
28+
"access": "public"
2529
}
2630
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
declare module "inquirer";

packages/create-sei/src/main.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ interface WizardOptions {
2929
extension?: string;
3030
}
3131

32-
function isValidDirectoryName(dirName) {
32+
function isValidDirectoryName(dirName: string) {
3333
const illegalRe = /[<>:"/\\|?*]/g;
3434
const windowsReservedRe = /^(con|prn|aux|nul|com[1-9]|lpt[1-9])$/i;
3535
const trailingRe = /[. ]+$/;
@@ -147,7 +147,7 @@ async function runWizard(options: WizardOptions): Promise<void> {
147147
`Project setup complete! Using template ${templateName}${extensionText}\n`,
148148
);
149149
console.log(
150-
`To start your app, run: \n > cd ${dAppName} \n > pnpm \n > pnpm dev\n`,
150+
`To start your app, run: \n > cd ${dAppName} \n > bun install \n > bun dev\n`,
151151
);
152152
}
153153

0 commit comments

Comments
 (0)