@capgo/capacitor-patch 8.0.0 → 8.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +16 -3
- package/package.json +1 -1
- package/patches/catalog.json +671 -1
- package/patches/upstream-pr-6991-android-native-bridge.patch +15 -0
- package/patches/upstream-pr-6991-ios-native-bridge.patch +15 -0
- package/patches/upstream-pr-7301-core.patch +38 -0
- package/patches/upstream-pr-7419-ios.patch +13 -0
- package/patches/upstream-pr-7420-ios.patch +13 -0
- package/patches/upstream-pr-7446-android.patch +14 -0
- package/patches/upstream-pr-7490-android.patch +13 -0
- package/patches/upstream-pr-7490-ios.patch +13 -0
- package/patches/upstream-pr-7535-android.patch +13 -0
- package/patches/upstream-pr-7599-ios.patch +86 -0
- package/patches/upstream-pr-7732-android-native-bridge.patch +12 -0
- package/patches/upstream-pr-7732-ios-native-bridge.patch +12 -0
- package/patches/upstream-pr-7781-android.patch +24 -0
- package/patches/upstream-pr-7803-android.patch +13 -0
- package/patches/upstream-pr-7831-ios.patch +13 -0
- package/patches/upstream-pr-7987-android.patch +42 -0
- package/patches/upstream-pr-8087-android.patch +64 -0
- package/patches/upstream-pr-8188-cli.patch +18 -0
- package/patches/upstream-pr-8190-android.patch +13 -0
- package/patches/upstream-pr-8249-ios.patch +32 -0
- package/patches/upstream-pr-8252-cli.patch +31 -0
- package/patches/upstream-pr-8271-core.patch +30 -0
- package/patches/upstream-pr-8275-android.patch +158 -0
- package/patches/upstream-pr-8304-ios.patch +36 -0
- package/patches/upstream-pr-8418-android.patch +82 -0
- package/patches/upstream-pr-8424-android.patch +55 -0
- package/patches/upstream-pr-8429-android.patch +19 -0
- package/patches/upstream-pr-8454-android.patch +207 -0
- package/patches/upstream-pr-8458-cli.patch +14 -0
- package/scripts/capacitor-patch/diff.mjs +37 -6
- package/scripts/capacitor-patch/runner.mjs +38 -4
|
@@ -28,6 +28,18 @@ export async function runCapacitorPatch(options) {
|
|
|
28
28
|
});
|
|
29
29
|
}
|
|
30
30
|
|
|
31
|
+
for (const entry of selected.superseded) {
|
|
32
|
+
results.push({
|
|
33
|
+
id: entry.patch.id,
|
|
34
|
+
title: entry.patch.title,
|
|
35
|
+
phase,
|
|
36
|
+
selectedBy: entry.selectedBy,
|
|
37
|
+
status: 'skipped',
|
|
38
|
+
changedFiles: [],
|
|
39
|
+
reason: `Superseded by ${entry.supersededBy}.`,
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
|
|
31
43
|
for (const entry of selected.patches) {
|
|
32
44
|
results.push(
|
|
33
45
|
await applyCatalogPatch({
|
|
@@ -50,7 +62,7 @@ export async function runCapacitorPatch(options) {
|
|
|
50
62
|
|
|
51
63
|
return {
|
|
52
64
|
phase,
|
|
53
|
-
selectedCount: selected.patches.length + selected.unknownIds.length,
|
|
65
|
+
selectedCount: selected.patches.length + selected.unknownIds.length + selected.superseded.length,
|
|
54
66
|
results,
|
|
55
67
|
};
|
|
56
68
|
}
|
|
@@ -59,7 +71,7 @@ export function selectPatches(catalog, patchConfig, phase) {
|
|
|
59
71
|
const disabled = new Set(patchConfig.disabled);
|
|
60
72
|
const explicit = new Set(patchConfig.patches);
|
|
61
73
|
const catalogById = new Map(catalog.map((patch) => [patch.id, patch]));
|
|
62
|
-
const
|
|
74
|
+
const selectedEntries = [];
|
|
63
75
|
|
|
64
76
|
for (const patch of catalog) {
|
|
65
77
|
if (!patch?.id || patch.phase !== phase || disabled.has(patch.id)) {
|
|
@@ -67,14 +79,36 @@ export function selectPatches(catalog, patchConfig, phase) {
|
|
|
67
79
|
}
|
|
68
80
|
|
|
69
81
|
if (explicit.has(patch.id)) {
|
|
70
|
-
|
|
82
|
+
selectedEntries.push({ patch, selectedBy: 'explicit' });
|
|
71
83
|
} else if (patchConfig.recommended && patch.recommended === true) {
|
|
72
|
-
|
|
84
|
+
selectedEntries.push({ patch, selectedBy: 'recommended' });
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
const selectedIds = new Set(selectedEntries.map((entry) => entry.patch.id));
|
|
89
|
+
const supersededBy = new Map();
|
|
90
|
+
for (const entry of selectedEntries) {
|
|
91
|
+
for (const supersededId of entry.patch.supersedes ?? []) {
|
|
92
|
+
if (selectedIds.has(supersededId) && !disabled.has(supersededId)) {
|
|
93
|
+
supersededBy.set(supersededId, entry.patch.id);
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
const patches = [];
|
|
99
|
+
const superseded = [];
|
|
100
|
+
for (const entry of selectedEntries) {
|
|
101
|
+
const replacementId = supersededBy.get(entry.patch.id);
|
|
102
|
+
if (replacementId) {
|
|
103
|
+
superseded.push({ ...entry, supersededBy: replacementId });
|
|
104
|
+
} else {
|
|
105
|
+
patches.push(entry);
|
|
73
106
|
}
|
|
74
107
|
}
|
|
75
108
|
|
|
76
109
|
return {
|
|
77
110
|
patches,
|
|
111
|
+
superseded,
|
|
78
112
|
unknownIds: patchConfig.patches.filter((id) => !disabled.has(id) && !catalogById.has(id)),
|
|
79
113
|
};
|
|
80
114
|
}
|