jupyter-book / mystmd

Command line tools for working with MyST Markdown.
https://mystmd.org/guide
MIT License
219 stars 64 forks source link

🧹 Upgrade unified/unist stack #1603

Open agoose77 opened 1 month ago

agoose77 commented 1 month ago

This PR starts the process of upgrading our internals to use unified@^11, @types/mdast@^4, and @types/unist@^3. We will need to make this change at some point, and given the nature of unifiedjs, this is a broad-reaching change.

It massages our existing code to stop complaining about the GenericParent <-> Node differences that arise in @types/mdast@^4, and pulls in the latest version of the various unist utilities. This is mostly done by additions of type asserts (as XXX) that will need to be removed in future.

Related to this work is jupyter-book/myst-spec#67, whereby the myst-spec types have been modified to use the extension mechanism supported by @types/mdast@>=4. After this PR in jupyter-book/mystmd#1603 is merged, the integration of jupyter-book/myst-spec#67 should remove the need for GenericParent altogether.

To be clear, this PR is independent of jupyter-book/myst-spec#67

[!NOTE]
We can't completely upgrade the stack: the unified-latex ecosystem is stuck on an older spec. However, this is an internal tool, so we just need to ensure that it generates valid mdast@^4, and ignore any type errors. I think that it does from glancing at it.

changeset-bot[bot] commented 1 month ago

⚠️ No Changeset found

Latest commit: 42c0123ac9f104c06ed94674db57104b761d64f7

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

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

rowanc1 commented 1 month ago

🚀