StaleBuildError
Thrown by the global setup when the built plugin predates its sources.
Carries both timestamps and the newest source’s path, so the message names the file that makes the build stale rather than leaving the reader to find it.
Import:
import { StaleBuildError } from 'obsidian-integration-testing';Signature:
export class StaleBuildError extends ErrorExtends: Error
Constructor
new StaleBuildError(params: StaleBuildErrorConstructorParams)Creates the error from the dist folder and the newest source that outdates it.
Properties
| Property | Type | Description |
|---|---|---|
| buildModifiedAtInMilliseconds | number | When main.js in the chosen dist folder was last written, in epoch milliseconds. |
| description | string | Which build is stale and what outdated it, with **no remedy attached** — the opening of StaleBuildError.message, and what the warning path logs when the failure is switched off. The two readers need different halves: somebody whose run just FAILED needs the remedy, while somebody who deliberately escaped the failure has already applied it, and repeating *"set shouldFailOnStaleBuild: false"* at a reader who just did exactly that is the noise that teaches people to skim the line. |
| distPath | string | Absolute path to the dist folder the run was about to install from. |
| sourceModifiedAtInMilliseconds | number | When the newest source was last written, in epoch milliseconds. |
| sourcePath | string | Path to the newest source found, relative to the project root. |
Links to this page: