github johansan/notebook-navigator 1.3.13

latest releases: 1.7.3, 1.7.2, 1.7.1...
3 months ago

In this release I have enhanced compatibility with Obsidian updates and other plugins through modernized API usage.

No new features, just final polish before the first community release.

Notebook Navigator now requires Obsidian 1.8.0 as the minimum version.

1

Changed minAppVersion from 1.6.0 to 1.8.0
Motivation: Required for using the new getLanguage API.
Files affected:

  • manifest.json

2

Replaced app.workspace.activeLeaf with getActiveViewOfType()
Motivation: This is a better API that's more type-safe and future-proof.
Files affected:

  • src/hooks/useNavigatorReveal.ts:175-195

3

Changed from moment.locale to getLanguage API (Obsidian 1.8.0)
Motivation: The right way to get user language.
Files affected:

  • src/i18n/index.ts:1,202,207-209

4

Changed from window.setInterval to plugin.registerInterval
Motivation: Ensure timers are properly cleaned up when plugin unloads.
Files affected:

  • src/settings.ts:453-460

5

Replaced adapter.read, adapter.write, adapter.remove with vault.read, vault.modify and fileManager.trashFile
Motivation: Using higher-level Vault API is safer and more reliable. Even if it was only used for our mobile logger class, we should use the proper Vault API.
Files affected:

  • src/utils/mobileLogger.ts:635-641,645-648,658-665

6

Replaced setTimeout with window.setTimeout, replaced clearTimeout with window.clearTimeout
Motivation: More explicit, better for TypeScript.
Files affected:

  • src/hooks/useDragAndDrop.ts:79,110
  • src/hooks/useNavigatorReveal.ts:168,172
  • src/main.ts:229
  • src/modals/IconPickerModal.ts:241,244,250,254,263,347
  • src/services/ContentService.ts:279
  • src/services/FileSystemService.ts:303,321
  • src/settings.ts:428,429,439,451,469
  • src/storage/IndexedDBStorage.ts:489
  • src/utils/fileCreationUtils.ts:589
  • src/utils/leadingEdgeDebounce.ts:600,601,609,612

7

Replaced vault.adapter.exists with getAbstractFileByPath
Motivation: The adapter method is lower-level and could fail in edge cases (like files without extensions). The higher-level API is more reliable and consistent with how Obsidian manages files internally.
Files affected:

  • src/utils/mobileLogger.ts:635

8

Replaced vault.read + vault.modify with vault.process
Motivation: It's an atomic operation (safer for concurrent access) and the recommended pattern for read-transform-write operations.
Files affected:

  • src/services/TagOperations.ts:226-232,283-292,323-329

9

Replaced getAbstractFileByPath with getFileByPath in all places we specifically expect files
Motivation: Improved type safety.
Files affected:

  • src/components/FileItem.tsx:268,268,298,298
  • src/hooks/useDragAndDrop.ts:71,121,121,91,91,101,101,119,119,132,132,141,141,154,154
  • src/services/FileSystemService.ts:287,287,309,310
  • src/services/metadata/FileMetadataService.ts:137,137

Don't miss a new notebook-navigator release

NewReleases is sending notifications on new releases.