Skip to content

Commit 4eff903

Browse files
committed
refactor: migrate from npm to bun as package manager
- Replace npm with bun for dependency management - Generate bun.lock, remove package-lock.json - Update .tool-versions to include bun 1.1 - Update all GitHub workflows to use oven-sh/setup-bun - Replace npm install/ci with bun install - Replace npm run with bun run All existing tests pass with bun (195 passing, 36 pending). ci: fix GitHub Actions workflows for Bun - Bump Bun version from 1.1 to 1.3.5 across all workflows - Convert workflows from npm to bun for dependency installation - Rename bin/lando.ts to bin/lando (file is JS despite .ts extension)
1 parent 996b015 commit 4eff903

16 files changed

+5530
-7310
lines changed

.github/workflows/deploy-npm.yml

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ name: Deploy npm
33
on:
44
workflow_call:
55
inputs:
6-
node-version:
7-
default: "20"
8-
description: The node version to use
6+
bun-version:
7+
default: "1.3.5"
8+
description: The bun version to use
99
required: false
1010
type: string
1111
secrets:
@@ -24,19 +24,22 @@ jobs:
2424
steps:
2525
- name: Checkout code
2626
uses: actions/checkout@v6
27-
- name: Install node ${{ inputs.node-version }}
27+
- name: Install node 20
2828
uses: actions/setup-node@v6
2929
with:
30-
node-version: ${{ inputs.node-version }}
30+
node-version: "20"
3131
registry-url: https://registry.npmjs.org
32-
cache: npm
32+
- name: Install bun ${{ inputs.bun-version }}
33+
uses: oven-sh/setup-bun@v2
34+
with:
35+
bun-version: ${{ inputs.bun-version }}
3336

3437
- name: Install dependencies
35-
run: npm clean-install --prefer-offline --frozen-lockfile
38+
run: bun install --frozen-lockfile
3639
- name: Lint code
37-
run: npm run lint
40+
run: bun run lint
3841
- name: Run unit tests
39-
run: npm run test:unit
42+
run: bun run test:unit
4043

4144
- name: Update edge release alias
4245
shell: bash

.github/workflows/pkg-binary.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,12 @@ jobs:
4848
uses: actions/setup-node@v6
4949
with:
5050
node-version: ${{ inputs.node-version }}
51-
cache: npm
51+
- name: Install bun
52+
uses: oven-sh/setup-bun@v2
53+
with:
54+
bun-version: "1.3.5"
5255
- name: Install dependencies
53-
run: npm clean-install --prefer-offline --frozen-lockfile --production
56+
run: bun install --frozen-lockfile --production
5457
- name: Install plugins
5558
run: scripts/install-plugins.sh --lando bin/lando ${{ inputs.edge == true && '--edge' || '' }}
5659
- name: Switch to edge channel

.github/workflows/pr-core-protected-tests.yml

Lines changed: 15 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ jobs:
1919
- yaml
2020
node-version:
2121
- "20"
22+
bun-version:
23+
- "1.3.5"
2224
os:
2325
# - macos-14
2426
- ubuntu-24.04
@@ -34,31 +36,27 @@ jobs:
3436
with:
3537
node-version: ${{ matrix.node-version }}
3638
registry-url: https://registry.npmjs.org
37-
cache: npm
39+
- name: Install bun ${{ matrix.bun-version }}
40+
uses: oven-sh/setup-bun@v2
41+
with:
42+
bun-version: ${{ matrix.bun-version }}
3843
- name: Bundle Deps
3944
uses: lando/prepare-release-action@v3
4045
with:
4146
lando-plugin: true
4247
version: dev
4348
sync: false
44-
- name: Install pkg dependencies
45-
run: npm clean-install --prefer-offline --frozen-lockfile --production
46-
- name: Package into node binary
47-
uses: lando/pkg-action@v6
48-
id: pkg-action
49-
with:
50-
entrypoint: bin/lando
51-
filename: lando
52-
node-version: ${{ matrix.node-version }}
53-
options: --options dns-result-order=ipv4first
54-
upload: false
55-
pkg: "@yao-pkg/pkg@5.16.1"
56-
- name: Install full deps
57-
run: npm clean-install --prefer-offline --frozen-lockfile
58-
- name: Setup lando ${{ steps.pkg-action.outputs.file }}
49+
- name: Install dependencies
50+
run: bun install --frozen-lockfile
51+
- name: Build Bun binary
52+
id: build-binary
53+
run: |
54+
bun build ./bin/lando --compile --outfile dist/lando
55+
echo "file=$(pwd)/dist/lando" >> $GITHUB_OUTPUT
56+
- name: Setup lando ${{ steps.build-binary.outputs.file }}
5957
uses: lando/setup-lando@v3
6058
with:
61-
lando-version: ${{ steps.pkg-action.outputs.file }}
59+
lando-version: ${{ steps.build-binary.outputs.file }}
6260
telemetry: false
6361
config: |
6462
setup.skipCommonPlugins=true

