Skip to content

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 Error

Extends: Error

Constructor

new StaleBuildError(params: StaleBuildErrorConstructorParams)

Creates the error from the dist folder and the newest source that outdates it.

Properties

PropertyTypeDescription
buildModifiedAtInMillisecondsnumberWhen main.js in the chosen dist folder was last written, in epoch milliseconds.
descriptionstringWhich 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.
distPathstringAbsolute path to the dist folder the run was about to install from.
sourceModifiedAtInMillisecondsnumberWhen the newest source was last written, in epoch milliseconds.
sourcePathstringPath to the newest source found, relative to the project root.

Links to this page: