Skip to content

comparePluginVersionWithMinimum

Compares a plugin release with the oldest release another plugin works with.

The one comparison PluginGateComponent’s minPluginVersion and requirePlugin share, so a dependency declared through either reads a version the same way.

Import:

import { comparePluginVersionWithMinimum } from '@mnaoumov/obsidian-lib/plugin/plugin-install-state';

Signature:

function comparePluginVersionWithMinimum(version: string, minVersion: string): PluginVersionComparison

Parameters:

Parameter Type Description
version string The installed release, usually manifest.version.
minVersion string The oldest release that is acceptable.

Returns: PluginVersionComparison — The PluginVersionComparison.