Repository: electron/electron
Pull request: fix: add explicit JSON property mappings for `SQRLShipItRequest` model

#### Description of Change

This should resolve #49977. As per #49978, we may defer this for 42.

As posited in the original issue, #38437 is the change that broke this. To walk through the root cause and my proposed fix:

1. We were previously pinned to https://github.com/Mantle/Mantle/commit/78d3966b3c331292ea29ec38661b25df0a245948 (February 15, 2016, on the `1.x-maintenance` branch).
2. We then updated to https://github.com/Mantle/Mantle/commit/2a8e2123a3931038179ee06105c9e6ec336b12ea (October 18, 2022, on the `master` branch).
3. This brought us forward, but also effectively moved us from Mantle v1 to v2. In v2, [implicit property mapping was removed,](https://github.com/Mantle/Mantle/pull/170) and models now have to explicitly define properties in `+JSONKeyPathsByPropertyKey`.
4. [Squirrel.Mac currently returns an empty dictionary in `+JSONKeyPathsByPropertyKey`](https://github.com/Squirrel/Squirrel.Mac/blob/0e5d146ba13101a1302d59ea6e6e0b3cace4ae38/Squirrel/SQRLShipItRequest.m#L62-L64), which worked under v1 but no longer works under v2.
5. The resulting behavior of the above in v2 is that, [when `SQRLShipItRequest` calls `[super initWithDictionary:error:]`,](https://github.com/Squirrel/Squirrel.Mac/blob/0e5d146ba13101a1302d59ea6e6e0b3cace4ae38/Squirrel/SQRLShipItRequest.m#L26) an empty dictionary is returned (with no properties, since Mantle is unaware of any of them). This then trips the validation checks later in that method.
6. This PR includes a patch for `Squirrel.Mac` to explicitly define the expected properties in `+JSONKeyPathsByPropertyKey`.

I expect this to work, but I have not fully tested it end-to-end as I lack a good reproduction setup for this specific update flow. Any help on that front would be greatly appreciated.

Additionally, as mentioned above, I'm ok with deferring this to 42 if need be.

#### Checklist

- [x] PR description included
- [x] I have built and ~~tested~~ this PR
- [ ] `npm test` passes
- [x] [PR release notes](https://github.com/electron/clerk/blob/main/README.md) describe the change in a way relevant to app developers, and are [capitalized, punctuated, and past tense](https://github.com/electron/clerk/blob/main/README.md#examples).

#### Release Notes

Notes: Fixed dependency issue that caused Squirrel.Mac updates to fail.


Changed files:
filename: patches/squirrel.mac/.patches
patch: @@ -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

filename: patches/squirrel.mac/fix_add_explicit_json_property_mappings_for_shipit_request_model.patch
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 {