Skip to content

ThirdPartyPluginDependency

A third-party plugin another plugin cannot work without, declared through PluginBase.getPluginDependencies().

Built by createThirdPartyPluginDependency, which copies the adapter’s id and name.

Import:

import type { ThirdPartyPluginDependency } from '@mnaoumov/obsidian-lib/plugin/third-party-plugin';

Signature:

export interface ThirdPartyPluginDependency extends PluginDependencyBase

Extends: PluginDependencyBase

Properties

PropertyTypeDescription
adapterThirdPartyPluginAdapter<object>The adapter the gate reads the dependency's API through.
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.
(Inherited from PluginDependencyBase)
pluginIdstringThe manifest.id of the required plugin, as listed in Obsidian's community plugin registry.
(Inherited from PluginDependencyBase)
pluginNamestringThe display name of the required plugin, shown to the user.
(Inherited from PluginDependencyBase)
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.
(Inherited from PluginDependencyBase)

Links to this page: