-
Notifications
You must be signed in to change notification settings - Fork 68
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
🧹 Upgrade unified/unist stack #1603
base: main
Are you sure you want to change the base?
Conversation
|
c119acb
to
fbc1df8
Compare
🚀 |
88515c0
to
28ceda5
Compare
28ceda5
to
2dafdd2
Compare
As long as this function is top-level only, it's ok.
the spec will change soon anyway
@@ -140,6 +140,7 @@ export async function transformMystXRefs( | |||
} else { | |||
const data = await fetchMystXRefData(session, node as CrossReference, vfile); | |||
if (!data) return; | |||
console.debug({ identifier: node.identifier }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove!
@@ -163,6 +162,7 @@ describe('Testing mdast --> html conversions', () => { | |||
test.each(htmlCases)('%s', (name, { html, mdast }) => { | |||
const modified = replaceCommentNodes(mdast); | |||
if (html) { | |||
console.log({ name, skip: SKIP_TESTS.some((p) => p.test(name.trim())) }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably remove this?
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 #1603 is merged, the integration of jupyter-book/myst-spec#67 should remove the need forGenericParent
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.