Sets up Vitest with an aliased obsidian stub so tests can load production
modules without the real Electron-bound API, and a fake-app builder
(in-memory vault, frontmatter, processFrontMatter) for testing commands
that touch the Obsidian app object.
Coverage:
- uidUtils: generator selection (UUID/NanoID/ULID), NanoID separator
injection, collision retry, getUIDFromFile/setUID/removeUID across
edge cases (custom uidKey, legacy key cleanup, error paths).
- commands: settings-driven decisions (autoGenerateUid toggle, scope=vault
vs folder, exclusions including multi-entry / whitespace / blank /
trailing-slash variants), bulk vs per-file parity, copy/clear flows,
and degenerate "everything excluded" combinations.
Includes one intentionally failing it() at commands.test.ts:225 that
documents the inconsistency between handleClearUIDsInFolder (treats "/"
as the whole vault) and the exclusion matcher (treats "/" as inert).
The build's tsc step now excludes tests/ and *.test.ts; Vitest type-checks
test code via esbuild at run time. Run with: npm test (or npm run test:watch).
Document the three generator algorithms (UUID, NanoID, ULID),
NanoID configuration options, and the duplicate detection feature.
Update plugin descriptions in manifest.json and package.json.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add ULID as a third generator option alongside UUID and NanoID.
ULIDs are 26-character, lexicographically sortable identifiers
that encode creation time — useful for chronological ordering.
Update plugin description to reflect all three generator types.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Fix package.json version field (was description string) and move
description to the correct field.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>