Compare commits

...

3 Commits

Author SHA1 Message Date
Riccardo Ferretti
06efdc2865 v0.25.10 2024-03-18 10:09:31 +01:00
Riccardo Ferretti
b68fd7e138 Prepare for release 2024-03-18 10:09:04 +01:00
Riccardo Ferretti
d8baa2fd36 Fixed graph computation issue 2024-03-18 10:06:18 +01:00
4 changed files with 30 additions and 26 deletions

View File

@@ -4,5 +4,5 @@
],
"npmClient": "yarn",
"useWorkspaces": true,
"version": "0.25.9"
"version": "0.25.10"
}

View File

@@ -4,6 +4,12 @@ All notable changes to the "foam-vscode" extension will be documented in this fi
Check [Keep a Changelog](http://keepachangelog.com/) for recommendations on how to structure this file.
## [0.25.10] - 2024-03-18
Fixes and Improvements:
- Fixed bug in graph computation (#1345)
## [0.25.9] - 2024-03-17
Fixes and Improvements:

View File

@@ -8,7 +8,7 @@
"type": "git"
},
"homepage": "https://github.com/foambubble/foam",
"version": "0.25.9",
"version": "0.25.10",
"license": "MIT",
"publisher": "foam",
"engines": {

View File

@@ -100,32 +100,30 @@ export class FoamGraph implements IDisposable {
}
public update() {
withTiming(
() => {
this.backlinks.clear();
this.links.clear();
this.placeholders.clear();
const start = Date.now();
this.backlinks.clear();
this.links.clear();
this.placeholders.clear();
for (const resource of this.workspace.resources()) {
for (const link of resource.links) {
try {
const targetUri = this.workspace.resolveLink(resource, link);
this.connect(resource.uri, targetUri, link);
} catch (e) {
Logger.error(
`Error while resolving link ${
link.rawText
} in ${resource.uri.toFsPath()}, skipping.`,
link,
e
);
}
}
this.onDidUpdateEmitter.fire();
for (const resource of this.workspace.resources()) {
for (const link of resource.links) {
try {
const targetUri = this.workspace.resolveLink(resource, link);
this.connect(resource.uri, targetUri, link);
} catch (e) {
Logger.error(
`Error while resolving link ${
link.rawText
} in ${resource.uri.toFsPath()}, skipping.`,
link,
e
);
}
},
ms => Logger.debug(`Graph updated in ${ms}ms`)
);
}
this.onDidUpdateEmitter.fire();
}
const ms = Date.now() - start;
Logger.debug(`Graph updated in ${ms}ms`);
}
private connect(source: URI, target: URI, link: ResourceLink) {