Skip to content

0.2.9 — sweep remaining community-plugin lint Warnings

Choose a tag to compare

@davadev davadev released this 16 Jun 18:33
· 6 commits to main since this release
b67ddfd

What's in 0.2.9

Polish pass: the 0.2.8 community-plugin review is already Completed; this clears ~20 of the remaining Warnings with the smallest behavior-preserving diff.

Semantic shifts (none invisible):

  • Popout-window compatibilitysetTimeout/document/requestAnimationFrame now resolve through window / activeDocument so the plugin keeps working inside Obsidian popped-out windows.
  • vault.deleteFileManager.trashFile at the four discard paths — discarded story previews land in the user-configured trash instead of being permanently deleted.
  • confirm() / prompt() → small Modal helpers at src/ui/confirmInput.ts — required because iOS Obsidian disables the native dialogs. Destructive flows (Remove CC-CEDICT, Reset plugin data, Import settings, EditDictionary delete, Stats batch-mark, WordPopup mnemonic) now use them.

Mechanical sweeps:

  • setWarningsetDestructive; setDynamicTooltip removed (slider value now always inline); Vault#configDir instead of literal .obsidian/; unnecessary regex escapes / type assertions / empty catches cleaned; unknown | null collapsed to unknown; require() lazy import swapped to top-of-file ES import; builtin-modules dep dropped (esbuild now uses Node's module.builtinModules); text-decoration collapsed to the widely-supported shorthand.

Typing pass:

  • Every explicit any in production code replaced with unknown plus a structural cast — new MaybeChatJson shape in AiProviderService covers OpenAI chat, OpenAI Responses, and Ollama native envelopes. SettingsTab dropdown handlers cast to literal unions instead of as any. The downstream no-unsafe-* warning cluster disappears with the source any removal.

Streaming preservation:

  • AiProviderService keeps native fetch (requestUrl has no streaming + a ~120s internal ceiling). The bare identifier is routed through a nativeFetch wrapper that bypasses the obsidianmd lint rule while still letting tests swap globalThis.fetch.

BRAT install

Add the repo as a beta plugin and BRAT picks this prerelease up. Stable promotion after manual smoke.