Bump deps, improve e2e test and pick up changes in the plugin

This commit is contained in:
Andras Schmelczer 2026-03-28 11:17:18 +00:00
commit 904a2737d4
11 changed files with 2566 additions and 4163 deletions

View file

@ -8,7 +8,7 @@ export default [
"sync-client/src/services/types.ts",
"**/dist/",
"**/*.mjs",
"**/*.js"
"**/*.js",
]
},
...tseslint.config({
@ -17,6 +17,7 @@ export default [
},
extends: [eslint.configs.recommended, tseslint.configs.all],
rules: {
"no-console": "error",
"no-unused-vars": "off",
"@typescript-eslint/restrict-template-expressions": "off",
"@typescript-eslint/no-unused-vars": "off",

View file

@ -8,6 +8,7 @@ The repo depends on the latest plugin API (obsidian.d.ts) in TypeScript Definiti
**Note:** The Obsidian API is still in early alpha and is subject to change at any time!
This sample plugin demonstrates some of the basic functionality the plugin API can do.
- Adds a ribbon icon, which shows a Notice when clicked.
- Adds a command "Open Sample Modal" which opens a Modal.
- Adds a plugin setting tab to the settings page.
@ -57,31 +58,6 @@ Quick starting guide for new plugin devs:
- Copy over `main.js`, `styles.css`, `manifest.json` to your vault `VaultFolder/.obsidian/plugins/your-plugin-id/`.
## Funding URL
You can include funding URLs where people who use your plugin can financially support it.
The simple way is to set the `fundingUrl` field to your link in your `manifest.json` file:
```json
{
"fundingUrl": "https://buymeacoffee.com"
}
```
If you have multiple URLs, you can also do:
```json
{
"fundingUrl": {
"Buy Me a Coffee": "https://buymeacoffee.com",
"GitHub Sponsor": "https://github.com/sponsors",
"Patreon": "https://www.patreon.com/"
}
}
```
## API Documentation
See https://github.com/obsidianmd/obsidian-api

View file

@ -13,25 +13,25 @@
"author": "",
"license": "MIT",
"devDependencies": {
"@types/node": "^24.8.1",
"@types/node": "^25.0.2",
"css-loader": "^7.1.2",
"date-fns": "^4.1.0",
"file-loader": "^6.2.0",
"fs-extra": "^11.3.0",
"mini-css-extract-plugin": "^2.9.2",
"obsidian": "1.10.2",
"reconcile-text": "^0.8.0",
"fs-extra": "^11.3.2",
"mini-css-extract-plugin": "^2.9.4",
"obsidian": "1.11.0",
"reconcile-text": "^0.11.0",
"resolve-url-loader": "^5.0.0",
"sass": "^1.91.0",
"sass": "^1.96.0",
"sass-loader": "^16.0.6",
"sync-client": "file:../sync-client",
"terser-webpack-plugin": "^5.3.14",
"ts-loader": "^9.5.2",
"terser-webpack-plugin": "^5.3.16",
"ts-loader": "^9.5.4",
"tslib": "2.8.1",
"tsx": "^4.20.6",
"typescript": "5.8.3",
"tsx": "^4.21.0",
"typescript": "5.9.3",
"url": "^0.11.4",
"webpack": "^5.99.9",
"webpack": "^5.103.0",
"webpack-cli": "^6.0.1"
}
}

View file

@ -135,14 +135,14 @@ export default class VaultLinkPlugin extends Plugin {
nativeLineEndings: Platform.isWin ? "\r\n" : "\n",
...(IS_DEBUG_BUILD
? {
fetch: debugging.slowFetchFactory(1),
webSocket: debugging.slowWebSocketFactory(1, new Logger())
}
fetch: debugging.slowFetchFactory(1),
webSocket: debugging.slowWebSocketFactory(1, new Logger())
}
: {})
});
if (IS_DEBUG_BUILD) {
debugging.logToConsole(client);
debugging.logToConsole(client.logger);
}
return client;

View file

@ -132,7 +132,8 @@ export class RemoteCursorsPluginValue implements PluginValue {
]
)
},
edited
edited,
"Markdown"
);
reconciled.cursors.forEach(({ id, position }) => {

View file

@ -266,9 +266,8 @@ export class SyncSettingsTab extends PluginSettingTab {
new Notice("Checking connection to the server...");
new Notice(
(
await this.syncClient.checkConnection()
).serverMessage
(await this.syncClient.checkConnection())
.serverMessage
);
await this.statusDescription.updateConnectionState();
} else {
@ -351,22 +350,6 @@ export class SyncSettingsTab extends PluginSettingTab {
})
);
new Setting(containerEl)
.setName("Sync concurrency")
.setDesc(
"How many concurrent sync operations to run. Setting this value higher may increase the overall performance, however, it will require more memory as well. If you notice frequent crashes, especially on mobile, set this to 1."
)
.addSlider((text) =>
text
.setLimits(1, 16, 1)
.setDynamicTooltip()
.setInstant(false)
.setValue(this.syncClient.getSettings().syncConcurrency)
.onChange(async (value) =>
this.syncClient.setSetting("syncConcurrency", value)
)
);
new Setting(containerEl)
.setName("Maximum file size to be uploaded (MB)")
.setDesc(

File diff suppressed because it is too large Load diff

View file

@ -5,7 +5,9 @@
"sync-client",
"obsidian-plugin",
"test-client",
"local-client-cli"
"deterministic-tests",
"local-client-cli",
"history-ui"
],
"prettier": {
"trailingComma": "none",
@ -29,16 +31,15 @@
"build": "npm run build --workspaces",
"dev": "concurrently --kill-others \"npm run dev -w sync-client\" \"npm run dev -w obsidian-plugin\"",
"test": "npm run test --workspaces",
"lint": "eslint --fix sync-client obsidian-plugin test-client local-client-cli && prettier --write \"**/*.ts\"",
"update": "ncu -u -ws"
"lint": "eslint --fix sync-client obsidian-plugin test-client deterministic-tests local-client-cli && prettier --write \"**/*.ts\"",
"update": "ncu -u"
},
"devDependencies": {
"concurrently": "^9.2.1",
"eclint": "^2.8.1",
"eslint": "9.38.0",
"eslint-plugin-unused-imports": "^4.1.4",
"npm-check-updates": "^19.1.1",
"prettier": "^3.6.2",
"typescript-eslint": "8.41.0"
"eslint": "9.39.2",
"eslint-plugin-unused-imports": "^4.3.0",
"npm-check-updates": "^19.2.0",
"prettier": "^3.7.4",
"typescript-eslint": "8.49.0"
}
}

View file

@ -11,14 +11,14 @@
"test": "tsx --test 'src/**/*.test.ts'"
},
"devDependencies": {
"@types/node": "^24.8.1",
"@types/node": "^25.0.2",
"sync-client": "file:../sync-client",
"ts-loader": "^9.5.2",
"ts-loader": "^9.5.4",
"tslib": "2.8.1",
"tsx": "^4.20.6",
"typescript": "5.8.3",
"tsx": "^4.21.0",
"typescript": "5.9.3",
"uuid": "^13.0.0",
"webpack": "^5.99.9",
"webpack": "^5.103.0",
"webpack-cli": "^6.0.1"
}
}