fix: parse dvm's key=value format in .dvmrc - #133
Open
somaz94 wants to merge 1 commit into
Open
Conversation
Author
|
Heads up on the red CI, both failures are pre-existing on main and not from this change.
The jobs this PR affects are green: build-diff, test-version-file (.dvmrc and .tool-versions), and the new test-version-file-dvm. Happy to fix either one in a separate PR if that helps. |
somaz94
marked this pull request as ready for review
August 4, 2026 02:43
somaz94
added a commit
to somaz94/somaz94
that referenced
this pull request
Aug 4, 2026
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.
The README documents that
deno-version-filecan read dvm's.dvmrc, but the parser only accepts a bare version string. dvm writes the file askey=value(configrc.rsserializes withformat!("{}={}", k, v)), sodeno_version=1.43.1falls through to the bare-version branch and fails withThe passed version range is not valid..dvmrcis a general key/value store rather than a single line, and dvm also recordsregistry_binary/registry_version, so the version is not necessarily on the first line. The new pattern scans every line for thedeno_versionkey. It runs only after the existing.tool-versionsmatch, and the two patterns are disjoint, so bare-version and.tool-versionsfiles behave exactly as before.Also tolerates spaces around
=(dvm's own reader trims both sides) and avprefix, consistent with the existing.tool-versionshandling.Validation:
deno lint,deno fmt --check,deno check src/main.tsall pass locallydeno run -A scripts/build.tsrebuiltdist/, and a second build is byte-identical, sobuild-diffstays cleantest-version-file-dvmjob writes a dvm-style.dvmrcwithdeno_versionon the second line, so it covers the multi-key case rather than just a prefix strip=/vprefix / CRLF, plus regressions for bare version, bare range (~1.32),.tool-versions, and amy_deno_versionx=string that must not matchrelated: #121