.github/workflows/pr-core-tests.yml

Lines changed: 15 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,8 @@ jobs:
6060
- update
6161
- version
6262
- yaml
63-
node-version:
64-
- "20"
63+
bun-version:
64+
- "1.3.5"
6565
os:
6666
# - macos-14
6767
- ubuntu-24.04
@@ -72,36 +72,28 @@ jobs:
7272
steps:
7373
- name: Checkout code
7474
uses: actions/checkout@v6
75-
- name: Install node ${{ matrix.node-version }}
76-
uses: actions/setup-node@v6
75+
- name: Install bun ${{ matrix.bun-version }}
76+
uses: oven-sh/setup-bun@v2
7777
with:
78-
node-version: ${{ matrix.node-version }}
79-
registry-url: https://registry.npmjs.org
80-
cache: npm
78+
bun-version: ${{ matrix.bun-version }}
8179
- name: Bundle Deps
8280
uses: lando/prepare-release-action@v3
8381
with:
8482
lando-plugin: true
8583
version: dev
8684
sync: false
87-
- name: Install pkg dependencies
88-
run: npm clean-install --prefer-offline --frozen-lockfile --production
89-
- name: Package into node binary
90-
uses: lando/pkg-action@v6
91-
id: pkg-action
92-
with:
93-
entrypoint: bin/lando
94-
filename: lando
95-
node-version: ${{ matrix.node-version }}
96-
options: --options dns-result-order=ipv4first
97-
upload: false
98-
pkg: "@yao-pkg/pkg@5.16.1"
99-
- name: Install full deps
100-
run: npm clean-install --prefer-offline --frozen-lockfile
101-
- name: Setup lando ${{ steps.pkg-action.outputs.file }}
85+
- name: Install dependencies
86+
run: bun install --frozen-lockfile
87+
- name: Build lando binary
88+
run: |
89+
bun build ./bin/lando --compile --outfile=dist/lando
90+
chmod +x dist/lando
91+
echo "file=$(pwd)/dist/lando" >> $GITHUB_OUTPUT
92+
id: build-binary
93+
- name: Setup lando ${{ steps.build-binary.outputs.file }}
10294
uses: lando/setup-lando@v3
10395
with:
104-
lando-version: ${{ steps.pkg-action.outputs.file }}
96+
lando-version: ${{ steps.build-binary.outputs.file }}
10597
telemetry: false
10698
config: |
10799
setup.skipCommonPlugins=true

.github/workflows/pr-docs-tests.yml

