Skip to content

PluginDependency

A plugin another plugin cannot work without.

Import:

import type { PluginDependency } from 'obsidian-dev-utils/obsidian/components/plugin-gate-component';

Signature:

export interface PluginDependency

Properties

PropertyTypeDescription
apiVersionRangestringThe semver range of API contract versions the dependent compiled against, e.g. '^2'.

A dependency whose published API falls outside the range counts as UNSATISFIED, which is what turns a silent behavioral mismatch between two independently released plugins into a visible "update this one" message. Spell "any version" as '>=0.0.0'compare-versions rejects a bare *.
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.
reasonstringA 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.

Links to this page: