Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/ecosystem-ci-from-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ jobs:
- uses: actions/setup-node@v6
with:
node-version: ^22.14.0
- uses: oven-sh/setup-bun@v2
- run: corepack enable
- run: pnpm --version
- run: pnpm i --frozen-lockfile
Expand Down Expand Up @@ -189,6 +190,7 @@ jobs:
- uses: actions/setup-node@v6
with:
node-version: ^22.14.0
- uses: oven-sh/setup-bun@v2
- run: corepack enable
- run: pnpm --version
- run: pnpm i --frozen-lockfile
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/ecosystem-ci-rolldown.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ jobs:
with:
node-version: ^22.14.0
id: setup-node
- uses: oven-sh/setup-bun@v2
- run: corepack enable
- run: pnpm --version
- run: pnpm i --frozen-lockfile
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/ecosystem-ci-selected.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ jobs:
with:
node-version: ^22.14.0
id: setup-node
- uses: oven-sh/setup-bun@v2
- run: corepack enable
- run: pnpm --version
- run: pnpm i --frozen-lockfile
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/ecosystem-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ jobs:
with:
node-version: ^22.14.0
id: setup-node
- uses: oven-sh/setup-bun@v2
- run: corepack enable
- run: pnpm --version
- run: pnpm i --frozen-lockfile
Expand Down
2 changes: 1 addition & 1 deletion tests/one.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export async function test(options: RunOptions) {
repo: 'onejs/one',
branch: 'main',
build: ['clean:build', 'build'],
beforeTest: 'yarn playwright install chromium',
beforeTest: 'bunx playwright install chromium',
test: 'test:vite-ecosystem-ci',
})
}
Expand Down
16 changes: 16 additions & 0 deletions utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -624,6 +624,20 @@ export async function applyPackageOverrides(
pkg.devDependencies[name] = version
}
}
} else if (pm === 'bun') {
pkg.overrides = {
...pkg.overrides,
...overrides,
}
// bun does not allow overriding direct dependencies, force it by updating the blocks themselves
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

idk if this is true or just opus hallucination

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it was - bun overrides do apply to direct deps (unlike npm). removed the comment and the unnecessary direct dep forcing. also moved bun install to beforeInstall per your suggestion so the workflows are untouched now.

for (const [name, version] of Object.entries(overrides)) {
if (pkg.dependencies?.[name]) {
pkg.dependencies[name] = version
}
if (pkg.devDependencies?.[name]) {
pkg.devDependencies[name] = version
}
}
} else {
throw new Error(`unsupported package manager detected: ${pm}`)
}
Expand All @@ -637,6 +651,8 @@ export async function applyPackageOverrides(
await $`yarn install`
} else if (pm === 'npm') {
await $`npm install`
} else if (pm === 'bun') {
await $`bun install`
}
}

Expand Down