Skip to content

Commit 1bd043a

Browse files
committed
chore: migrate from yarn to bun
Replace yarn.lock with bun.lock and switch package manager to bun: package.json scripts and CI workflows now use bun (oven-sh/setup-bun, bun install --frozen-lockfile, bun run ...). The NR reusable node-audit workflow runs its bun path via package-manager: bun. npm publish steps are kept (bun has no publish). Verified locally: bun install --frozen-lockfile, build/test/lint (and bun audit where gated) pass; bun.lock is consistent (frozen install reports no changes). Signed-off-by: Sebastian Mendel <info@sebastianmendel.de>
1 parent 3483206 commit 1bd043a

16 files changed

Lines changed: 572 additions & 1630 deletions

.devcontainer/devcontainer.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,10 @@
55
"workspaceFolder": "/app",
66
"remoteUser": "node",
77
"workspaceMount": "source=${localWorkspaceFolder},target=/app,type=bind,consistency=cached",
8-
"postCreateCommand": "yarn install",
8+
"features": {
9+
"ghcr.io/shyim/devcontainers-features/bun:0": {}
10+
},
11+
"postCreateCommand": "bun install",
912
"customizations": {
1013
"vscode": {
1114
"extensions": ["dbaeumer.vscode-eslint", "esbenp.prettier-vscode"]

.envrc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@
55
if [ -f package.json ]; then
66
if [ ! -d node_modules ]; then
77
echo "Installing dependencies..."
8-
yarn install
8+
bun install
99
fi
1010

1111
# Ensure husky git hooks are configured
1212
if [ "$(git config core.hooksPath 2>/dev/null)" != ".husky/_" ]; then
1313
echo "Setting up git hooks..."
14-
npx husky
14+
bunx husky
1515
fi
1616
fi

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,6 @@
1212

1313
## Checklist
1414

15-
- [ ] Lint passes (`yarn lint`)
16-
- [ ] Build passes (`yarn build:lib`)
15+
- [ ] Lint passes (`bun run lint`)
16+
- [ ] Build passes (`bun run build:lib`)
1717
- [ ] Public API unchanged (or downstream consumers checked)

.github/workflows/AGENTS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ GitHub Actions workflows for CI, documentation, and release automation.
2424
- **Minimal permissions**: Use `permissions:` block, never use `permissions: write-all`
2525
- **Node version**: 24 (match `engines` in package.json)
2626
- **Runner**: `ubuntu-24.04` or `ubuntu-latest`
27-
- **Package manager**: yarn with `--frozen-lockfile` in CI
27+
- **Package manager**: bun with `--frozen-lockfile` in CI
2828

2929
### Naming conventions
3030

.github/workflows/docs.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,14 @@ jobs:
3030
- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
3131
with:
3232
node-version: '24'
33-
cache: yarn
33+
34+
- uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2.2.0
3435

3536
- name: ⚡ Install dependencies
36-
run: yarn install --frozen-lockfile
37+
run: bun install --frozen-lockfile
3738

3839
- name: 🔨 Build documentation
39-
run: yarn build:docs
40+
run: bun run build:docs
4041

4142
- name: Upload artifact
4243
uses: actions/upload-pages-artifact@fc324d3547104276b827a68afc52ff2a11cc49c9 # v5.0.0

.github/workflows/lint.and.build.yml

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,14 @@ jobs:
2727
- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
2828
with:
2929
node-version: 24
30-
cache: yarn
30+
31+
- uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2.2.0
3132

3233
- name: ⚡ Install dependencies
33-
run: yarn install --frozen-lockfile
34+
run: bun install --frozen-lockfile
3435

3536
- name: 🔨 Build
36-
run: yarn build:lib
37+
run: bun run build:lib
3738

3839
test:
3940
name: 🧪 Test
@@ -43,13 +44,14 @@ jobs:
4344
- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
4445
with:
4546
node-version: 24
46-
cache: yarn
47+
48+
- uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2.2.0
4749

4850
- name: ⚡ Install dependencies
49-
run: yarn install --frozen-lockfile
51+
run: bun install --frozen-lockfile
5052

5153
- name: 🧪 Test
52-
run: yarn test:coverage
54+
run: bun run test:coverage
5355

5456
lint:
5557
name: 🔎 Lint
@@ -59,10 +61,11 @@ jobs:
5961
- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
6062
with:
6163
node-version: 24
62-
cache: yarn
64+
65+
- uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2.2.0
6366

6467
- name: ⚡ Install dependencies
65-
run: yarn install --frozen-lockfile
68+
run: bun install --frozen-lockfile
6669

6770
- name: 🔎 Lint
68-
run: yarn lint
71+
run: bun run lint

.github/workflows/release.when-tagged.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,14 @@ jobs:
3434
node-version: 24
3535
registry-url: 'https://registry.npmjs.org'
3636
scope: '@netresearch'
37-
cache: yarn
37+
38+
- uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2.2.0
3839

3940
- name: ⚡ Install dependencies
40-
run: yarn install --frozen-lockfile
41+
run: bun install --frozen-lockfile
4142

4243
- name: 🔨 Build
43-
run: yarn build:lib
44+
run: bun run build:lib
4445

4546
- name: ☁️ Publish to NPM (OIDC + provenance)
4647
run: npm publish --access=public --provenance

.github/workflows/security.yml

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -10,32 +10,32 @@ name: Security
1010
# netresearch/.github's go-app / php-module templates.
1111

1212
on:
13-
push:
14-
branches: [main, master]
15-
pull_request:
13+
push:
14+
branches: [main, master]
15+
pull_request:
1616

1717
permissions: {}
1818

1919
jobs:
20-
gitleaks:
21-
uses: netresearch/.github/.github/workflows/gitleaks.yml@main
22-
permissions:
23-
contents: read
24-
security-events: write
25-
secrets:
26-
GITLEAKS_LICENSE: ${{ secrets.GITLEAKS_LICENSE }}
20+
gitleaks:
21+
uses: netresearch/.github/.github/workflows/gitleaks.yml@main
22+
permissions:
23+
contents: read
24+
security-events: write
25+
secrets:
26+
GITLEAKS_LICENSE: ${{ secrets.GITLEAKS_LICENSE }}
2727

28-
dependency-review:
29-
if: github.event_name == 'pull_request'
30-
uses: netresearch/.github/.github/workflows/dependency-review.yml@main
31-
permissions:
32-
contents: read
33-
pull-requests: write
28+
dependency-review:
29+
if: github.event_name == 'pull_request'
30+
uses: netresearch/.github/.github/workflows/dependency-review.yml@main
31+
permissions:
32+
contents: read
33+
pull-requests: write
3434

35-
node-audit:
36-
uses: netresearch/.github/.github/workflows/node-audit.yml@main
37-
permissions:
38-
contents: read
39-
with:
40-
package-manager: yarn
41-
audit-level: high
35+
node-audit:
36+
uses: netresearch/.github/.github/workflows/node-audit.yml@main
37+
permissions:
38+
contents: read
39+
with:
40+
package-manager: bun
41+
audit-level: high

.husky/pre-commit

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
npx lint-staged
1+
bunx lint-staged

.vscode/launch.json

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
{
2-
"version": "0.2.0",
3-
"configurations": [
4-
{
5-
"type": "node-terminal",
6-
"name": "Run Script: test",
7-
"request": "launch",
8-
"command": "yarn run test",
9-
"cwd": "${workspaceFolder}"
10-
}
11-
]
12-
}
2+
"version": "0.2.0",
3+
"configurations": [
4+
{
5+
"type": "node-terminal",
6+
"name": "Run Script: test",
7+
"request": "launch",
8+
"command": "bun run test",
9+
"cwd": "${workspaceFolder}"
10+
}
11+
]
12+
}

0 commit comments

Comments
 (0)