forgejo/web_src/js
Gusted 748da95b48 fix: compare week as numbers and not as strings (#8882)
The repository contributors graph received the stats for each author for each week, these weeks are stored as unix milis values, `Object.entries` converted these values to strings and `sort()` would thus sort them as strings - this worked without a problem for most repository.

If a repository has commits from before 'Sun Sep  9 03:46:40 AM CEST 2001', it meant that the weeks when those commits were made would be sorted towards the end because "1000000000" > "999999999" (when compared as strings) and would thus be silently cut from the data. This edge-case was seen by the curl repository (https://mastodon.social/@bagder/115018271785548165)

Sort them as numbers to avoid this problem, it being stored as strings is otherwise not a problem.

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/8882
Reviewed-by: Beowulf <beowulf@beocode.eu>
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
Co-authored-by: Gusted <postmaster@gusted.xyz>
Co-committed-by: Gusted <postmaster@gusted.xyz>
2025-08-13 22:28:12 +02:00
..
components fix: compare week as numbers and not as strings (#8882) 2025-08-13 22:28:12 +02:00
features feat: show CI status on force-pushes (#8655) 2025-08-13 03:29:36 +02:00
markup chore: Update katex import path 2024-12-18 01:17:23 +01:00
modules feat: remove fomantic's tab module (#8587) 2025-07-21 22:33:17 +02:00
render frontend: generic lazy loader for webcomponents (#8510) 2025-07-23 04:10:50 +02:00
standalone [CHORE] Proper chunking for swagger 2024-08-22 15:48:05 +02:00
utils Update dependency eslint-plugin-unicorn to v57 (forgejo) (#7181) 2025-03-09 20:49:49 +00:00
vendor Vendor jquery.are-you-sure with strict mode fixes (#26901) 2023-09-06 00:02:44 +00:00
webcomponents test: fix failure in relative-time tests in US/Canada DST-aware timezones (#8858) 2025-08-12 02:47:58 +02:00
bootstrap.js Suppress Monaco JavaScript errors in Safari (#3805) 2024-05-18 21:07:09 +00:00
bootstrap.test.js Avoid duplicate JS error messages on UI (#28873) 2024-01-21 14:23:08 +00:00
htmx.js Update dependency htmx.org to v2 (forgejo) (#8342) 2025-06-29 13:52:24 +02:00
index.js frontend: generic lazy loader for webcomponents (#8510) 2025-07-23 04:10:50 +02:00
jquery.js Forbid variables containing jQuery collections not having the $ prefix (#29839) 2024-03-20 08:46:30 +01:00
svg.js Reimplement editor Tab handling with accessibility safeguards (#6813) 2025-05-25 19:17:03 +02:00
svg.test.js Remove "class-name" from svg icon (#33540) 2025-02-25 12:56:30 +01:00
utils.js chore: add new lint rules 2024-10-23 08:10:18 +02:00
utils.test.js chore(ci): testSleep: show actual times on failures (#8271) 2025-06-25 15:58:55 +02:00
vitest.setup.js fix: compare week as numbers and not as strings (#8882) 2025-08-13 22:28:12 +02:00