feat: warn on Dokku version mismatch via pinned dokku.version#3
Merged
Conversation
Address gaps surfaced by a junior-developer review pass: - Add Prerequisites covering bun/vitest and Context vs Runner types - Show full final test and module file contents instead of "append" steps - Make up.ts insertion explicit so existing docker_auth line is preserved - Resolve conflicting README placement instruction - Specify validate command shape and a real fixture path
Wire ensureDokkuVersion into computeDiff so that diff, like up, warns when the server's Dokku version is below the pinned minimum. The check is warning-only and opt-in via dokku.version in the config. No diff.test.ts changes were needed: the test fixture omits dokku.version, so ensureDokkuVersion returns immediately without querying the server.
- Share `extractServerVersion(output)` between `ensureDokkuVersion` and `runExport`. Both call sites previously inlined the same regex against `dokku version` output. - Drop the parenthetical "warning-only, opt-in via dokku.version" portion of the call-site comments — the function name already says what's happening. Keep `up.ts`'s "Phase 0:" prefix to match the existing navigational pattern in that file.
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.
Summary
dokku.versionconfig field to actually enforce a minimum: onupanddiff, querydokku versionand warn if the server is older than the pinned floor.validatestays offline — no server query added there.src/modules/version.tswith a purecompareSemverhelper and a runner-awareensureDokkuVersion. 13 new unit tests.docs/reference/dokku.md, linked from the README Features table.Test plan
bun testpasses (228 tests, including 13 new)bun run buildsucceeds cleandokku-compose upagainst a server withdokku.versionunset — no warning, no behavior changedokku-compose upwithdokku.version: "<higher than server>"pinned — warning prints, command continuesdokku-compose diffwith a pinned-higher version — same warning prints once at the top of diff outputdokku-compose validate <file>withdokku.versionset — completes offline, no server query, no warning