Commit dfd64d2
authored
* fix: resolve rc precedence and metadata fallback drift
Ensure version coherence prefers stable releases over matching pre-release tags, and make fetchAll toolkit metadata resolution use the same providerId fallback path as single-toolkit fetches.
Made-with: Cursor
* refactor: split semver comparison into helpers
Reduce comparator complexity while preserving semver precedence behavior for stable and pre-release versions.
Made-with: Cursor
* refactor: simplify prerelease comparator branching
Extract optional prerelease part comparison so the semver helper stays readable and below complexity warning thresholds.
Made-with: Cursor
* test: expand version and metadata fallback coverage
Fix redundant metadata lookups in fetchToolkitData and add regression tests for semver prerelease ordering plus metadata lookup behavior across single and bulk toolkit paths.
Made-with: Cursor
* refactor: harden semver filter and simplify metadata resolution
Address review findings from six parallel reviewers:
- Use compareVersions for filter equality so semver-equal tools (e.g. @1.0.0 vs @1.0.0+build.1) no longer get silently dropped.
- Replace localeCompare("en") with ASCII byte ordering per SemVer 2.0.0 §11.4.2 so mixed-case prerelease tags rank correctly.
- Replace ambiguous best === "" sentinel with a null sentinel in getHighestVersion.
- Drop the allowToolkitIdLookup flag and lift the toolkit-id retry into the fetchAllToolkitsData call site; shared helper now only owns the *Api provider-id fallback.
- Inline single-use compareOptionalPrereleasePart and simplify comparePrereleaseIdentifier with typeof narrowing.
- Add regression tests: direct-map-hit no-relookup, patch-only version diff, ASCII prerelease ordering, string-vs-string prerelease, all-unversioned tools, semver-equal tools with differing build metadata.
Made-with: Cursor
1 parent 02c61b4 commit dfd64d2
4 files changed
Lines changed: 391 additions & 56 deletions
File tree
- toolkit-docs-generator
- src
- sources
- utils
- tests
- sources
- utils
Lines changed: 40 additions & 17 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
108 | 108 | | |
109 | 109 | | |
110 | 110 | | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
111 | 136 | | |
112 | 137 | | |
113 | 138 | | |
114 | 139 | | |
115 | 140 | | |
116 | | - | |
| 141 | + | |
117 | 142 | | |
118 | 143 | | |
119 | 144 | | |
120 | | - | |
121 | | - | |
122 | | - | |
123 | | - | |
124 | | - | |
125 | | - | |
126 | | - | |
127 | | - | |
128 | | - | |
129 | | - | |
130 | | - | |
131 | | - | |
132 | | - | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
133 | 150 | | |
134 | 151 | | |
135 | 152 | | |
| |||
184 | 201 | | |
185 | 202 | | |
186 | 203 | | |
187 | | - | |
188 | | - | |
189 | | - | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
190 | 208 | | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
191 | 214 | | |
192 | 215 | | |
193 | 216 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
4 | 9 | | |
5 | | - | |
6 | | - | |
7 | | - | |
8 | | - | |
9 | | - | |
| 10 | + | |
| 11 | + | |
10 | 12 | | |
11 | | - | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
16 | 25 | | |
17 | 26 | | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
18 | 49 | | |
19 | 50 | | |
20 | 51 | | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
27 | 56 | | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
32 | 85 | | |
33 | | - | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
34 | 91 | | |
35 | 92 | | |
| 93 | + | |
36 | 94 | | |
37 | 95 | | |
38 | 96 | | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
39 | 115 | | |
40 | 116 | | |
41 | | - | |
| 117 | + | |
42 | 118 | | |
43 | 119 | | |
44 | 120 | | |
45 | 121 | | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
| 122 | + | |
51 | 123 | | |
52 | 124 | | |
53 | | - | |
| 125 | + | |
54 | 126 | | |
55 | 127 | | |
56 | 128 | | |
57 | | - | |
58 | | - | |
| 129 | + | |
59 | 130 | | |
60 | 131 | | |
61 | 132 | | |
62 | | - | |
63 | | - | |
64 | | - | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
65 | 136 | | |
66 | | - | |
67 | | - | |
68 | | - | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
69 | 140 | | |
70 | 141 | | |
71 | 142 | | |
| |||
75 | 146 | | |
76 | 147 | | |
77 | 148 | | |
78 | | - | |
79 | 149 | | |
80 | | - | |
| 150 | + | |
81 | 151 | | |
82 | 152 | | |
83 | 153 | | |
84 | 154 | | |
85 | 155 | | |
86 | | - | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
87 | 159 | | |
0 commit comments