Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
299 commits
Select commit Hold shift + click to select a range
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
67e2144
added support gitlab
WilcoSp Jul 2, 2026
8613bdc
added suppot for tangled & optimized how the markdown file is gotten …
WilcoSp Jul 3, 2026
e1906fd
Merge branch 'npmx-dev:main' into changelog/format-link+git-providers…
WilcoSp Jul 6, 2026
e402553
added raw markdown endpoint for releases & allowing for the changelog…
WilcoSp Jul 8, 2026
dcdd0a1
moved the button to copy markdown to it's own component
WilcoSp Jul 8, 2026
ea1b19d
added the copy markdown button the the changelog markdown component
WilcoSp Jul 8, 2026
b3081ec
added copy markdow button to releases.
WilcoSp Jul 8, 2026
b14bc1f
expanded the account regex to allow for at proto handles for tangled
WilcoSp Jul 8, 2026
2b4037c
added (missing) tests
WilcoSp Jul 8, 2026
f00834f
changed width to min width at the changelog card for the copy button …
WilcoSp Jul 8, 2026
1cdd070
Merge branch 'main' into changelog/format-link+git-providers+copy-mar…
WilcoSp Jul 8, 2026
8ee3e4a
..
WilcoSp Jul 9, 2026
46093c2
Merge branch 'changelog/format-link+git-providers+copy-markdown' of g…
WilcoSp Jul 9, 2026
cfffcea
commits will now only show the first 7 digits
WilcoSp Jul 9, 2026
b50fe99
trying to debug why raw doesn't work on vercel
WilcoSp Jul 9, 2026
0fe530c
seeing what the URL object gives from vercel
WilcoSp Jul 10, 2026
56d2d99
disabled caching md route for debugging with vercel
WilcoSp Jul 10, 2026
c8e7e3a
added md & releases route to nuxt.config for vercel to be able to rec…
WilcoSp Jul 10, 2026
4d504b1
Merge branch 'main' into changelog/format-link+git-providers+copy-mar…
WilcoSp Jul 11, 2026
8d6eaa2
validating the host now
WilcoSp Jul 11, 2026
2b3260e
tag will be re encoded where needed
WilcoSp Jul 11, 2026
535dbdd
Merge branch 'changelog/format-link+git-providers+copy-markdown' of g…
WilcoSp Jul 11, 2026
c7b9443
fixing moving need host
WilcoSp Jul 11, 2026
b235cbf
sanatizing the output of createResolveGitTextToLinks.
WilcoSp Jul 11, 2026
46dac96
root only also check without leading /
WilcoSp Jul 11, 2026
9533791
added tests for validate host
WilcoSp Jul 11, 2026
e4893e7
fixed types & test
WilcoSp Jul 11, 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
67 changes: 67 additions & 0 deletions app/components/Button/CopyMd.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
<script setup lang="ts">
import type { AsyncDataRequestStatus } from '#app'

defineOptions({
inheritAttrs: false,
})

const { text, fetchMarkdown, markdown, status } = defineProps<{
text: string
fetchMarkdown: () => Promise<void>
markdown: string | undefined
status: AsyncDataRequestStatus
}>()

function prefetchMarkdown() {
if (status === 'idle') {
fetchMarkdown()
}
}

const {
copied: copiedReadme,
copy,
copyPending: copyReadmePending,
} = useClipboard({
copiedDuring: 2000,
})

function copyMarkdown() {
copy(async () => {
if (status === 'idle' || status === 'pending') {
await fetchMarkdown()
}
return markdown ?? ''
})
}
Comment on lines +15 to +36

@coderabbitai coderabbitai Bot Jul 11, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

printf '\n## File outline\n'
ast-grep outline app/components/Button/CopyMd.vue --view expanded || true

printf '\n## Relevant file section\n'
wc -l app/components/Button/CopyMd.vue
cat -n app/components/Button/CopyMd.vue | sed -n '1,220p'

printf '\n## Find clipboard helper usage and dependency version\n'
rg -n "useClipboard|copyPending|copiedDuring|`@vueuse/core`" -S . --glob '!**/node_modules/**' || true

