Skip to content

PluginDependencyBase

What every declared dependency has, whichever way its API is read.

Import:

import type { PluginDependencyBase } from '@mnaoumov/obsidian-lib/components/plugin-gate-component';

Signature:

export interface PluginDependencyBase

Properties

PropertyTypeDescription
minPluginVersion?stringThe oldest release of the required plugin the dependent works with, e.g. '2.2.0'.

For a provider whose BEHAVIOR changed while its API contract stayed the same, which PluginDependency.apiVersionRange cannot see. A dependency enabled below it counts as UNSATISFIED and asks the user to update it. Evaluated against manifest.version; a version that cannot be parsed counts as too old. A minimum rather than a range, because the only advice the gate can give is "update it", and an upper bound is a version no update reaches.
pluginIdstringThe manifest.id of the required plugin, as listed in Obsidian's community plugin registry.
pluginNamestringThe display name of the required plugin, shown to the user.
reasonDocumentFragment | stringA localized sentence saying what the dependent does with this plugin, shown in the settings banner.

The dependent owns this string because only it knows what it uses the other plugin for, and a user being asked to install something deserves to be told why.

Pass a DocumentFragment to mark up part of the sentence, such as a plugin name rendered as code. Each render appends a fresh clone of it, since the banner is rendered again on every refresh.

Links to this page: