-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Update for Node 17 #1804
Update for Node 17 #1804
Conversation
* Add support for Node 17 to the node loader (backport wooorm/xdm@e72b930) * Turn of a `preact/compat` test, which throws in Node 17 as its missing an export map * Turn tests off for Node 17 in `@mdx-js/register`, as it requires `deasync` which hasn’t been updated with a Node 17 build yet.
This pull request is being automatically deployed with Vercel (learn more). 🔍 Inspect: https://vercel.com/mdx/mdx/24NVpMudY3DGBEoe3xeT7EhihMZU |
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.
Nice! 👍
/** | ||
* @param {string} url | ||
* @param {unknown} context | ||
* @param {Function} defaultLoad |
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.
Does Node have a more specific type for the default loader?
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.
The API for defaultLoad
is the same as this load
function.
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.
Could we create a recursive interface for the type?
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.
Sure but I don’t see a bunch of value. It just got redesigned. It’ll be redesigned again. The API is unstable: https://nodejs.org/api/esm.html#loadurl-context-defaultload
(backport wooorm/xdm@e72b930)
preact/compat
test, which throws in Node 17 as its missing anexport map
@mdx-js/register
, as it requiresdeasync
which hasn’t been updated with a Node 17 build yet.