Skip to content

Fixed Serialization of Release Notes#1041

Merged
FlorianRappl merged 1 commit into
developfrom
hotfix/autoupdater-checkforchanges
Mar 26, 2026
Merged

Fixed Serialization of Release Notes#1041
FlorianRappl merged 1 commit into
developfrom
hotfix/autoupdater-checkforchanges

Conversation

@FlorianRappl
Copy link
Copy Markdown
Collaborator

Proposed fix for #1039 - normalizes the releaseNotes to always be an array of strings (except when null).

@FlorianRappl FlorianRappl added this to the 0.5.0 milestone Mar 18, 2026
@FlorianRappl FlorianRappl linked an issue Mar 18, 2026 that may be closed by this pull request
@github-actions
Copy link
Copy Markdown

pr-comment: Run #66

Tests 📝 Passed ✅ Failed ❌ Skipped ⏭️ Pending ⏳ Other ❓ Flaky 🍂 Duration ⏱️
1400 1237 1 0 0 162 0 3m 8s

Some tests failed!

Name Failure Message
❌ AutoUpdaterTests - AutoInstallOnAppQuit_check System.AggregateException : One or more errors occurred. (No response after 1000ms trying to retrieve value autoUpdater.AutoInstallOnAppQuit()) ---- System.TimeoutException : No response after 1000ms trying to retrieve value autoUpdater.AutoInstallOnAppQuit()

Github Test Reporter by CTRF 💚

@FlorianRappl FlorianRappl changed the base branch from main to develop March 25, 2026 22:27
@FlorianRappl FlorianRappl merged commit 1e8b026 into develop Mar 26, 2026
49 of 50 checks passed
GregorBiswanger added a commit that referenced this pull request May 9, 2026
… (#1061)

* fix: correct ReleaseNotes deserialization for AutoUpdater (fixes #1039)

- TypeScript normalize() now maps string releaseNotes to { note } objects
  and also handles arrays of strings (both cases were broken in PR #1041)
- Added ReleaseNotesConverter (JsonConverter<ReleaseNoteInfo[]>) as defensive
  C# layer that handles all shapes: null, string, string[], object[]
- Added [JsonConverter] attribute on UpdateInfo.ReleaseNotes
- Added unit tests (no Electron required) covering all four input shapes

* chore: sync generated autoUpdater.js and .map with updated TypeScript source

* refactor: address Copilot PR review comments

- Fix namespace: ElectronNET.Converter -> ElectronNET.API.Converter
- Replace JsonDocument.ParseValue() with JsonSerializer.Deserialize<ReleaseNoteInfo>()
  for cleaner, allocation-free object array parsing
- Fix Write(): empty ReleaseNoteInfo[] now serializes as [] instead of null
- Use Array.Empty<ReleaseNoteInfo>() in UpdateInfo default initializer
- Add tests: Serialize_WithEmptyReleaseNotes and Serialize_WithNullReleaseNotes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

AutoUpdater CheckForChanges issue

1 participant