release: publish v2.0.35 settings validation fix

This commit is contained in:
Sucukdeluxe
2026-08-13 22:50:10 +02:00
parent 4fe951de78
commit 4d5161bedd
5 changed files with 43 additions and 4 deletions
+12
View File
@@ -2,6 +2,18 @@
All notable changes to Multi-Debrid Downloader are documented in this file.
## [2.0.35] - 2026-08-13
### Settings reliability
- Accepted omitted optional values inside nested account status records when saving a complete settings draft.
- Prevented valid Debrid-Link and Mega-Debrid account states from triggering an invalid settings payload after account checks or provider changes.
### Release validation
- Added a full renderer-settings regression fixture with a checked Debrid-Link account and an omitted optional e-mail field.
- Verified account toggle sequencing, renderer settings validation, and the packaged main-process build.
## [2.0.34] - 2026-08-13
### Account recovery and rotation
+2 -2
View File
@@ -1,12 +1,12 @@
{
"name": "real-debrid-downloader",
"version": "2.0.34",
"version": "2.0.35",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "real-debrid-downloader",
"version": "2.0.34",
"version": "2.0.35",
"license": "MIT",
"dependencies": {
"adm-zip": "0.6.0",
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "real-debrid-downloader",
"version": "2.0.34",
"version": "2.0.35",
"description": "Desktop downloader",
"main": "build/main/main/main.js",
"author": "Sucukdeluxe",
+5 -1
View File
@@ -30,7 +30,11 @@ function validateJsonValue(value: unknown, depth = 0): void {
}
const entries = Object.entries(value as Record<string, unknown>);
if (entries.length > 10_000) invalid();
entries.forEach(([, entry]) => validateJsonValue(entry, depth + 1));
entries.forEach(([, entry]) => {
if (entry !== undefined) {
validateJsonValue(entry, depth + 1);
}
});
}
function validateTopLevelType(value: unknown, expected: unknown): void {
+23
View File
@@ -1,6 +1,7 @@
import { describe, expect, it } from "vitest";
import { defaultSettings } from "../src/main/constants";
import { validateRendererSettingsUpdate } from "../src/main/renderer-settings";
import { createRendererSettings } from "../src/main/renderer-state";
describe("renderer settings validation", () => {
it("ignores undefined optional fields from a stale renderer draft", () => {
@@ -17,4 +18,26 @@ describe("renderer settings validation", () => {
debridLinkDisabledKeyIds: []
});
});
it("accepts a complete renderer draft with an optional nested account status field omitted", () => {
const current = defaultSettings();
current.debridAccountStatuses = {
"debridlink-key": {
accountId: "debridlink-key",
provider: "debridlink",
label: "Debrid-Link",
maskedLogin: "abc***xyz",
valid: true,
isPremium: true,
premiumUntilMs: null,
message: "Premium",
checkedAt: 1
}
};
const rendererDraft = createRendererSettings(current);
const result = validateRendererSettingsUpdate(rendererDraft, current);
expect(result.debridAccountStatuses).toEqual(rendererDraft.debridAccountStatuses);
});
});