rn-iso 0.6.1 → 0.6.2
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/package.json +1 -1
- package/skill/SKILL.md +4 -3
- package/src/sim/ios.js +9 -3
package/package.json
CHANGED
package/skill/SKILL.md
CHANGED
|
@@ -109,9 +109,10 @@ npx rn-iso stop agent-1
|
|
|
109
109
|
|
|
110
110
|
When the iOS picker fires, sims are sorted by:
|
|
111
111
|
1. Family (iPhone before iPad before others)
|
|
112
|
-
2. State (booted before shutdown within family)
|
|
113
|
-
3.
|
|
114
|
-
4.
|
|
112
|
+
2. State (booted before shutdown within family, so an already-running sim is reused rather than booting another)
|
|
113
|
+
3. Runtime version (newest installed iOS runtime first, so `--auto`/agent runs prefer the latest runtime over older ones within the same state)
|
|
114
|
+
4. Usage count (most-used floats up; tracked per UDID across all projects)
|
|
115
|
+
5. Name (alphabetical, stable tiebreak)
|
|
115
116
|
|
|
116
117
|
When the Android picker fires, candidates include both AVDs on disk and physical devices currently visible to `adb`. They are sorted by running state (running emulators and connected physical devices first), then physical above AVDs within the same running group, then alphabetically. Physical devices show with a `[physical]` tag. Once selected, a physical device is claimed by serial just like an AVD; `release` clears the claim but never shuts the device down.
|
|
117
118
|
|
package/src/sim/ios.js
CHANGED
|
@@ -53,14 +53,20 @@ export function sortSims(sims, usage = {}) {
|
|
|
53
53
|
const fa = deviceFamilyRank(a.name);
|
|
54
54
|
const fb = deviceFamilyRank(b.name);
|
|
55
55
|
if (fa !== fb) return fa - fb;
|
|
56
|
-
// 2. State: booted before shutdown (within the same family)
|
|
56
|
+
// 2. State: booted before shutdown (within the same family), so an
|
|
57
|
+
// already-running sim is reused instead of booting another.
|
|
57
58
|
if (a.state === 'Booted' && b.state !== 'Booted') return -1;
|
|
58
59
|
if (b.state === 'Booted' && a.state !== 'Booted') return 1;
|
|
59
|
-
// 3.
|
|
60
|
+
// 3. Runtime version: newest iOS runtime first, so --auto and agent
|
|
61
|
+
// selection prefer the latest installed runtime over older ones.
|
|
62
|
+
const va = parseRuntimeVersion(a.runtime);
|
|
63
|
+
const vb = parseRuntimeVersion(b.runtime);
|
|
64
|
+
if (va !== vb) return vb.localeCompare(va, undefined, { numeric: true });
|
|
65
|
+
// 4. Usage count: descending (frequently picked sims float up).
|
|
60
66
|
const ua = usage[a.udid] || 0;
|
|
61
67
|
const ub = usage[b.udid] || 0;
|
|
62
68
|
if (ua !== ub) return ub - ua;
|
|
63
|
-
//
|
|
69
|
+
// 5. Name: stable alphabetical.
|
|
64
70
|
return a.name.localeCompare(b.name);
|
|
65
71
|
});
|
|
66
72
|
}
|