-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
feat(updater): Cache the new blockmap file and allow customization of the old blockmap file base URL. #9172
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
beyondkmp
merged 12 commits into
electron-userland:master
from
beyondkmp:oldblockmapfilecustom
Jun 22, 2025
Merged
feat(updater): Cache the new blockmap file and allow customization of the old blockmap file base URL. #9172
beyondkmp
merged 12 commits into
electron-userland:master
from
beyondkmp:oldblockmapfilecustom
Jun 22, 2025
+60
−10
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…s function - Introduced `oldBlockMapFileBaseUrl` property in AppUpdater class to specify the base URL for the old block map file. - Updated `blockmapFiles` function to accept an optional `oldBlockMapFileBaseUrl` parameter, allowing for more flexible block map URL generation.
🦋 Changeset detectedLatest commit: 9d0b8a3 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
… setter - Changed `oldBlockMapFileBaseUrl` to a private property and added public getter and setter methods for better encapsulation. - Updated references in the `blockmapFiles` function to use the new private property. - Cleaned up the logic for generating the old block map URL in the `blockmapFiles` function.
mmaietta
reviewed
Jun 19, 2025
packages/electron-updater/src/differentialDownloader/multipleRangeDownloader.ts
Outdated
Show resolved
Hide resolved
mmaietta
reviewed
Jun 19, 2025
This looks good! |
- Added detailed comments explaining the behavior of the oldBlockMapFileBaseUrl property in the AppUpdater class. - Clarified the conditions under which the updater uses the base URL for the old block map file.
mmaietta
reviewed
Jun 20, 2025
Left a comment, but otherwise this LGTM! Nice work! |
…apBaseUrlOverride - Renamed the property `oldBlockMapFileBaseUrl` to `previousBlockmapBaseUrlOverride` for clarity. - Removed the getter and setter methods associated with the old property to simplify the code structure.
…mapBaseUrlOverride - Changed the reference in the blockmapFiles function to use the new property `previousBlockmapBaseUrlOverride` instead of the deprecated `oldBlockMapFileBaseUrl`.
mmaietta
approved these changes
Jun 21, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Currently, downloading updates from GitHub's Latest Release does not support delta updates. This is mainly due to the inability to download the old map file. Now, by adding a configuration that allows users to customize the old map file URL, users can define the old map file URL themselves. This makes it possible to achieve delta updates without modifying the server side.
Cache the new blockmap file, and during the next update, prioritize reading it from the local cache. This reduces requests for the blockmap and allows delta updates even if the old version’s blockmap file is no longer available on the server.
Fix #8811