Lines changed: 23 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ jobs:
1212
matrix:
1313
os:
1414
- ubuntu-24.04
15-
node-version:
16-
- "20"
15+
bun-version:
16+
- "1.3.5"
1717
steps:
1818
- name: Checkout code
1919
uses: actions/checkout@v6
@@ -22,21 +22,20 @@ jobs:
2222
with:
2323
key: lando-mvb-docs
2424
path: docs/.vitepress/cache/@lando/mvb
25-
- name: Install node ${{ matrix.node-version }}
26-
uses: actions/setup-node@v6
25+
- name: Install bun ${{ matrix.bun-version }}
26+
uses: oven-sh/setup-bun@v2
2727
with:
28-
node-version: ${{ matrix.node-version }}
29-
cache: npm
28+
bun-version: ${{ matrix.bun-version }}
3029
- name: Install dependencies
31-
run: npm clean-install --prefer-offline --frozen-lockfile
30+
run: bun install --frozen-lockfile
3231

3332
# Run tests
3433
- name: Run linter
35-
run: npm run lint
34+
run: bun run lint
3635
- name: Test mvb
37-
run: npm run docs:mvb
36+
run: bun run docs:mvb
3837
- name: Test build
39-
run: npm run docs:build
38+
run: bun run docs:build
4039

4140
lando-docs-tests:
4241
runs-on: ${{ matrix.os }}
@@ -47,40 +46,32 @@ jobs:
4746
matrix:
4847
os:
4948
- ubuntu-24.04
50-
node-version:
51-
- "20"
49+
bun-version:
50+
- "1.3.5"
5251
steps:
5352
- name: Checkout code
5453
uses: actions/checkout@v6
55-
- name: Install node ${{ matrix.node-version }}
56-
uses: actions/setup-node@v6
54+
- name: Install bun ${{ matrix.bun-version }}
55+
uses: oven-sh/setup-bun@v2
5756
with:
58-
node-version: ${{ matrix.node-version }}
59-
cache: npm
57+
bun-version: ${{ matrix.bun-version }}
6058
- name: Bundle Deps
6159
uses: lando/prepare-release-action@v3
6260
with:
6361
lando-plugin: true
6462
version: dev
6563
sync: false
66-
- name: Install pkg dependencies
67-
run: npm clean-install --prefer-offline --frozen-lockfile --production
68-
- name: Package into node binary
69-
uses: lando/pkg-action@v6
70-
id: pkg-action
71-
with:
72-
entrypoint: bin/lando
73-
filename: lando
74-
node-version: ${{ matrix.node-version }}
75-
options: --options dns-result-order=ipv4first
76-
upload: false
77-
pkg: "@yao-pkg/pkg@5.16.1"
78-
- name: Install full deps
79-
run: npm clean-install --prefer-offline --frozen-lockfile
80-
- name: Setup lando ${{ steps.pkg-action.outputs.file }}
64+
- name: Install dependencies
65+
run: bun install --frozen-lockfile
66+
- name: Build Bun binary
67+
id: build-binary
68+
run: |
69+
bun build ./bin/lando --compile --outfile dist/lando
70+
echo "file=$(pwd)/dist/lando" >> $GITHUB_OUTPUT
71+
- name: Setup lando ${{ steps.build-binary.outputs.file }}
8172
uses: lando/setup-lando@v3
8273
with:
83-
lando-version: ${{ steps.pkg-action.outputs.file }}
74+
lando-version: ${{ steps.build-binary.outputs.file }}
8475
telemetry: false
8576
config: |
8677
setup.skipCommonPlugins=true

.github/workflows/pr-license-check.yml

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10,19 +10,18 @@ jobs:
1010
matrix:
1111
os:
1212
- ubuntu-24.04
13-
node-version:
14-
- "20"
13+
bun-version:
14+
- "1.3.5"
1515
steps:
1616
- name: Checkout code
1717
uses: actions/checkout@v6
18-
- name: Install node ${{ matrix.node-version }}
19-
uses: actions/setup-node@v6
18+
- name: Install Bun ${{ matrix.bun-version }}
19+
uses: oven-sh/setup-bun@v2
2020
with:
21-
node-version: ${{ matrix.node-version }}
22-
cache: npm
21+
bun-version: ${{ matrix.bun-version }}
2322
- name: Install dependencies
24-
run: npm clean-install --prefer-offline --frozen-lockfile
25-
- name: Run license cehck
23+
run: bun install --frozen-lockfile
24+
- name: Run license check
2625
run: |
27-
npm install --global license-checker
28-
npx license-checker --production --summary
26+
bun add -g license-checker
27+
bunx license-checker --production --summary

