Skip to content

Replace release-utils markdown parsing with regex#1962

Merged
bluwy merged 3 commits intonextfrom
release-utils-markdown-regex
May 6, 2026
Merged

Replace release-utils markdown parsing with regex#1962
bluwy merged 3 commits intonextfrom
release-utils-markdown-regex

Conversation

@bluwy
Copy link
Copy Markdown
Member

@bluwy bluwy commented May 4, 2026

And remove the mdast-* packages. This should also be more efficient as it doesn't have to parse or iterate through the entire changelog text.

It's probably bad rep to use regex to parse but I think this should work fine and could try.

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented May 4, 2026

🦋 Changeset detected

Latest commit: c4039bc

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@changesets/release-utils Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@codecov
Copy link
Copy Markdown

codecov Bot commented May 4, 2026

Codecov Report

❌ Patch coverage is 95.23810% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 81.89%. Comparing base (c64ae36) to head (c4039bc).

Files with missing lines Patch % Lines
packages/release-utils/src/utils.ts 95.23% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             next    #1962      +/-   ##
==========================================
- Coverage   81.95%   81.89%   -0.07%     
==========================================
  Files          54       54              
  Lines        2461     2463       +2     
  Branches      718      717       -1     
==========================================
  Hits         2017     2017              
- Misses        401      403       +2     
  Partials       43       43              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@beeequeue
Copy link
Copy Markdown

beeequeue commented May 4, 2026

i would prefer using md4x if it doesn't have any major downsides, just to keep our code simpler

it would most likely be easier to work with if we add stuff like the semantic change types idea

@bluwy
Copy link
Copy Markdown
Member Author

bluwy commented May 5, 2026

It's really not any more complex, just different ways of extracting the data we want. If the semantic change idea is easier to work as an AST, then it can always resort to that later.

Copy link
Copy Markdown

@beeequeue beeequeue left a comment

Choose a reason for hiding this comment

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

could you copy some (large?) changelogs from users of Changesets and use them as fixtures for some extra tests, just for extra safety?

also needs a rebase

@bluwy
Copy link
Copy Markdown
Member Author

bluwy commented May 5, 2026

I don't think it's great to keep large files for the tests, but I just manually tested with our changelog and Svelte's changelog and they all work correctly though

@beeequeue
Copy link
Copy Markdown

we could zstd compress them :^)

but that's good enough for me

@bluwy
Copy link
Copy Markdown
Member Author

bluwy commented May 6, 2026

I'm going to merge this in. Happy to revert if we have concerns or if people are hitting issues with this.

@bluwy bluwy merged commit cda03f7 into next May 6, 2026
10 checks passed
@bluwy bluwy deleted the release-utils-markdown-regex branch May 6, 2026 15:57
@github-actions github-actions Bot mentioned this pull request May 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants