mystmd icon indicating copy to clipboard operation
mystmd copied to clipboard

🧹 Upgrade unified/unist stack

Open agoose77 opened this issue 1 year ago • 2 comments
trafficstars

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.

agoose77 avatar Oct 25 '24 15:10 agoose77