.github/workflows/pr-linter.yml

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,20 +10,19 @@ jobs:
1010
matrix:
1111
os:
1212
- ubuntu-24.04
13-
node-version:
14-
- "20"
13+
bun-version:
14+
- "1.3.5"
1515
steps:
1616
# Install deps and cache
1717
- name: Checkout code
1818
uses: actions/checkout@v6
19-
- name: Install node ${{ matrix.node-version }}
20-
uses: actions/setup-node@v6
19+
- name: Install bun ${{ matrix.bun-version }}
20+
uses: oven-sh/setup-bun@v2
2121
with:
22-
node-version: ${{ matrix.node-version }}
23-
cache: npm
22+
bun-version: ${{ matrix.bun-version }}
2423
- name: Install dependencies
25-
run: npm clean-install --prefer-offline --frozen-lockfile
24+
run: bun install --frozen-lockfile
2625

2726
# Run the linter
2827
- name: Run code linter
29-
run: npm run lint
28+
run: bun run lint

.github/workflows/pr-release-tests.yml

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -60,23 +60,26 @@ jobs:
6060
TERM: xterm
6161
strategy:
6262
matrix:
63-
node-version:
64-
- '20'
63+
bun-version:
64+
- "1.3.5"
6565
steps:
6666
- name: Checkout code
6767
uses: actions/checkout@v6
68-
- name: Install node ${{ matrix.node-version }}
68+
- name: Install node 20
6969
uses: actions/setup-node@v6
7070
with:
71-
node-version: ${{ matrix.node-version }}
71+
node-version: "20"
7272
registry-url: https://registry.npmjs.org
73-
cache: npm
73+
- name: Install bun ${{ matrix.bun-version }}
74+
uses: oven-sh/setup-bun@v2
75+
with:
76+
bun-version: ${{ matrix.bun-version }}
7477
- name: Install dependencies
75-
run: npm clean-install --prefer-offline --frozen-lockfile
78+
run: bun install --frozen-lockfile
7679
- name: Lint code
77-
run: npm run lint
80+
run: bun run lint
7881
- name: Run unit tests
79-
run: npm run test:unit
82+
run: bun run test:unit
8083
- name: Prepare Release
8184
uses: lando/prepare-release-action@v3
8285
with:

.github/workflows/pr-setup-linux-tests.yml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ jobs:
1515
- setup-linux
1616
node-version:
1717
- "20"
18+
bun-version:
19+
- "1.3.5"
1820
os:
1921
- ubuntu-24.04
2022

@@ -26,15 +28,18 @@ jobs:
2628
with:
2729
node-version: ${{ matrix.node-version }}
2830
registry-url: https://registry.npmjs.org
29-
cache: npm
31+
- name: Install bun ${{ matrix.bun-version }}
32+
uses: oven-sh/setup-bun@v2
33+
with:
34+
bun-version: ${{ matrix.bun-version }}
3035
- name: Bundle Deps
3136
uses: lando/prepare-release-action@v3
3237
with:
3338
lando-plugin: true
3439
version: dev
3540
sync: false
3641
- name: Install pkg dependencies
37-
run: npm clean-install --prefer-offline --frozen-lockfile --production
42+
run: bun install --frozen-lockfile --production
3843
- name: Package into node binary
3944
uses: lando/pkg-action@v6
4045
id: pkg-action
@@ -46,7 +51,7 @@ jobs:
4651
upload: false
4752
pkg: "@yao-pkg/pkg@5.16.1"
4853
- name: Install full deps
49-
run: npm clean-install --prefer-offline --frozen-lockfile
54+
run: bun install --frozen-lockfile
5055
- name: Setup lando ${{ steps.pkg-action.outputs.file }}
5156
uses: lando/setup-lando@v3
5257
with:

0 commit comments

Comments
 (0)