mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
fix: add explicit JSON property mappings for SQRLShipItRequest model (#49980)
* fix: add explicit JSON property mappings for SQRLShipItRequest model * style: add patch body to mantle v2 fix patch
This commit is contained in:
@@ -10,3 +10,4 @@ chore_turn_off_launchapplicationaturl_deprecation_errors_in_squirrel.patch
|
||||
fix_crash_when_process_to_extract_zip_cannot_be_launched.patch
|
||||
use_uttype_class_instead_of_deprecated_uttypeconformsto.patch
|
||||
fix_clean_up_old_staged_updates_before_downloading_new_update.patch
|
||||
fix_add_explicit_json_property_mappings_for_shipit_request_model.patch
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Noah Gregory <noahmgregory@gmail.com>
|
||||
Date: Fri, 27 Feb 2026 21:29:48 -0500
|
||||
Subject: fix: add explicit JSON property mappings for ShipIt request model
|
||||
|
||||
When we rolled Mantle forward with #38437, we also implicitly upgraded
|
||||
from v1 to v2 (our prior pinned commit was from the `maintenance-v1.x`
|
||||
branch, while the new pinned commit is from the `master` branch). This
|
||||
brought in a breaking change from v2 where JSON properties must now be
|
||||
explicitly mapped. This adds such a mapping for `SQRLShipItRequest`.
|
||||
|
||||
diff --git a/Squirrel/SQRLShipItRequest.m b/Squirrel/SQRLShipItRequest.m
|
||||
index 726f91d01524e3812cb3a769db2416f6638dbca6..5f0d6de57a6ee6b0bd8a24c439f87239295bd937 100644
|
||||
--- a/Squirrel/SQRLShipItRequest.m
|
||||
+++ b/Squirrel/SQRLShipItRequest.m
|
||||
@@ -60,7 +60,13 @@ - (instancetype)initWithUpdateBundleURL:(NSURL *)updateBundleURL targetBundleURL
|
||||
#pragma mark Serialization
|
||||
|
||||
+ (NSDictionary *)JSONKeyPathsByPropertyKey {
|
||||
- return @{};
|
||||
+ return @{
|
||||
+ @keypath(SQRLShipItRequest.new, updateBundleURL): @keypath(SQRLShipItRequest.new, updateBundleURL),
|
||||
+ @keypath(SQRLShipItRequest.new, targetBundleURL): @keypath(SQRLShipItRequest.new, targetBundleURL),
|
||||
+ @keypath(SQRLShipItRequest.new, bundleIdentifier): @keypath(SQRLShipItRequest.new, bundleIdentifier),
|
||||
+ @keypath(SQRLShipItRequest.new, launchAfterInstallation): @keypath(SQRLShipItRequest.new, launchAfterInstallation),
|
||||
+ @keypath(SQRLShipItRequest.new, useUpdateBundleName): @keypath(SQRLShipItRequest.new, useUpdateBundleName),
|
||||
+ };
|
||||
}
|
||||
|
||||
+ (NSValueTransformer *)updateBundleURLJSONTransformer {
|
||||
Reference in New Issue
Block a user