Skip to content

Commit 46a08b5

Browse files
committed
fix #606; prep release
1 parent 73c60a0 commit 46a08b5

File tree

4 files changed

+29
-5
lines changed

4 files changed

+29
-5
lines changed

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
# Obsidian Meta Bind Changelog
22

3+
# 1.4.4
4+
5+
Bug Fixes
6+
7+
- Fixed argument validation for the `reactiveMetadata` API function
8+
- Fixed the plugin failing to update metadata for people on an older installer [#606](https://github.com/mProjectsCode/obsidian-meta-bind-plugin/issues/606)
9+
310
# 1.4.3
411

512
Bug Fixes

exampleVault/Buttons/Button Example.md

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
---
2-
count: 10
2+
count: 0
33
someList:
44
- 1708945050652
55
- 1709918700548
6-
count2: 0
6+
count2: 32
77
---
88
Meta Bind is getting Buttons
99

@@ -47,6 +47,16 @@ action:
4747
greeting: "Meta Bind User"
4848
```
4949

50+
```meta-bind-button
51+
style: default
52+
label: Run Custom Inline JS
53+
hidden: false
54+
actions:
55+
- type: inlineJS
56+
code: console.log("good morning")
57+
args: {}
58+
```
59+
5060
And open internal and external links
5161

5262
```meta-bind-button

packages/core/src/metadata/MetadataManager.ts

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -355,9 +355,16 @@ export class MetadataManager {
355355
* Internal update function that runs each cycle.
356356
*/
357357
public async cycle(): Promise<void> {
358-
const results = await Promise.allSettled(this.sources.values().map(source => this.cycleSource(source)));
358+
// Note: I would like to use the commented out line, but this is not supported by older installers
359+
// const results = await Promise.allSettled(this.sources.values().map(source => this.cycleSource(source)));
359360

360-
for (const result of results) {
361+
const promises = [];
362+
363+
for (const source of this.sources.values()) {
364+
promises.push(this.cycleSource(source));
365+
}
366+
367+
for (const result of await Promise.allSettled(promises)) {
361368
if (result.status === 'rejected') {
362369
console.warn(`meta-bind | MetadataManager >> failed to cycle source`, result.reason);
363370
}

packages/obsidian/src/ObsAPI.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ export class ObsAPI extends API<ObsComponents> {
120120
z.object({
121121
bindTargets: V_BindTargetDeclaration.array(),
122122
lifecycleHook: this.mb.internal.getLifecycleHookValidator(),
123-
callback: z.function(),
123+
callback: zodFunction<(...values: unknown[]) => Promise<unknown>>(),
124124
}),
125125
{
126126
bindTargets: bindTargets,

0 commit comments

Comments
 (0)