Skip to content

plugin-release-checks

Validates an Obsidian plugin’s manifest.json, versions.json, release tag and release assets the way the community directory does, so a release that would be rejected or delisted fails on the developer’s machine first.

The manifest, versions.json and asset rules mirror obsidianmd/obsidian-workflows (src/manifest.ts and src/release.ts, v1.2.3), the action the directory team points to as matching its scanner, and keep its rule ids. The plugin id character set, the numbers-and-dots release version and the tag rules come from the submission bot, obsidianmd/obsidian-releases’ validate-plugin-entry.yml, which looks a release up by the tag equal to manifest.json’s version. Severities follow the action’s strict: true, the setting the team recommends, except that a tag differing from the manifest version is an error rather than a warning: the directory then finds no release for the version the manifest names.

The project root must also hold a LICENSE (.md / .txt accepted) and a README.md, as the directory requires of every plugin repository; the check is re-implemented after obsidian-plugin-validator’s lib/check-manifest.mjs (MIT).

package.json’s version and package-lock.json’s root version and packages[""].version must equal the manifest’s, so the tag cut from the manifest names the package that was built; re-implemented after obsidian-plugin-dev-kit’s src/release/version-rules.ts (v0.4.0, MIT).

As in the action, an ID already listed in the directory (community-plugins.json) for the same repository is exempt from the banned-word rule, since a listed ID can never change. The directory is fetched only when that rule fires.

Interface Description
PluginCheckFinding One finding of the plugin checks.
PluginPackageVersionSources The parsed npm package files validatePackageVersions compares with the manifest.
ValidatePluginManifestOptions Options for validatePluginManifest.
ValidatePluginReleaseOptions Options for validatePluginRelease.
Function Description
formatPluginCheckFindings Formats findings one per line, errors first.
hasPluginCheckErrors Tells whether any finding is an error.
validatePackageVersions Validates that the npm package files carry the manifest’s version: package.json’s version, and package-lock.json’s root version and packages[""].version. The release bumps all of them together, so a difference means one was edited by hand, and the tag, cut from manifest.json’s version, no longer names the package that was built. A file or a field that is absent is not checked.
validatePluginManifest Validates a plugin’s manifest.json content.
validatePluginRelease Validates the whole plugin: the manifest and versions.json in the project root, the release tag when one is given, and the release assets when the dist folder exists or is required.
validateReleaseAssets Validates the files of a release.
validateReleaseTag Validates a release tag against the manifest version: the directory looks the release up by a tag equal to manifest.json’s version, so a v prefix or any other difference leaves it with no release to install.
validateVersionsJson Validates a plugin’s versions.json content. When manifestVersion is given, a missing entry for it is a warning: Obsidian reads versions.json to find the newest plugin version an older app can install, so a version bumped by hand without its entry leaves that lookup stale.
Type Description
PluginCheckFindingLevel The level of a PluginCheckFinding.