Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
272 commits
Select commit Hold shift + click to select a range
8d5ee71
enableling gfm for changelogs
WilcoSp Feb 20, 2026
34faad0
the changelog info api endpoint will now give the info when a changel…
WilcoSp Feb 20, 2026
55d45f3
now also able to render changelog markdown files
WilcoSp Feb 20, 2026
9c36c60
Merge branch 'main' into feat/changelog-1
WilcoSp Feb 20, 2026
95e3699
added heading links for changelog markdown
WilcoSp Feb 21, 2026
9f9195d
release card header links can now also be clicked to navigate to
WilcoSp Feb 21, 2026
f2d5f2b
Merge branch 'npmx-dev:main' into feat/changelog-1
WilcoSp Feb 22, 2026
cab3cc6
when the latest gh release contains a link to a changelog.md the chan…
WilcoSp Feb 22, 2026
342adca
Merge branch 'main' into feat/changelog-1
WilcoSp Feb 22, 2026
1a8c342
re exporting slugify
WilcoSp Feb 22, 2026
fbbff33
Merge branch 'npmx-dev:main' into feat/changelog-1
WilcoSp Feb 23, 2026
08717bc
adding back removing non bracking spaces, :emoji: support now also ad…
WilcoSp Feb 23, 2026
e07af6c
added indication that release is pre-release/draft
WilcoSp Feb 23, 2026
8225654
Merge branch 'npmx-dev:main' into feat/changelog-1
WilcoSp Feb 24, 2026
013654c
preventing package@version from being turned into mailto
WilcoSp Feb 24, 2026
6cbe6e8
changed how content-none is applied for changelog.md
WilcoSp Feb 24, 2026
1d93405
for changelog.md now resolving url
WilcoSp Feb 24, 2026
f6ec86e
relative/absolute resolved urls will stay within the base url
WilcoSp Feb 24, 2026
6198a71
id with release id will now be applied to all elements
WilcoSp Feb 24, 2026
2c057b9
Added button to view changelog/releases on the provider website.
WilcoSp Feb 25, 2026
ce34993
added a div which reservers the space for toc
WilcoSp Feb 25, 2026
fd15403
Merge branch 'main' into feat/changelog-1
WilcoSp Feb 25, 2026
04b2a99
adding back .tolowercase in slugify to have test pass again
WilcoSp Feb 25, 2026
746464f
Merge branch 'main' into feat/changelog-1
WilcoSp Feb 26, 2026
750072c
fixing some (minor) things caught by coderabbitai
WilcoSp Feb 26, 2026
6e6ee3a
..
WilcoSp Feb 26, 2026
0cab1e8
improving intermediateTitleAttr
WilcoSp Feb 26, 2026
4de0348
removing unneeded comment
WilcoSp Feb 26, 2026
5f4520f
removing resolving explicitly ./ & ../ comment
WilcoSp Feb 26, 2026
81f68b6
Merge branch 'main' into feat/changelog-1
WilcoSp Feb 26, 2026
6d0edfd
[autofix.ci] apply automated fixes
autofix-ci[bot] Feb 26, 2026
f9c0736
adding view_on translation to kn_IN (autofix removed it)
WilcoSp Feb 26, 2026
d48654a
Merge branch 'main' into feat/changelog-1
WilcoSp Feb 27, 2026
a67f039
Merge branch 'main' into feat/changelog-1
WilcoSp Feb 27, 2026
08828b8
adding ogImage to package changes page
WilcoSp Feb 27, 2026
5f1be8a
fixed version selector by adding latestVersion
WilcoSp Feb 27, 2026
d71dfd9
Merge branch 'npmx-dev:main' into feat/changelog-1
WilcoSp Feb 28, 2026
503b4df
for releases the date is now being used to send you as close as possi…
WilcoSp Feb 28, 2026
cfc8612
removing unused pending variable
WilcoSp Feb 28, 2026
e2fc2d2
removing console log
WilcoSp Feb 28, 2026
47431f5
switching from encodeURIComponent to encodeURI for changelog card navid
WilcoSp Feb 28, 2026
c43514b
Merge branch 'main' into feat/changelog-1
WilcoSp Mar 1, 2026
ef72002
disableling ogImage for package changes page as it has been changed a…
WilcoSp Mar 1, 2026
886dd9f
Merge branch 'main' into feat/changelog-1
WilcoSp Mar 1, 2026
40e8f2b
[autofix.ci] apply automated fixes
autofix-ci[bot] Mar 1, 2026
299b45c
adding view_on to fr_TR
WilcoSp Mar 1, 2026
2de6f9f
Merge branch 'main' into feat/changelog-1
WilcoSp Mar 2, 2026
6915b33
Merge branch 'npmx-dev:main' into feat/changelog-1
WilcoSp Mar 3, 2026
89cae7e
for releases now also matching on version in release title for scrolling
WilcoSp Mar 3, 2026
bdcf1a7
Merge branch 'feat/changelog-1' of github.com:WilcoSp/npmx.dev into f…
WilcoSp Mar 3, 2026
133aa39
now also matching to version with changelog.md
WilcoSp Mar 3, 2026
ce053be
Merge branch 'main' into feat/changelog-1
WilcoSp Mar 3, 2026
8b5311c
added better checks/detecting for monorepos using changelog.md
WilcoSp Mar 4, 2026
eb96164
Merge branch 'main' into feat/changelog-1
WilcoSp Mar 4, 2026
7c99b43
Merge branch 'feat/changelog-1' of github.com:WilcoSp/npmx.dev into f…
WilcoSp Mar 4, 2026
ddd4121
ensuring toc will always be at the end for changelog
WilcoSp Mar 5, 2026
bb8b09f
Merge branch 'main' into feat/changelog-1
WilcoSp Mar 5, 2026
fabc65d
Merge branch 'main' into feat/changelog-1
WilcoSp Mar 9, 2026
443341b
moved slugify to `shared/utils/html.ts` to allow usage in the front &…
WilcoSp Mar 9, 2026
c54c406
changelog page now using useViewOnGitProvider
WilcoSp Mar 9, 2026
267880f
Merge branch 'main' into feat/changelog-1
WilcoSp Mar 10, 2026
9427f0f
Merge branch 'main' into feat/changelog-1
WilcoSp Mar 11, 2026
94f2571
Merge branch 'main' into feat/changelog-1
WilcoSp Mar 12, 2026
43306af
Merge branch 'main' into feat/changelog-1
WilcoSp Mar 13, 2026
41e395f
added changelog to packageHeader & switched changelog to use the pack…
WilcoSp Mar 13, 2026
aaea9ee
showing skeleton loaders for changelog.
WilcoSp Mar 13, 2026
327dd42
fixed height for sticky header changelog
WilcoSp Mar 13, 2026
6d140ab
n in 5 -> _n of 5 due to type check
WilcoSp Mar 13, 2026
a9d09b3
Merge branch 'main' into feat/changelog-1
WilcoSp Mar 13, 2026
96bf944
removing docsLink, earlier merge hadn't removed it
WilcoSp Mar 13, 2026
04b2c21
Merge branch 'feat/changelog-1' of github.com:WilcoSp/npmx.dev into f…
WilcoSp Mar 13, 2026
7da82ae
skeleton loaders are now being displayed when loading the releases/ma…
WilcoSp Mar 13, 2026
850e5c8
..
WilcoSp Mar 13, 2026
c1e91e9
fixed going to latest & changed going to has to only client side
WilcoSp Mar 13, 2026
609395e
moved from [...path] -> [[org]]/[name] ....
WilcoSp Mar 14, 2026
314d49f
the version will now be resolved like on the package page so no more …
WilcoSp Mar 14, 2026
a9d9802
fixed issue to where the prev version was jumped to while resolving v…
WilcoSp Mar 14, 2026
dcbbdac
the sticky header is now always one with toc instead of github
WilcoSp Mar 14, 2026
f7377d5
fixed missing tocHeaderClass in a11y tests
WilcoSp Mar 14, 2026
732268d
added the shortcut for 'm' & '-'
WilcoSp Mar 14, 2026
0c441b2
..
WilcoSp Mar 14, 2026
435b569
Merge branch 'main' into feat/changelog-1
WilcoSp Mar 14, 2026
f3c1759
changelog will tab will always be visible when on changelog page
WilcoSp Mar 15, 2026
c0f3c44
Merge branch 'feat/changelog-1' of github.com:WilcoSp/npmx.dev into f…
WilcoSp Mar 15, 2026
6757ae0
Merge branch 'main' into feat/changelog-1
WilcoSp Mar 15, 2026
c77f335
fix: use idPrefix for release in resolveUrl
WilcoSp Mar 16, 2026
fcacad8
removing target when url doesn't have protocol (for example when poin…
WilcoSp Mar 16, 2026
21a7d5f
Merge branch 'feat/changelog-1' of github.com:WilcoSp/npmx.dev into f…
WilcoSp Mar 16, 2026
5180309
Merge branch 'main' into feat/changelog-1
WilcoSp Mar 16, 2026
9d7aff1
Merge branch 'main' into feat/changelog-1
WilcoSp Mar 17, 2026
2d9609c
Merge branch 'feat/changelog-1' of github.com:WilcoSp/npmx.dev into f…
WilcoSp Mar 17, 2026
5630b1c
applying most changes recommended from review (thanks alexdln)
WilcoSp Mar 18, 2026
a2e0c16
Merge branch 'main' into feat/changelog-1
WilcoSp Mar 18, 2026
22ccc27
fixing ci issues
WilcoSp Mar 18, 2026
85e2cb0
changed the watch to watcheffect for navigating to the specific version
WilcoSp Mar 19, 2026
172f758
moved changelog routing from 'changes' -> 'changelog'
WilcoSp Mar 19, 2026
acea1fd
detecting now when ungh.cc has exhausted it's api keys
WilcoSp Mar 19, 2026
246fc86
added error message when ungh's api keys are exhausted
WilcoSp Mar 19, 2026
07c28a9
preparing merging with main
WilcoSp Mar 19, 2026
ee38fbd
Merge branch 'main' into feat/changelog-1
WilcoSp Mar 19, 2026
f9475fd
updated i18n schema
WilcoSp Mar 19, 2026
b93bf44
switch to nuxtError due to ci issues
WilcoSp Mar 19, 2026
78ba6f7
..
WilcoSp Mar 19, 2026
e70f094
Merge branch 'main' into feat/changelog-1
WilcoSp Mar 20, 2026
ddddc63
Merge branch 'main' into feat/changelog-1
ghostdevv Mar 20, 2026
9036e81
Merge branch 'main' into feat/changelog-1
WilcoSp Mar 20, 2026
479a1c4
Merge branch 'main' into feat/changelog-1
WilcoSp Mar 22, 2026
52151ba
fixing things the merge broke
WilcoSp Mar 22, 2026
2ff9374
added 429 to detect key exhaustion
WilcoSp Mar 22, 2026
b512aea
fixed schema for ci
WilcoSp Mar 22, 2026
2a439b4
Merge branch 'main' into feat/changelog-1
WilcoSp Mar 24, 2026
9caf56b
..
WilcoSp Mar 24, 2026
ee5e892
Merge branch 'main' into feat/changelog-1
WilcoSp Mar 25, 2026
5e6ee46
changed how the ::after icon is unset for changelog
WilcoSp Mar 25, 2026
3a86ab8
Merge branch 'main' into feat/changelog-1
WilcoSp Mar 25, 2026
44fffff
Merge branch 'npmx-dev:main' into feat/changelog-1
WilcoSp Mar 27, 2026
4433716
added padding to changelog markdown component
WilcoSp Mar 27, 2026
22901bc
[autofix.ci] apply automated fixes
autofix-ci[bot] Mar 27, 2026
ef51c3d
Merge branch 'main' into feat/changelog-1
WilcoSp Mar 27, 2026
200d861
adding flush post, this should hopefully make the auto scrolling more…
WilcoSp Mar 28, 2026
d8f7ed0
reverted lazyChangelogCard & hydrate-on-interaction because auto scro…
WilcoSp Mar 28, 2026
66f2de2
..
WilcoSp Mar 28, 2026
9714514
added index.vue for changelog which did fix some issues
WilcoSp Mar 30, 2026
3ff1c44
adding french translation for changelog (thanks @WarningImHack3r / An…
WilcoSp Mar 30, 2026
3cec9bd
Merge branch 'main' into feat/changelog-1
WilcoSp Mar 30, 2026
edd7541
Merge branch 'feat/changelog-1' of github.com:WilcoSp/npmx.dev into f…
WilcoSp Mar 30, 2026
07eadba
made it that the anchor link for heading in readme is visible over th…
WilcoSp Mar 30, 2026
d15e2e9
resolving version now happens in the background when switching versio…
WilcoSp Mar 31, 2026
d35024f
..
WilcoSp Mar 31, 2026
41e68b5
added translation for "version_unavailable", thanks @WarningImHack3r…
WilcoSp Mar 31, 2026
2faf5ec
Merge branch 'main' into feat/changelog-1
WilcoSp Mar 31, 2026
67cb175
fixed schema
WilcoSp Mar 31, 2026
82c6a38
[autofix.ci] apply automated fixes
autofix-ci[bot] Mar 31, 2026
f983c39
Merge branch 'main' into feat/changelog-1
WilcoSp Apr 2, 2026
a4f7218
fix ci
WilcoSp Apr 2, 2026
7715d63
Merge branch 'main' into feat/changelog-1
WilcoSp Apr 3, 2026
eee5965
Merge branch 'main' into feat/changelog-1
WilcoSp Apr 7, 2026
001f54e
removing merge artifact
WilcoSp Apr 7, 2026
d4bce55
Merge branch 'feat/changelog-1' of github.com:WilcoSp/npmx.dev into f…
WilcoSp Apr 7, 2026
17d570e
Merge branch 'npmx-dev:main' into feat/changelog-1
WilcoSp Apr 9, 2026
3be30b1
Merge branch 'npmx-dev:main' into feat/changelog-1
WilcoSp Apr 10, 2026
dca8094
updated command pallet to include changelog
WilcoSp Apr 11, 2026
73dd529
Merge branch 'feat/changelog-1' of github.com:WilcoSp/npmx.dev into f…
WilcoSp Apr 11, 2026
aa2a894
refined the routing for the changelog info api & latest will now only…
WilcoSp Apr 13, 2026
68777c9
Merge branch 'main' into feat/changelog-1
WilcoSp Apr 14, 2026
2076078
translated changelog text to Dutch + code_ligatures, githubStars, git…
WilcoSp Apr 14, 2026
07b1caa
moved codeHightlight, blockqoute and some other things
WilcoSp Apr 14, 2026
3e8276c
links have been moved to mdKit
WilcoSp Apr 14, 2026
c8d8027
Merge branch 'main' into feat/changelog-1
WilcoSp Apr 15, 2026
39e2035
heading is now being shared, not happy yet with how id is being done yet
WilcoSp Apr 15, 2026
564506f
..
WilcoSp Apr 15, 2026
757b0d1
Merge branch 'main' into feat/changelog-1
WilcoSp Apr 17, 2026
17cf46e
added 1 for timelink link & correct npm-register translations for Dutch
WilcoSp Apr 17, 2026
abe8870
Merge branch 'feat/changelog-1' of github.com:WilcoSp/npmx.dev into f…
WilcoSp Apr 17, 2026
04a79ed
Merge branch 'npmx-dev:main' into feat/changelog-1
WilcoSp Apr 18, 2026
e53d289
currently changed ogImage for changelog to the one for Page, it would…
WilcoSp Apr 18, 2026
c51b977
Merge branch 'main' into feat/changelog-1
WilcoSp Apr 18, 2026
aef1dc9
Merge branch 'feat/changelog-1' into feat/markdown-kit
WilcoSp Apr 19, 2026
267f6f0
the handling of anchors in headings is now more consistent, when <a> …
WilcoSp Apr 19, 2026
f4db624
moved handling of html heading+link & the heading extension for marke…
WilcoSp Apr 19, 2026
1432806
corrected test description to new behavior
WilcoSp Apr 19, 2026
48938cc
Merge branch 'main' into feat/changelog-1
WilcoSp Apr 20, 2026
4a6349f
..
WilcoSp Apr 21, 2026
0dafd12
Merge branch 'main' into feat/changelog-1
WilcoSp Apr 21, 2026
8d24e10
Merge branch 'feat/changelog-1' of github.com:WilcoSp/npmx.dev into f…
WilcoSp Apr 21, 2026
3d1c449
og image, fixed the title
WilcoSp Apr 21, 2026
cdf3cac
moved image to mdkit & starting with moving sanitizeHtml
WilcoSp Apr 22, 2026
02efe38
completed sanitizeRawHTML
WilcoSp Apr 24, 2026
60cc71c
Merge branch 'feat/changelog-1' into feat/markdown-kit
WilcoSp Apr 24, 2026
6e93052
fixed not adding # for changelog md, added missing import
WilcoSp Apr 24, 2026
d5404ef
moved decodeHashFragment to mdkit to allow changelog to also use it
WilcoSp Apr 24, 2026
8b73585
adding back comment for anchor sanitization
WilcoSp Apr 24, 2026
57709ba
handling html heading better for changelog.md
WilcoSp Apr 24, 2026
1dc18db
starting with making tests for changelog's markdown renderer
WilcoSp Apr 24, 2026
fe161e9
fixed issue resolving relative urls
WilcoSp Apr 24, 2026
50f498f
Merge branch 'feat/changelog-1' into feat/markdown-kit
WilcoSp Apr 24, 2026
b397900
all route variants are now being tested
WilcoSp Apr 24, 2026
4d82191
now correctly fixed resolving path
WilcoSp Apr 24, 2026
31daed5
Merge branch 'npmx-dev:main' into feat/changelog-1
WilcoSp Apr 26, 2026
1692657
fixed resolving npmjs -> npmx url for changelog
WilcoSp Apr 26, 2026
7a6ea88
..
WilcoSp Apr 26, 2026
2726303
fixing resolving npmjs -> npmx urls
WilcoSp Apr 26, 2026
8a5eb66
Merge branch 'feat/changelog-1' of github.com:WilcoSp/npmx.dev into f…
WilcoSp Apr 26, 2026
38696ef
Merge branch 'feat/changelog-1' into feat/markdown-kit
WilcoSp Apr 26, 2026
2739315
..
WilcoSp Apr 26, 2026
e7b1254
added tests for correct heading level & fixed heading level starting …
WilcoSp Apr 28, 2026
c7340c0
added test for package@version
WilcoSp Apr 28, 2026
fdb0c9f
Merge branch 'npmx-dev:main' into feat/changelog-1
WilcoSp Apr 28, 2026
a9e7e4a
Merge branch 'feat/changelog-1' into feat/markdown-kit
WilcoSp Apr 29, 2026
48a9f4e
Merge branch 'main' into feat/changelog-1
WilcoSp May 3, 2026
771aa74
Merge branch 'npmx-dev:main' into feat/changelog-1
WilcoSp May 5, 2026
0d4e14e
Merge branch 'feat/changelog-1' into feat/markdown-kit
WilcoSp May 5, 2026
1e6a73b
Merge branch 'feat/markdown-kit' of github.com:WilcoSp/npmx.dev into …
WilcoSp May 5, 2026
891e90b
fixed matching more exacter the requested version for changelog.md
WilcoSp May 6, 2026
ed22222
Merge branch 'main' into feat/changelog-1
WilcoSp May 9, 2026
727dbae
fix remove whatsapp og image
WilcoSp May 9, 2026
9b49528
Merge branch 'feat/changelog-1' into feat/markdown-kit
WilcoSp May 10, 2026
78264c5
fixed text -> application for json mime type
WilcoSp May 10, 2026
52cc1f9
Merge branch 'main' into feat/changelog-1
WilcoSp May 10, 2026
ccbac72
fix type mime type json at usePackageChangelog
WilcoSp May 10, 2026
94c243f
Merge branch 'feat/changelog-1' into feat/markdown-kit
WilcoSp May 10, 2026
3cf1c84
Merge branch 'main' into feat/markdown-kit
WilcoSp May 11, 2026
7a6ed94
applied suggested changes (except for command pallette)
WilcoSp May 12, 2026
e3bafc5
fixed bug to which command pallette caused changelog not being fetch …
WilcoSp May 13, 2026
f504d2f
Merge branch 'npmx-dev:main' into feat/markdown-kit
WilcoSp May 13, 2026
4e23226
changed has changelog key
WilcoSp May 13, 2026
932dbce
moved skeleton layout to it's own component
WilcoSp May 14, 2026
11acac8
Merge branch 'npmx-dev:main' into feat/markdown-kit
WilcoSp May 15, 2026
225f8b9
fixed some issues found by code rabbit
WilcoSp May 15, 2026
4e65ff8
Merge branch 'feat/markdown-kit' of github.com:WilcoSp/npmx.dev into …
WilcoSp May 15, 2026
c335353
updated tests to include the aria-hidden & tabindex
WilcoSp May 15, 2026
568acc2
adding link at changelogCard to view the release on github (& future …
WilcoSp May 15, 2026
b4b09b3
fixed missing things
WilcoSp May 15, 2026
fec1a02
removing suspense comments
WilcoSp May 15, 2026
51e8175
Merge branch 'main' into feat/markdown-kit
WilcoSp May 20, 2026
6918716
Merge branch 'main' into feat/markdown-kit
WilcoSp May 30, 2026
e8538fd
changed ungh.cc files to raw.githubusercontent to prevent any api cha…
WilcoSp May 30, 2026
9ede482
changelog.md & releases from forgejo/codeberg can now be detected
WilcoSp May 30, 2026
4ef1d58
fix: adding useProviderIcon to the include list for unocss
WilcoSp May 30, 2026
5d602de
fixed type weekelijkse -> wekelijkse
WilcoSp May 30, 2026
4487bc1
src -> ** (rabbit)
WilcoSp May 30, 2026
cfbd690
Merge branch 'feat/markdown-kit' into feat/changelog-forgejo
WilcoSp May 31, 2026
25c6750
codeberg/forgeje releases & changelog.md can now also be viewed
WilcoSp May 31, 2026
f53bc2b
adding singlular form for deps increase/decrease for NL
WilcoSp May 31, 2026
91e784a
Merge branch 'main' into feat/markdown-kit
WilcoSp May 31, 2026
57caab4
Merge branch 'feat/markdown-kit' of github.com:WilcoSp/npmx.dev into …
WilcoSp May 31, 2026
93a14a2
adding recent translations to Dutch
WilcoSp May 31, 2026
acdf8f8
changed the return for checkingReleases to a tuple safe return type
WilcoSp Jun 1, 2026
51c0587
removing test in schema
WilcoSp Jun 1, 2026
b05b46f
isError to instanceof
WilcoSp Jun 1, 2026
75485d7
Merge branch 'main' into feat/markdown-kit
WilcoSp Jun 3, 2026
e17e8bd
Merge branch 'main' into feat/markdown-kit
WilcoSp Jun 6, 2026
a2e52fd
Merge branch 'npmx-dev:main' into feat/markdown-kit
WilcoSp Jun 8, 2026
7766c7b
fixed issue where issues/PRs were being turned into headings if they …
WilcoSp Jun 8, 2026
2d76d06
fixed issue where readme global marked overwrote heading extension fo…
WilcoSp Jun 8, 2026
5cb8ef3
Merge branch 'main' into feat/markdown-kit
WilcoSp Jun 15, 2026
89e0cc5
moved the markedInstance into the renderToRawHtml param object
WilcoSp Jun 17, 2026
b45e270
Merge branch 'feat/markdown-kit' of github.com:WilcoSp/npmx.dev into …
WilcoSp Jun 17, 2026
16339ee
Merge branch 'feat/markdown-kit' into feat/changelog-forgejo
WilcoSp Jun 17, 2026
8954ae0
Merge branch 'main' into feat/markdown-kit
WilcoSp Jun 18, 2026
94a1617
resolving autoLinks for git reposities. for example /pull/1 -> #1
WilcoSp Jun 20, 2026
9df9b45
pr, issues & accounts in plain text will now also be turned into links
WilcoSp Jun 20, 2026
bc0864f
commits will now also be matched to be created into a link
WilcoSp Jun 22, 2026
8bfe917
Merge branch 'npmx-dev:main' into feat/markdown-kit
WilcoSp Jun 27, 2026
004c212
Merge branch 'main' into feat/markdown-kit
WilcoSp Jul 1, 2026
c6ec916
Merge branch 'feat/markdown-kit' into feat/changelog-forgejo
WilcoSp Jul 1, 2026
f841604
added tests for plaintext -> link and unformatted/auto links to forma…
WilcoSp Jul 1, 2026
580df00
fixed potential issue of formatting a issue/pr also into a commit
WilcoSp Jul 1, 2026
6228cf2
Merge branch 'main' into changelog/format-link+git-providers+copy-mar…
WilcoSp Jul 1, 2026
f02e5ad
able to detect releases & changelog.md for gitlab
WilcoSp Jul 1, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions app/components/Changelog/Markdown.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@ const route = useRoute()

const { data, error, pending } = useLazyFetch(
() => `/api/changelog/md/${info.provider}/${info.repo}/${info.path}`,
{
query: {
host: computed(() => info.host),
},
},
)

if (import.meta.client) {
Expand Down
6 changes: 5 additions & 1 deletion app/components/Changelog/Releases.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,11 @@ const {
data: releases,
error,
pending,
} = useLazyFetch<ReleaseData[]>(() => `/api/changelog/releases/${info.provider}/${info.repo}`)
} = useLazyFetch<ReleaseData[]>(() => `/api/changelog/releases/${info.provider}/${info.repo}`, {
query: {
host: computed(() => info.host),
},
})

const route = useRoute()

Expand Down
23 changes: 16 additions & 7 deletions server/api/changelog/md/[provider]/[owner]/[repo]/[...path].get.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import * as v from 'valibot'
import { createForgejoRepoInfo, createGithubRepoInfo } from '~~/server/utils/changelog/mdRepoInfo'
import {
ERROR_CHANGELOG_FILE_FAILED,
ERROR_THROW_INCOMPLETE_PARAM,
Expand All @@ -11,6 +12,9 @@ export default defineCachedEventHandler(
const owner = getRouterParam(event, 'owner')
const path = getRouterParam(event, 'path')

const rawQuery = getQuery(event)
const { host } = v.parse(v.object({ host: v.optional(v.string()) }), rawQuery)

if (!repo || !provider || !owner || !path) {
throw createError({
status: 404,
Expand All @@ -22,6 +26,9 @@ export default defineCachedEventHandler(
switch (provider as ProviderId) {
case 'github':
return await getGithubMarkDown(owner, repo, path)
case 'codeberg':
case 'forgejo':
return await getForgejoMarkdown(owner, repo, path, host ?? 'codeberg.org')

default:
throw createError({
Expand Down Expand Up @@ -55,11 +62,13 @@ async function getGithubMarkDown(owner: string, repo: string, path: string) {

const markdown = v.parse(v.string(), data)

return (
await changelogRenderer({
blobBaseUrl: `https://github.com/${owner}/${repo}/blob/HEAD`,
rawBaseUrl: `https://raw.githubusercontent.com/${owner}/${repo}/HEAD`,
path,
})
)(markdown)
return (await changelogRenderer(createGithubRepoInfo(owner, repo, path)))(markdown)
}

async function getForgejoMarkdown(owner: string, repo: string, path: string, host: string) {
const data = await $fetch(`https://${host}/${owner}/${repo}/raw/branch/HEAD/${path}`)

const markdown = v.parse(v.string(), data)

return (await changelogRenderer(createForgejoRepoInfo(host, owner, repo, path)))(markdown)
}
39 changes: 34 additions & 5 deletions server/api/changelog/releases/[provider]/[owner]/[repo].get.ts
Original file line number Diff line number Diff line change
@@ -1,19 +1,27 @@
import type { ProviderId } from '~~/shared/utils/git-providers'
import type { ReleaseData } from '~~/shared/types/changelog'
import * as v from 'valibot'
import {
ERROR_CHANGELOG_RELEASES_FAILED,
ERROR_THROW_INCOMPLETE_PARAM,
} from '~~/shared/utils/constants'
import { GithubReleaseCollectionSchama } from '~~/shared/schemas/changelog/release'
import {
GithubReleaseCollectionSchama,
ForgejoReleaseCollectionSchema,
} from '~~/shared/schemas/changelog/release'
import { parse } from 'valibot'
import { changelogRenderer } from '~~/server/utils/changelog/markdown'
import { createForgejoRepoInfo, createGithubRepoInfo } from '~~/server/utils/changelog/mdRepoInfo'

export default defineCachedEventHandler(
async event => {
const provider = getRouterParam(event, 'provider')
const repo = getRouterParam(event, 'repo')
const owner = getRouterParam(event, 'owner')

const rawQuery = getQuery(event)
const { host } = v.parse(v.object({ host: v.optional(v.string()) }), rawQuery)

if (!repo || !provider || !owner) {
throw createError({
status: 404,
Expand All @@ -25,6 +33,9 @@ export default defineCachedEventHandler(
switch (provider as ProviderId) {
case 'github':
return await getReleasesFromGithub(owner, repo)
case 'codeberg':
case 'forgejo':
return await getReleasesFromForgejo(owner, repo, host ?? 'codeberg.org')

default:
throw createError({
Expand Down Expand Up @@ -62,10 +73,7 @@ async function getReleasesFromGithub(owner: string, repo: string) {

const { releases } = parse(GithubReleaseCollectionSchama, data)

const render = await changelogRenderer({
blobBaseUrl: `https://github.com/${owner}/${repo}/blob/HEAD`,
rawBaseUrl: `https://raw.githubusercontent.com/${owner}/${repo}/HEAD`,
})
const render = await changelogRenderer(createGithubRepoInfo(owner, repo))

return releases.map(r => {
const { html, toc } = render(r.markdown, r.id)
Expand All @@ -82,3 +90,24 @@ async function getReleasesFromGithub(owner: string, repo: string) {
} satisfies ReleaseData
})
}

async function getReleasesFromForgejo(owner: string, repo: string, host: string) {
const data = await $fetch(`https://${host}/api/v1/repos/${owner}/${repo}/releases?draft=false`)
const releases = parse(ForgejoReleaseCollectionSchema, data)

const render = await changelogRenderer(createForgejoRepoInfo(host, owner, repo))

return releases.map(r => {
const { html, toc } = render(r.body, r.id)
return {
id: r.id,
html: html?.replace(/(?<!>)\n/g, '<br>') ?? null,
title: r.name || r.tag_name,
prerelease: r.prerelease,
toc,
link: r.html_url,
publishedAt: r.published_at,
draft: r.draft,
} satisfies ReleaseData
})
}
166 changes: 162 additions & 4 deletions server/utils/changelog/detectChangelog.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,11 @@ import { FetchError } from 'ofetch'
import type { ExtendedPackageJson } from '~~/shared/utils/package-analysis'
import { type RepoRef, parseRepoUrl } from '~~/shared/utils/git-providers'
import { ERROR_CHANGELOG_NOT_FOUND, ERROR_UNGH_API_KEY_EXHAUSTED } from '~~/shared/utils/constants'
import { GithubReleaseSchama } from '~~/shared/schemas/changelog/release'
import {
GithubReleaseSchama,
ForgejoReleaseSchama,
GitlabReleaseSchame,
} from '~~/shared/schemas/changelog/release'
import { resolveURL } from 'ufo'
import * as v from 'valibot'

Expand Down Expand Up @@ -56,12 +60,17 @@ async function checkReleases(
case 'github': {
return checkLatestGithubRelease(ref, directory)
}
case 'codeberg':
case 'forgejo': {
return checkLatestForgejoRelease(ref, directory)
}
case 'gitlab': {
return checkLatestGitlabRelease(ref, directory)
}
}
return [false, null]
}

/// releases

const MD_REGEX = /(?<=\[.*?(changelog|releases|changes|history|news)\.md.*?\]\()(.*?)(?=\))/i
const ROOT_ONLY_REGEX = /^\/[^/]+$/

Expand Down Expand Up @@ -180,8 +189,9 @@ async function checkFiles(ref: RepoRef, baseUrl: RepoFileUrl, dir?: string) {
type: 'md',
provider: ref.provider,
path: resolveURL(dir ?? '', fileName),
repo: `${ref.owner}/${ref.repo}`,
repo: `${encodeURIComponent(ref.owner)}/${encodeURIComponent(ref.repo)}`,
link: resolveURL(baseUrl.blob, dir ?? '', fileName),
host: ref.host,
} satisfies ChangelogMarkdownInfo
}
}
Expand All @@ -200,6 +210,154 @@ function getBaseFileUrl(ref: RepoRef): RepoFileUrl | null {
raw: `https://raw.githubusercontent.com/${ref.owner}/${ref.repo}/HEAD`,
blob: `https://github.com/${ref.owner}/${ref.repo}/blob/HEAD`,
}
case 'codeberg':
case 'forgejo': {
const host = ref.host ?? 'codeberg.org'
return {
blob: `https://${host}/${ref.owner}/${ref.repo}/src/branch/HEAD`,
raw: `https://${host}/${ref.owner}/${ref.repo}/raw/branch/HEAD`,
}
}
case 'gitlab': {
const host = ref.host ?? 'gitlab.com'
return {
blob: `https://${host}/${ref.owner}/${ref.repo}/-/blob/HEAD`,
raw: `https://${host}/${ref.owner}/${ref.repo}/-/raw/HEAD`,
}
}
}
return null
}

// codeberg / forgejo

async function checkLatestForgejoRelease(
ref: RepoRef,
directory?: string,
): Promise<SafeResult<ChangelogInfo | false>> {
try {
const host = ref.host ?? 'codeberg.org'

const response = await $fetch(
`https://${host}/api/v1/repos/${ref.owner}/${ref.repo}/releases/latest`,
{
headers: {
'User-Agent': 'npmx.dev',
'accept': 'application/json',
},
},
)

const release = v.parse(ForgejoReleaseSchama, response)

const matchedChangelog = release.body?.match(MD_REGEX)?.at(0)

// /src/branch/ can be similar to /blob/
if (!matchedChangelog || !matchedChangelog.includes('/src/branch/')) {
return [
{
type: 'release',
link: `https://${host}/${ref.owner}/${ref.repo}/releases`,
provider: ref.provider,
repo: `${ref.owner}/${ref.repo}`,
host: ref.host,
},
null,
]
}

const path = matchedChangelog.replace(/^.*\/src\/branch\/[^/]+\//i, '')
if (
directory &&
!(
path.startsWith(directory.endsWith('/') ? directory : `${directory}/`) ||
ROOT_ONLY_REGEX.test(path)
)
) {
return [false, null] as const
}
return [
{
provider: ref.provider,
type: 'md',
path,
repo: `${ref.owner}/${ref.repo}`,
link: matchedChangelog,
host: ref.host,
},
null,
]
} catch (e) {
if (e instanceof Error) {
return [null, e]
}
}
return [false, null]
}

// gitlab
async function checkLatestGitlabRelease(
ref: RepoRef,
directory?: string,
): Promise<SafeResult<ChangelogInfo | false>> {
try {
const host = ref.host ?? 'gitlab.com'
const repoPath = encodeURIComponent(`${ref.owner}/${ref.repo}`)

const response = await $fetch(
`https://${host}/api/v4/projects/${repoPath}/releases/permalink/latest`,
{
headers: {
'User-Agent': 'npmx.dev',
'accept': 'application/json',
},
},
)
const release = v.parse(GitlabReleaseSchame, response)

const matchedChangelog = release.description?.match(MD_REGEX)?.at(0)

if (!matchedChangelog || !matchedChangelog.includes('/-/blob/')) {
return [
{
type: 'release',
// I encode both just to be sure
link: `https://${host}/${ref.owner}/${ref.repo}/-/releases`,
provider: ref.provider,
repo: `${encodeURIComponent(ref.owner)}/${encodeURIComponent(ref.repo)}`,
host: ref.host,
},
null,
]
}

const path = matchedChangelog.replace(/^.*\/-\/blob\/[^/]+\//i, '')

if (
directory &&
!(
path.startsWith(directory.endsWith('/') ? directory : `${directory}/`) ||
ROOT_ONLY_REGEX.test(path)
)
) {
return [false, null] as const
}

return [
{
provider: ref.provider,
type: 'md',
path,
repo: `${encodeURIComponent(ref.owner)}/${encodeURIComponent(ref.repo)}`,
link: matchedChangelog,
host: ref.host,
},
null,
]
} catch (e) {
if (e instanceof Error) {
return [null, e]
}
}
return [false, null]
}
Loading
Loading