Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(deps): update dependency obsidian to v1 #18

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Mar 18, 2023

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
obsidian (source) 0.14.6 -> 1.7.2 age adoption passing confidence

Release Notes

obsidianmd/obsidian-api (obsidian)

v1.7.2

Compare Source

Workspace changes
  • New function Plugin#onUserEnable gives you a place to performance one-time initialize after the user installs and enables your plugin. If your plugin has a custom view, this is a good place to initialize it rather than recreating the view in Plugin#onload.
  • Workspace#ensureSideLeaf is now public. This function is a shorthand way to create a leaf in the sidebar if one does not already exist.
  • Added WorkspaceLeaf#isDeferred and WorkspaceLeaf#loadIfDeferred. As of Obsidian v1.7.2, Obsidian will now defer tabs by default. We published a guide on how to handle deferred views in the developer docs.
Housekeeping

We've updated the API to prefer unknown to any. Using any causes Typescript to disable typechecking entirely on the returned value, so this change could uncover some hidden typing issues.

We also removed prepareQuery, fuzzySearch, and PreparedQuery from the API. If your plugin is using one of these functions, you should migrate to prepareFuzzySearch.

// Old
let pq: PreparedQuery = prepareQuery(q);
...
fuzzySearch(pq, text);

// New
let fuzzy = prepareFuzzySearch(q);
...
fuzzy(text);
Misc
  • New Plugin#removeCommand is now available if your plugin needs to dynamically remove commands (for example, if your plugin allows for user-created commands).
  • SuggestModal#selectActiveSuggestion is now public. This is useful to provide an alternative hotkey to your SuggestModal that still triggers the selected item.

v1.6.6

Compare Source

v1.5.7

Compare Source

Plugin#onExternalSettingsChange

There's a new callback function for plugins to react to when plugin settings (data.json) get changed on disk. This callback can be used to reload settings when they are updated by an external application or when the settings get synced using a file syncing service like Obsidian Sync.

New Vault#getFileByPath and Vault#getFolderByPath utility functions

The getAbstractFileByPath has long been a point of confusion with plugin developers. More often than not,
you are looking for either a file or a folder. And you know which you want at call-time. Instead of using
getAbstractFileByPath then checking if the result is an instance of TFile or TFolder, now you can just
use getFileByPath or getFolderByPath to automatically do this check.

View.scope is now public

Finally scope is made public on the View class. This means you can assign hotkeys for when your view is
active and focused.

New getFrontMatterInfo utility

There is now a canonical way to find the offsets of where the frontmatter ends and where the content starts in a file.

FileManager#getAvailablePathForAttachment

If your plugin saves attachments to the vault, you should be using getAvailablePathForAttachment. It will generate a safe path for you to use that respects the user's settings for file attachments.

v1.4.11

Compare Source

v1.4.4

Compare Source

We've exposed our helper function for setting tooltips on elements (setTooltip) as well as added a new progress bar component.

The FileManager#processFrontMatter function now also exposes the DataWriteOptions argument to be consistent with the other process and write functions.

v1.4.0

Compare Source

We've made some changes to CachedMetadata to support Properties. FrontMatterCache is now no longer a CacheItem—meaning that it doesn't have a position. Instead, is it a Reference.

Another big change in v.1.4 is that frontmatter now supports wikilinks. If a value in the frontmatter can be interpreted as a link, it will be cached inside CachedMetadata.frontmatterLinks.

v1.3.5

Compare Source

v1.2.8

Compare Source

v1.2.5

Compare Source

v1.2.3

Compare Source

v1.1.1

Compare Source

Changes since v1.0

  • file-open event is now fired when focusing a Canvas file card.
  • Exposed the activeEditor on the Workspace. When a markdown view is active, this will point to the underlying MarkdownEditView. If a canvas view is active, this will be an EmbeddedEditor component.

With these two changes, plugins should be able to adapt to the new Canvas view quite easily. Custom
views that react the the currently focused views will automatically respond to the user clicking
on file cards in the canvas. If a plugin is currently accessing the Editor using the following
approach:

let view = app.workspace.getActiveViewOfType(MarkdownView);

if (view) {
    let editor = view.editor;
    // or
    let file = view.file;
}

Instead you can access the editor or file by looking under the activeEditor:

let { activeEditor } = app.workspace;
if (activeEditor) {
    let editor = activeEditor.editor;
    let file = activeEditor.file;
}

v0.16.3

Compare Source

v0.16.0

Compare Source

v0.15.9

Compare Source

v0.15.4

Compare Source

v0.15.3

Compare Source

v0.15.2

Compare Source

v0.15.1

Compare Source

v0.15.0

Compare Source

v0.14.8

Compare Source


Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate renovate bot force-pushed the renovate/obsidian-1.x branch from 14bf7a4 to 621d80b Compare April 17, 2023 12:40
@renovate renovate bot force-pushed the renovate/obsidian-1.x branch from 621d80b to 22a0d72 Compare May 31, 2023 01:54
@renovate renovate bot force-pushed the renovate/obsidian-1.x branch from 22a0d72 to b0c423e Compare July 25, 2023 22:39
@renovate renovate bot force-pushed the renovate/obsidian-1.x branch from b0c423e to a5a2aa2 Compare August 3, 2023 18:04
@renovate renovate bot force-pushed the renovate/obsidian-1.x branch from a5a2aa2 to de2603b Compare August 23, 2023 21:25
@renovate renovate bot force-pushed the renovate/obsidian-1.x branch from de2603b to 1096d5b Compare September 11, 2023 22:26
@renovate renovate bot force-pushed the renovate/obsidian-1.x branch from 1096d5b to 577fd85 Compare July 15, 2024 16:21
@renovate renovate bot force-pushed the renovate/obsidian-1.x branch from 577fd85 to 687e2af Compare September 19, 2024 20:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

0 participants