fix: restore stable Obsidian marketplace install

This commit is contained in:
wenbin 2026-06-15 11:16:48 +08:00
parent 7cdb5a02bd
commit 1158f7dec8
9 changed files with 49 additions and 11 deletions

View file

@ -43,6 +43,10 @@ jobs:
run: |
node -e 'const manifest=require("./manifest.json"); const tag=process.env.GITHUB_REF_NAME; if (manifest.version !== tag) { throw new Error(`manifest.json version ${manifest.version} does not match tag ${tag}`); }'
- name: Verify release notes exist
run: |
test -f "RELEASE_NOTES_${GITHUB_REF_NAME}.md"
- name: Generate artifact attestations
uses: actions/attest@v4
with:
@ -53,7 +57,7 @@ jobs:
- name: Create GitHub release
uses: softprops/action-gh-release@v2
with:
body_path: RELEASE_NOTES_1.0.4.md
body_path: RELEASE_NOTES_${{ github.ref_name }}.md
files: |
main.js
manifest.json

26
RELEASE_NOTES_1.0.5.md Normal file
View file

@ -0,0 +1,26 @@
# Vault2Dify 1.0.5
## Added
No user-facing features in this release.
## Fixed
- Restored Marketplace installs for Obsidian 1.12.7 public stable users.
- Declared `1.0.5` compatible with Obsidian `1.12.7` so the community plugin browser no longer falls back to the unavailable `1.0.0` release.
- Kept previous release compatibility records unchanged to avoid rewriting historical release metadata.
## Obsidian Review
- Updated the release metadata path used by the GitHub Release workflow so future tags load matching release notes.
- Added a release notes existence check before creating GitHub releases.
## Validation
- `npm test`
- `npm run lint:obsidian`
- `npm run typecheck`
- `npm run build`
- `npm run install:test-vault`
- Manifest/tag version check in the GitHub Release workflow.
- Release notes existence check in the GitHub Release workflow.

File diff suppressed because one or more lines are too long

View file

@ -1516,8 +1516,11 @@ class DifySyncSettingTab extends PluginSettingTab {
refreshSettingsView(): void {
if (this.renderMode === 'declarative') {
this.update();
return;
const updateSettingTab = (this as unknown as Record<string, unknown>)['update'];
if (typeof updateSettingTab === 'function') {
updateSettingTab.call(this);
return;
}
}
this.renderLegacySettingsView();

View file

@ -1,8 +1,8 @@
{
"id": "vault-to-dify",
"name": "Vault2Dify",
"version": "1.0.4",
"minAppVersion": "1.13.0",
"version": "1.0.5",
"minAppVersion": "1.12.7",
"description": "Sync selected Markdown notes to a Dify Knowledge Base.",
"author": "WenBin",
"authorUrl": "https://github.com/BeatsAD",

4
package-lock.json generated
View file

@ -1,12 +1,12 @@
{
"name": "vault-to-dify",
"version": "1.0.4",
"version": "1.0.5",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "vault-to-dify",
"version": "1.0.4",
"version": "1.0.5",
"license": "MIT",
"devDependencies": {
"@eslint/js": "^9.39.4",

View file

@ -1,6 +1,6 @@
{
"name": "vault-to-dify",
"version": "1.0.4",
"version": "1.0.5",
"description": "Sync your Obsidian Vault to Dify Knowledge Base",
"main": "main.js",
"scripts": {

View file

@ -139,7 +139,11 @@ test("settings tab renders restored review layout with native Obsidian setting c
"concurrencyOption2: '2 files'",
]);
assert.doesNotMatch(settingsTabBlock, /\.setClass\('[^']+\s+[^']+'\)/, "Native Setting classes must be added one class at a time");
assert.equal(countOccurrences(settingsTabBlock, "this.update();"), 1, "Settings tab should only call update inside refreshSettingsView");
assert.equal(countOccurrences(settingsTabBlock, "this.update();"), 0, "Settings tab should avoid direct update calls so Obsidian 1.12.7 remains supported");
sourceContainsAll(settingsTabBlock, [
"const updateSettingTab = (this as unknown as Record<string, unknown>)['update'];",
"updateSettingTab.call(this);",
]);
assert.ok(
countOccurrences(settingsTabBlock, "this.refreshSettingsView();") >= 10,
"Settings tab actions should refresh through the Obsidian-version-aware helper",

View file

@ -2,5 +2,6 @@
"1.0.0": "1.1.1",
"1.0.2": "1.13.0",
"1.0.3": "1.13.0",
"1.0.4": "1.13.0"
"1.0.4": "1.13.0",
"1.0.5": "1.12.7"
}