Skip to content

build: only write new minAppVersion requirements to versions.json #142

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

johannrichard
Copy link

@johannrichard johannrichard commented Apr 28, 2025

Currently, the version-bump.mjs script will write a new version: minAppVersion pair on every run with a version which is not yet in versions.json. However, we only need to update versions.json if the minAppVersion for the plugin changes. This PR modifies the script such that it only adds a new version requirement if minAppVersion in the current manifest.json is not already in versions.json. This should declutter versions.json.

Important:
This simply checks whether the minAppVersion is part of the versions.json or not. But it does not do any semantic comparisons of the existing versions against the new minAppVersion. This might lead to the (I guess unlikely, but entirely possible) situation that a lower minAppVersion for a newer plugin version is added to versions.json. I can't foresee if Obsidian would handle this gracefully, if that would be expected behaviour anyway, or if it would break things. However, since the current version of version-bump.mjs simply adds whatever minAppVersion the updated manifest.json contains, we won't be changing that fundamental behaviour.

Only add a new version requirements if `minAppVersion` is not already in `versions.json`. Should declutter `versions.json`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant