chore(deps): update dependency obsidian to v1 #18
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
0.14.6
->1.7.2
Release Notes
obsidianmd/obsidian-api (obsidian)
v1.7.2
Compare Source
Workspace changes
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 inPlugin#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.WorkspaceLeaf#isDeferred
andWorkspaceLeaf#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
toany
. Usingany
causes Typescript to disable typechecking entirely on the returned value, so this change could uncover some hidden typing issues.We also removed
prepareQuery
,fuzzySearch
, andPreparedQuery
from the API. If your plugin is using one of these functions, you should migrate toprepareFuzzySearch
.Misc
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
andVault#getFolderByPath
utility functionsThe
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 ofTFile
orTFolder
, now you can justuse
getFileByPath
orgetFolderByPath
to automatically do this check.View.scope
is now publicFinally
scope
is made public on theView
class. This means you can assign hotkeys for when your view isactive and focused.
New
getFrontMatterInfo
utilityThere 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 otherprocess
andwrite
functions.v1.4.0
Compare Source
We've made some changes to
CachedMetadata
to support Properties.FrontMatterCache
is now no longer aCacheItem
—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.activeEditor
on the Workspace. When a markdown view is active, this will point to the underlyingMarkdownEditView
. 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 followingapproach:
Instead you can access the
editor
orfile
by looking under theactiveEditor
: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.
This PR was generated by Mend Renovate. View the repository job log.