printf '\n## Package manifests\n'
git ls-files 'package.json' 'pnpm-lock.yaml' 'package-lock.json' 'yarn.lock' 'npm-shrinkwrap.json' | xargs -r -I{} sh -c 'echo "--- {}"; sed -n "1,220p" "{}"'

Repository: npmx-dev/npmx.dev

Length of output: 22845


🏁 Script executed:

#!/bin/bash
set -euo pipefail

printf '\n## Find CopyMd.vue usage\n'
rg -n "CopyMd" app docs -S || true

printf '\n## Inspect surrounding usage if present\n'
for f in $(rg -l "CopyMd" app docs -S || true); do
  echo "--- $f"
  cat -n "$f" | sed -n '1,220p'
done

printf '\n## Search for fetchMarkdown/markdown/status props passed to CopyMd\n'
rg -n "fetchMarkdown|markdown:|status:" app docs -S --glob '!**/node_modules/**' || true

Repository: npmx-dev/npmx.dev

Length of output: 21935


🌐 Web query:

VueUse useClipboard copy signature v14.3.0 source string async callback docs

💡 Result:

In VueUse version 14.3.0, the useClipboard function provides a flexible copy mechanism that supports both static strings and asynchronous callbacks [1][2]. The copy function signature is: copy(value?: ClipboardValue) => Promise The ClipboardValue type allows the source to be either a string or an async function that returns a string [2]. Key details regarding the source and copy behavior in v14.3.0 include: 1. Handling of Sources: When calling copy, if no argument is provided, the function defaults to the source defined in the useClipboard options (which supports MaybeRefOrGetter) [3][1][2]. 2. Asynchronous Support: The implementation was updated in v14.3.0 (via PR #5369) to better handle asynchronous operations, specifically addressing issues in Safari [4][5][2]. When providing an async function as the source, the copy method will await the resolved value before performing the clipboard write [2]. 3. Legacy Fallback: If the Clipboard API is unavailable or permission is denied, and legacy mode is enabled (legacy: true), the function handles both string values and asynchronous callbacks by resolving the async function, updating the text ref, and then executing a fallback copy (using document.execCommand) [1][2]. The return object of useClipboard includes the copy function, which is typed to return a Promise that resolves after the operation completes [1][6].

Citations:


🏁 Script executed:

#!/bin/bash
set -euo pipefail

printf '\n## useClipboard source from installed package if present\n'
for f in $(git ls-files | grep -E '(^|/)package.json$|(^|/)pnpm-lock.yaml$' | head -n 2); do :; done

rg -n "function useClipboard|export function useClipboard|type ClipboardValue|copy\\(" node_modules .pnpm . -S --glob '**/useClipboard/**' --glob '!**/dist/**' --glob '!**/node_modules/**' || true

printf '\n## Search for error handling / retry patterns around lazy fetches\n'
rg -n "status === 'error'|status === \\\"error\\\"|error'\\]\\.includes\\(.*status|fetchMarkdown\\(\\)" app -S --glob '!**/node_modules/**' || true

Repository: npmx-dev/npmx.dev

Length of output: 509


🏁 Script executed:

#!/bin/bash
set -euo pipefail

printf '\n## Search for error-state handling near lazy fetch/clipboard flows\n'
rg -n "status === 'error'|status === \"error\"|\\bcopyMarkdown\\b|\\bprefetchMarkdown\\b|useLazyFetch<.*Markdown" app docs test -S --glob '!**/node_modules/**' || true

printf '\n## Inspect related clipboard buttons for comparison\n'
for f in app/components/Terminal/Install.vue app/components/Code/Header.vue app/composables/useInstallCommand.ts; do
  if [ -f "$f" ]; then
    echo "--- $f"
    cat -n "$f" | sed -n '1,220p'
  fi
done

Repository: npmx-dev/npmx.dev

Length of output: 22933


Retry on fetch errors before copying markdown. prefetchMarkdown() and copyMarkdown() only fetch when status is idle/pending, so a transient failure leaves the button unable to recover and it can keep copying stale/empty content. Allow status === 'error' to retry, or surface the failure instead.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@app/components/Button/CopyMd.vue` around lines 15 - 36, Update
prefetchMarkdown and the fetch condition inside copyMarkdown so status ===
'error' retries fetchMarkdown before copying, preventing stale or empty markdown
after transient failures. Preserve the existing idle/pending behavior and ensure
copying proceeds only with the refreshed result or surfaces the fetch failure.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is there a toast/snackbar component/composable available for notifying when getting raw markdown failed?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

printf '\n## Search for toast/snackbar/notification composables or components\n'
rg -ni "toast|snackbar|notif" app -S --glob '!**/node_modules/**' -g '*.vue' -g '*.ts' | grep -v test || true

printf '\n## Search package.json for toast libraries\n'
rg -n "toast|notiv|vue-sonner|vue-toastification" package.json || true

printf '\n## Look for app/components directory structure for UI feedback\n'
fd . app/components -t d

Length of output: 1935


@WilcoSp, I searched the codebase and didn't find an existing toast/snackbar component or composable — there's no vue-sonner, vue-toastification, or similar library in package.json, and nothing under app/components/ (e.g. Tooltip/) implements toast-style notifications.

A few options if you want to surface the fetch failure:

  1. Build a minimal toast/snackbar composable (e.g. useToast() backed by a global reactive queue + a Toast.vue renderer mounted once in the layout) — reusable beyond this PR.
  2. Reuse the existing Tooltip component to show an inline "Failed to copy, try again" message on the button itself when status === 'error', avoiding a new global UI primitive.
  3. Use an aria-live region near the button for an accessible, unobtrusive text update on failure, which is the lowest-effort option and still addresses the retry/notify concern from my original comment.

Given this PR's scope is already broad (per the earlier discussion about splitting it), option 2 or 3 might be the pragmatic choice for now, with a dedicated toast composable as a possible follow-up if similar needs arise elsewhere. Let me know which direction you'd like to take, or if you'd prefer to defer the failure-notification part of my comment altogether.

(=^・ω・^=)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is there maybe something like an a11y announce function or composable?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

printf '\n## Search for a11y announce composables\n'
rg -ni "announce|aria-live|useAnnouncer|useEventBus.*announce" app -S --glob '!**/node_modules/**' || true

printf '\n## Search nuxt.config and package.json for a11y modules\n'
rg -ni "a11y|announcer" nuxt.config.ts package.json || true

printf '\n## Search node_modules metadata for vueuse announcer or nuxt a11y module (from lockfile)\n'
rg -n "vueuse|nuxt-a11y|`@nuxtjs/a11y`|vue-announcer" pnpm-lock.yaml 2>/dev/null | head -n 40 || true

Length of output: 9143


@WilcoSp yes — there's already a global announce composable used elsewhere in the app: useCommandPalette() exposes an announce(message: string) function (app/composables/useCommandPalette.ts, Line 89), backed by a useState('command-palette:announcement', …) ref. It's rendered as an always-present aria-live="polite" region in app/components/CommandPalette.client.vue (Lines 283-284), so it works independent of whether the command palette UI is open.

It's already used for clipboard-copy feedback in a couple of places, e.g.:

  • app/components/Terminal/Install.vue (Lines 138, 152, 166, 180): announce($t('command_palette.announcements.copied_to_clipboard'))
  • app/components/Package/Header.vue (Line 98): same pattern

You could follow the same convention in CopyMd.vue:

const { announce } = useCommandPalette()

function copyMarkdown() {
  copy(async () => {
    if (status === 'idle' || status === 'pending') {
      await fetchMarkdown()
    }
    if (status === 'error') {
      announce(t('changelog.copy_failed')) // or similar i18n key
      return ''
    }
    return markdown ?? ''
  })
}

This reuses the existing pattern rather than introducing a new toast/snackbar primitive, and keeps the fix scoped to this PR's copy-markdown flow.


✏️ Learnings added
Learnt from: WilcoSp
Repo: npmx-dev/npmx.dev PR: 2983
File: app/components/Button/CopyMd.vue:15-36
Timestamp: 2026-07-11T21:11:26.909Z
Learning: In the npmx.dev repository (Vue/Nuxt), there is an existing global a11y announce composable: `useCommandPalette()` exposes `announce(message: string)` (defined in app/composables/useCommandPalette.ts), backed by a `useState('command-palette:announcement', ...)` ref and rendered via an always-present `aria-live="polite"` region in app/components/CommandPalette.client.vue. This is the established pattern for screen-reader announcements (e.g., clipboard-copy feedback in app/components/Terminal/Install.vue and app/components/Package/Header.vue) and should be reused instead of introducing a new toast/snackbar/announcer primitive.

Note: Learnings are effective only in the context of similar code segments. To apply general coding guidelines, please configure review instructions. You can manage existing learnings in the app.


const btn = useTemplateRef('btn')

const hover = useElementHover(() => btn.value?.$el, {
// prevent fetching while moving the pointer
delayEnter: 300,
})

const stopWatchHover = watch(hover, state => {
if (state) {
prefetchMarkdown()
stopWatchHover()
}
})
</script>
<template>
<TooltipApp :text position="bottom">
<ButtonBase
ref="btn"
@focus="prefetchMarkdown"
@click="copyMarkdown"
:aria-pressed="copiedReadme"
:aria-label="copiedReadme ? $t('common.copied') : text"
:classicon="copiedReadme ? 'i-lucide:check' : 'i-simple-icons:markdown'"
v-bind="$attrs"
>
<span>{{ copiedReadme ? $t('common.copied') : $t('common.copy') }}</span>
<span v-if="copyReadmePending" class="i-lucide:loader-circle animate-spin size-4"></span>
</ButtonBase>
</TooltipApp>
</template>
24 changes: 23 additions & 1 deletion app/components/Changelog/Card.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@ import type { IconClass } from '~/types'
import type { ReleaseData } from '~~/shared/types/changelog'
import { slugify } from '~~/shared/utils/html'

const { release } = defineProps<{
const { release, baseUrl, host } = defineProps<{
release: ReleaseData
baseUrl: string
host?: string
}>()
const formattedDate = computed(() => {
if (!release.publishedAt) {
Expand All @@ -28,6 +30,19 @@ const { providerIcon, viewOnProvider } = inject<{
providerIcon: 'i-lucide:code',
viewOnProvider: computed(() => $t('common.view_on.git_repo')),
})

// fetch markdown to copy
const {
data: markdown,
execute: fetchMarkdown,
status: mdStatus,
} = useLazyFetch<string>(() => `${baseUrl}/raw/${encodeURIComponent(release.tag)}`, {
immediate: false,
server: false,
query: {
host: computed(() => host),
},
})
</script>
<template>
<section
Expand Down Expand Up @@ -63,6 +78,13 @@ const { providerIcon, viewOnProvider } = inject<{
:to="release.link"
class="size-[0.9em]"
/>
<ButtonCopyMd
:fetchMarkdown
:markdown
:text="$t('changelog.copy_as_markdown')"
:status="mdStatus"
class="min-w-27"
/>
<ReadmeTocDropdown
v-if="release?.toc && release.toc.length > 1"
:toc="release.toc"
Expand Down
38 changes: 32 additions & 6 deletions app/components/Changelog/Markdown.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,22 @@ const { info, goToVersion, tpTarget, resolveVersionPending } = defineProps<{

const route = useRoute()

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

const { data, error, pending } = useLazyFetch(url, {
query: {
host,
},
})

if (import.meta.client) {
const { settings } = useSettings()

// doing this server side can make it that we go to the homepage
const stopWatching = watchEffect(
() => {
if (resolveVersionPending) {
if (resolveVersionPending || typeof data.value == 'string') {
return // need to wait till resolving is finished
}
const toc = data.value?.toc
Expand Down Expand Up @@ -50,11 +55,32 @@ if (import.meta.client) {
// stops watchEffect from trigger just before navigating
onBeforeRouteLeave(stopWatching)
}

// fetch raw markdown to copy
const {
data: rawMarkdown,
execute: fetchMarkdown,
status: mdStatus,
} = useLazyFetch<string>(url, {
query: {
host,
raw: true,
},
immediate: false,
server: false,
})
</script>
<template>
<ChangelogSkeleton v-if="pending" />
<template v-else-if="data?.html">
<Teleport v-if="data?.toc && data.toc.length > 1 && !!tpTarget" :to="tpTarget">
<template v-else-if="typeof data == 'object' && data?.html">
<Teleport v-if="data.html && !!tpTarget" :to="tpTarget">
<ButtonCopyMd
v-if="data?.toc && data.toc.length > 1"
:fetchMarkdown
:markdown="rawMarkdown"
:status="mdStatus"
:text="$t('changelog.copy_as_markdown')"
/>
<ReadmeTocDropdown :toc="data.toc" class="justify-self-end" />
</Teleport>
<Readme :html="data.html" class="pt-4"></Readme>
Expand Down
17 changes: 14 additions & 3 deletions app/components/Changelog/Releases.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,24 @@ const { info, requestedDate, goToVersion, resolveVersionPending } = defineProps<
resolveVersionPending?: boolean
}>()

const url = computed(() => `/api/changelog/releases/${info.provider}/${info.repo}` as const)

const {
data: releases,
error,
pending,
} = useLazyFetch<ReleaseData[]>(() => `/api/changelog/releases/${info.provider}/${info.repo}`)
} = useLazyFetch<ReleaseData[]>(url, {
query: {
host: computed(() => info.host),
},
})
Comment thread
WilcoSp marked this conversation as resolved.

const route = useRoute()

const matchingDateReleases = computed(() => {
if (!requestedDate || !releases.value) {
return []
}

return releases.value.filter(release => {
if (!release.publishedAt) {
return
Expand Down Expand Up @@ -79,7 +84,13 @@ prefetchComponents('ChangelogCard')
<template>
<ChangelogSkeleton v-if="pending" />
<div class="flex flex-col gap-2 py-3" v-else-if="releases">
<ChangelogCard v-for="release of releases" :release :key="release.id" />
<ChangelogCard
v-for="release of releases"
:release
:key="release.id"
:baseUrl="url"
:host="info.host"
/>
</div>
<slot v-else-if="error" name="error"></slot>
</template>
4 changes: 2 additions & 2 deletions app/pages/package-changelog/[[org]]/[name].vue
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,8 @@ defineOgImage(
>
{{ changelog.provider }}
</LinkBase>
<div v-if="changelog?.type === 'md'" ref="tptoc" class="w-14 h-8">
<!-- prevents layout shift while loading -->
<div v-if="changelog?.type === 'md'" ref="tptoc" class="min-w-[150px] h-8 flex gap-2">
<!-- Placeholder for toc & copy md -->
</div>
</div>
<section v-if="!changelog && !changelogError" class="flex flex-col gap-2 py-3">
Expand Down
49 changes: 6 additions & 43 deletions app/pages/package/[[org]]/[name].vue
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ const playgroundLinks = computed(() => [
: []),
])

//fetch README file as Markdown to copy
const {
data: readmeMarkdownData,
status: readmeMarkdownStatus,
Expand All @@ -99,28 +100,6 @@ const {
},
)

//copy README file as Markdown
const {
copied: copiedReadme,
copy,
copyPending: copyReadmePending,
} = useClipboard({
copiedDuring: 2000,
})

function copyReadme() {
copy(async () => {
await fetchReadmeMarkdown()
return readmeMarkdownData.value?.markdown ?? ''
})
}

function prefetchReadmeMarkdown() {
if (readmeMarkdownStatus.value === 'idle') {
fetchReadmeMarkdown()
}
}

// Track active TOC item based on scroll position
const tocItems = computed(() => readmeData.value?.toc ?? [])
const { activeId: activeTocId } = useActiveTocItem(tocItems)
Expand Down Expand Up @@ -1027,28 +1006,12 @@ const showSkeleton = shallowRef(false)
</h2>
<div class="flex gap-2">
<!-- Copy readme as Markdown button -->
<TooltipApp
v-if="readmeData?.mdExists"
<ButtonCopyMd
:fetchMarkdown="fetchReadmeMarkdown"
:markdown="readmeMarkdownData.markdown"
:status="readmeMarkdownStatus"
:text="$t('package.readme.copy_as_markdown')"
position="bottom"
>
<ButtonBase
@mouseenter="prefetchReadmeMarkdown"
@focus="prefetchReadmeMarkdown"
@click="copyReadme"
:aria-pressed="copiedReadme"
:aria-label="
copiedReadme ? $t('common.copied') : $t('package.readme.copy_as_markdown')
"
:classicon="copiedReadme ? 'i-lucide:check' : 'i-simple-icons:markdown'"
>
<span>{{ copiedReadme ? $t('common.copied') : $t('common.copy') }}</span>
<span
v-if="copyReadmePending"
class="i-lucide:loader-circle animate-spin size-4"
></span>
</ButtonBase>
</TooltipApp>
/>
<ReadmeTocDropdown
v-if="readmeData?.toc && readmeData.toc.length > 1"
:toc="readmeData.toc"
Expand Down
3 changes: 2 additions & 1 deletion i18n/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -1854,6 +1854,7 @@
"p2": "Please try again later or {viewon}"
},
"rate_limit_ungh": "Sorry, Github's rate limit has been hit, try again in a moment",
"version_unavailable": "The requested version is not available."
"version_unavailable": "The requested version is not available.",
"copy_as_markdown": "Copy changelog as Markdown"
}
}
3 changes: 2 additions & 1 deletion i18n/locales/nl.json
Original file line number Diff line number Diff line change
Expand Up @@ -1787,6 +1787,7 @@
"p2": "Probeer later opnieuw of {viewon}"
},
"rate_limit_ungh": "Sorry, de opvraaglimiet (rate limit) van GitHub is bereikt. Probeer het over een ogenblik opnieuw.",
"version_unavailable": "De gevraagde is niet beschikbaar."
"version_unavailable": "De gevraagde is niet beschikbaar.",
"copy_as_markdown": "Kopieer wijzigingen als Markdown"
}
}
3 changes: 3 additions & 0 deletions i18n/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -5568,6 +5568,9 @@
},
"version_unavailable": {
"type": "string"
},
"copy_as_markdown": {
"type": "string"
}
},
"additionalProperties": false
Expand Down
14 changes: 14 additions & 0 deletions nuxt.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,20 @@ export default defineNuxtConfig({
allowQuery: ['offset', 'limit'],
},
},
'/api/changelog/md/**': {
isr: {
expiration: 60 * 60 * 2 /* 2 hours */,
passQuery: true,
allowQuery: ['host', 'raw'],
},
},
'/api/changelog/releases/**': {
isr: {
expiration: 60 * 60 * 2 /* 2 hours */,
passQuery: true,
allowQuery: ['host'],
},
},
'/api/registry/docs/**': { isr: true, cache: { maxAge: 365 * 24 * 60 * 60 } },
'/api/registry/file/**': { isr: true, cache: { maxAge: 365 * 24 * 60 * 60 } },
'/api/registry/provenance/**': { isr: true, cache: { maxAge: 365 * 24 * 60 * 60 } },
Expand Down
2 changes: 1 addition & 1 deletion server/api/changelog/info/[name]/v/[version].get.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export const defaultChangelogCacheOptions: Parameters<typeof defineCachedEventHa
swr: true,
getKey: event => {
const { rawPackageName = '', rawVersion = 'latest' } = getChangelogRouteParams(event)
return `changelogInfo:v1:${rawPackageName.trim().replaceAll('/', ':')}:${rawVersion.trim()}`
return `changelogInfo:v2:${rawPackageName.trim().replaceAll('/', ':')}:${rawVersion.trim()}`
},
shouldBypassCache: () => import.meta.dev,
}
Expand Down
Loading
Loading