update testing and versioning

This commit is contained in:
nicwands
2026-03-24 13:56:03 -04:00
parent 40344e4e74
commit 771778fe4a
9 changed files with 178 additions and 1105 deletions

View File

@@ -10,7 +10,7 @@ It includes:
- `definePlugin()` helper
- Runtime plugin validation
- Strong TypeScript types
- API version enforcement
- Semver-based API version enforcement
# Installation
@@ -50,7 +50,7 @@ export default definePlugin({
name: 'My Adapter',
description: 'Example storage adapter',
version: '1.0.0',
apiVersion: '1.0.0',
apiVersion: '0.3.1',
configSchema: [],
createAdapter(config) {
return new MyAdapter(config)
@@ -155,13 +155,17 @@ In your plugin's package.json:
"version": "1.0.0",
"type": "module",
"peerDependencies": {
"@nicwands/notes-plugin-sdk": "^0.1.0"
"@nicwands/notes-plugin-sdk": "^0.3.0"
}
}
```
Use peerDependencies to ensure compatibility with the host app.
# API Versioning
The SDK uses semver range matching for API versions. Your plugin's `apiVersion` should fall within the supported range exported as `SUPPORTED_API_RANGE` from the SDK. Minor and patch version changes in the SDK remain compatible with your plugin.
# Security Considerations
Plugins execute in the Notes main process.