Skip to content

feat: combining shared code markdown renderer readme & changelog #2717

Merged
gameroman merged 260 commits into
npmx-dev:mainfrom
WilcoSp:feat/markdown-kit
Jul 1, 2026
Merged

feat: combining shared code markdown renderer readme & changelog #2717
gameroman merged 260 commits into
npmx-dev:mainfrom
WilcoSp:feat/markdown-kit

Conversation

@WilcoSp

@WilcoSp WilcoSp commented May 11, 2026

Copy link
Copy Markdown
Contributor

click here to preview pr

🔗 Linked issue

🧭 Context

Currently changelog uses a seperate marked markdown renderer from readme, this pr takes the shared code and makes it into a "markdown kit" so that code that can be shared will be shared

📚 Description

Moves shared code for both changelog & readme to a shared markdown kit while still allowing for each to have their unique needs.

additional changes

  • Heading have been changed to be more consistent and easier to use by users to the following:
    ## heading -> <hx><a href="#...>heading</a></hx>
    ## [Example](https://example.com) -> <hx><a href="https://example.com">Example</a><a href="#...></a></hx>
  • Tests have been added for the changelog markdown renderer for what not shared or changed for changelog.
  • Thanks to the tests also some bugs have been fixed.
  • Also for changelog.md the jumping to the requested version has been fixed, now if "3.5.1" is requested then "3.5.11" won't be selected.
  • 502 will now only be returned when ungh.cc is exhausted, others have been changed to 500
  • at package.takumi.vue & externallinks.vue the provider icons are now given via the useProviderIcon composable
  • change the unocss config to include useProviderIcon composable
  • fixed a bug to where when switching between package tabs that the message "package doesn't have changelogs" is being shown while earlier it did have it.
  • changed how the skeleton loaders is shown in package changelog, now pending is being used from useLazyFetch in the ChangelogReleases & ChangelogMarkdown components instead of using <suspense> at the package-changelog page, this should remove/reduce the blank screen between showing the skeleton laoders & showing data.
  • each release has now a direct link to the original release on github (and future git providers)
  • adding minor nl translations
  • fixed issue when #{issue/pr number} starts a line/listItem that it's transformed to a heading
    • added an exception for changelog to the heading extension so that issues/PRs won't be turned into headings
    • because of ^, changelog has it's own instance of marked, I've named it clMarked to prevent future confusion
  • some further smaller refactors

AI usage

For app/utils/header-version-matcher.ts I've used Gemini to get the regex for matching more exact the requested version in a toc item text

The regex for the heading extension to excempt issues/PRs is thanks to chatgpt, didn't know \b existed in regex.

notes

The branch of this pr was based on #1233 initially, that's why there are so many commits, file changes does show correctly what has changed

the createLink factory function will receive in future PRs changes, due to future plans to format git links to #pr, @person etc

WilcoSp and others added 30 commits February 11, 2026 19:30
excludes changelog releases due to needing api calls
…gelog info endpoint will return ChangelogMarkdownInfo instead of ChangelogReleaseInfo
…ded to changelog markdown rendering

added scroll margin to the changes page
now showing the date as of when the release was made
fixed icon for changelog button at package page
@WilcoSp WilcoSp changed the title refactor: combining shared code markdown renderer readme & changelog feat: combining shared code markdown renderer readme & changelog Jun 15, 2026
@WilcoSp

WilcoSp commented Jun 18, 2026

Copy link
Copy Markdown
Contributor Author

is it maybe an idea to rename this pr due to the many changes?

maybe something like "feat: several improvements to changelog", also the "refactor" was changed to "feat" due to the ci not allowing it anymore.

@gameroman

Copy link
Copy Markdown
Member

I'll probably merge this and if anything comes up we can do it in the next PR

@gameroman
gameroman enabled auto-merge July 1, 2026 13:46
@gameroman
gameroman added this pull request to the merge queue Jul 1, 2026
Merged via the queue into npmx-dev:main with commit 5efdb53 Jul 1, 2026
24 checks passed
@github-actions github-actions Bot mentioned this pull request Jul 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs review This PR is waiting for a review from a maintainer

Projects

None yet

3 participants