obsidianmd / obsidianmd/obsidian-developer-docs
More clearly describe how Obsidian determines which plugin release to download
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 521
- Forks
- 174
- PR merge metrics
- No merged PRs in 30d
Description
Right now, the process for how Obsidian determines which plugin release to download isn't clearly defined, and is spread out across multiple pages.
- Submit your plugin states that you must have a
manifest.jsonin the root folder of your repository. - Submission requirements for plugins also states that you must have a
manifest.jsonin the root folder of your repository, and before creating a release, update theversionin themanifest.jsonfollowing Semantic Versioning. - Manifest describes the schema for
manifest.json,versionis "The version, using Semantic Versioning in the format x.y.z." andminAppVersionis "The minimum required Obsidian version." - Versions describes how Obsidian will fallback to using
versions.jsonin the root folder of your repository if the Obsidian app version is lower than theminAppVersionin the manifest.versions.jsoncontains a JSON object, where the key is the plugin version, and the value is the correspondingminAppVersion.
It would be nice if there was one page where the full flow of how Obsidian determines which plugin to release to download is defined, step by step. Something like this:
- Obsidian checks
versioninmanifest.jsonin root folder of repository on default branch. Ifversion>=versionin locally downloadedmanifest.jsonthen plugin is up to date, stop. - If Obsidian app version >=
minAppVersioninmanifest.jsonin root folder of repository, then download release matchingversioninmanifest.jsonin root folder of repository. - If there is not a
versions.jsonin the root folder of repository, stop, plugin fails to update/install. - Find the highest version (key) in
versions.jsonthat has a min app version (value) <= Obsidian app version. Install matching release. Otherwise plugin fails to install.
It may also be nice to show a mermaid diagram, as it can be hard to describe the process, something like this:
flowchart TD;
gteqVersion{"Downloaded Manifest.version >= Manifest.version on HEAD"}
noUpdateNeeded["No update needed"]
obsidianVersionGteqMinAppVersion{"Obsidian app version >= Manifest.minAppVersion on HEAD"}
downloadRelease["Download release matching Manifest.version on HEAD"]
versionsExists{"versions.json exists on HEAD"}
fail["Plugin fails to install/update"]
obsidianVersionGteqVersionsMinAppVersion{"Obsidian app version >= minAppVersion in versions.json"}
downloadVersionsRelease["Download release matching highest version in versions.json with a minAppVersion >= Obsidian app version"]
gteqVersion -- Yes --> noUpdateNeeded
gteqVersion -- No --> obsidianVersionGteqMinAppVersion
obsidianVersionGteqMinAppVersion -- Yes --> downloadRelease
obsidianVersionGteqMinAppVersion -- No --> versionsExists
versionsExists -- Yes --> obsidianVersionGteqVersionsMinAppVersion
versionsExists -- No --> fail
obsidianVersionGteqVersionsMinAppVersion -- Yes --> downloadVersionsRelease
obsidianVersionGteqVersionsMinAppVersion -- No --> fail
I think the wording needs more work, but it would help to alleviate confusion. I'm happy to put more work into this and submit a PR.
This is inspired by a conversation on the OMG Discord, starting around here, with some debate starting here.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by comparing the Submit your plugin, Submission requirements for plugins, Manifest, and Versions pages to identify the authoritative release-selection flow. Confirm the disputed wording with maintainers, then consolidate the steps and, if appropriate, add a Mermaid diagram so the completed documentation clearly explains update, fallback, and failure outcomes.
Written by the indexing model from the issue text.
Assessment
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100