Commit 8c1f73a
committed
refactor: extract major version logic into a separate function for improved code clarity
This update introduces a new function, getMajorVersion, to encapsulate the logic for extracting the major version from a version string. This change reduces code duplication in the getFileName and getDownloadURL functions, enhancing maintainability and readability. Additionally, a new rule has been added to the cursor.mdc file to encourage avoiding code duplication.1 parent d88da96 commit 8c1f73a
2 files changed
+11
-14
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
10 | 11 | | |
11 | 12 | | |
12 | 13 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
196 | 196 | | |
197 | 197 | | |
198 | 198 | | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
199 | 207 | | |
200 | 208 | | |
201 | 209 | | |
| |||
206 | 214 | | |
207 | 215 | | |
208 | 216 | | |
209 | | - | |
210 | | - | |
211 | | - | |
212 | | - | |
213 | | - | |
214 | | - | |
215 | 217 | | |
216 | 218 | | |
217 | 219 | | |
218 | | - | |
| 220 | + | |
219 | 221 | | |
220 | 222 | | |
221 | 223 | | |
| |||
258 | 260 | | |
259 | 261 | | |
260 | 262 | | |
261 | | - | |
262 | | - | |
263 | | - | |
264 | | - | |
265 | | - | |
266 | | - | |
267 | 263 | | |
268 | 264 | | |
269 | 265 | | |
270 | | - | |
| 266 | + | |
271 | 267 | | |
272 | 268 | | |
273 | 269 | | |
| |||
0 commit comments