obsidian-metadata
Typed access to the repo-root metadata.json — the per-Obsidian-app-version data table precomputed in this repo (installer-floor / recommended-installer / recommended-Electron thresholds; see the metadata.json section in CLAUDE.md). This is the single module that reads the raw table; everything else consumes it through getVersionMetadata against the ObsidianVersionMetadata shape, so the raw table stays internal and the public surface is a typed lookup.
The table is injected at build time by esbuild’s define (and at test time by Vitest’s define) — the OBSIDIAN_METADATA global is replaced with the parsed contents of metadata.json. This mirrors how OBSIDIAN_INTEGRATION_TESTING_VERSION is injected, and keeps the built library self-contained (the table is inlined into the output, with no runtime file read and no bundle-time JSON import that bundle: false cannot inline).
Interfaces
Section titled “Interfaces”| Interface | Description |
|---|---|
| ObsidianRuntimeVersions | The concrete JS runtime versions an installer’s Electron shell ships — the entire process.versions object, read empirically by booting that installer over CDP (see scripts/collect-runtime-versions.ts). Absent for versions not yet collected (or that could not be booted). Electron bundles the same runtime on every OS for a given Electron version, so these are platform-invariant. The index signature carries every key process.versions exposes for that Electron build — beyond the four well-known ones below, that typically includes ares, brotli, cldr, icu, llhttp, modules, napi, nghttp2, openssl, tz, unicode, uv, zlib (and, on newer Electron, ada, simdjson, …). The exact set varies by Electron version, which is why it is captured wholesale rather than as a fixed field list. |
| ObsidianVersionDownloads | The pre-resolved asset download URLs for a version, baked into metadata.json from the upstream obsidian-versions.json catalog (see the metadata.json section in CLAUDE.md). These are the exact URLs the version’s assets are published at, so the integration-time download paths can skip the GitHub release-API lookup and the historical dot-vs-hyphen asset-name guessing. Only the assets this library actually downloads are carried: the app asar and the x64 desktop installers. A field is absent when the version publishes no such asset (e.g. a catalyst build ships only the asar), in which case the caller falls back to its hand-rolled resolution. |
| ObsidianVersionMetadata | The subset of a metadata.json per-version entry this library reads. Every field is optional — an entry carries only the thresholds that apply to that version (e.g. only old versions carry minRecommendedInstallerVersion). |
Functions
Section titled “Functions”| Function | Description |
|---|---|
| getVersionMetadata | Looks up the metadata entry for a concrete Obsidian app version. |