Repository navigation
Use the project’s Bun version for the base image - #174
Merged
Merged
Conversation
There was a problem hiding this comment.
🟡 Changes recommended
A critical test remains broken because the second sandbox run retains the previous packageManager: "bun@1.2.20", producing BUN_VERSION=1.2.20 instead of the expected fallback value 1.
1 open issue
What changed in this PR
Updates Bun version resolution so generated Dockerfiles use the project's exact stable Bun pin, then the locally installed Bun version, and finally version 1 when neither is available.
Changes:
- Prefer an exact stable Bun version from
packageManager. - Normalize the installed Bun version and provide a safe fallback.
- Add tests covering pinned, installed, and missing Bun scenarios.
| File | Description |
|---|---|
| test/gdf.test.js | Adds tests covering Bun version selection for project pins, installed Bun versions, and missing local Bun. |
| gdf.js | Implements Bun version precedence with a safe fallback for generated Dockerfile base images. |
Review effort: Lite
tomr-fly
marked this pull request as ready for review
November 29, 2026 19:16
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Generating a Dockerfile without Bun installed can produce
oven/bun:-slim. Use the project’s exact stable Bun pin first, then the installed Bun version, then1. This also keeps the generated Dockerfile using Bun for install and prune steps when Bun is missing locally.Fixes #173.