-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
fix(markdoc & mdx): Proxy crimes #10278
Conversation
🦋 Changeset detectedLatest commit: 881e02f The changes in this PR will be included in the next version bump. 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 |
@@ -108,6 +108,7 @@ | |||
"dev": "astro-scripts dev --copy-wasm --prebuild \"src/runtime/server/astro-island.ts\" --prebuild \"src/runtime/client/{idle,load,media,only,visible}.ts\" \"src/**/*.{ts,js}\"", | |||
"postbuild": "astro-scripts copy \"src/**/*.astro\" && astro-scripts copy \"src/**/*.wasm\"", | |||
"test": "pnpm run test:node", | |||
"test:match": "pnpm run test:node --match", |
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.
node:test
's match
is unfortunately terrible, it takes multiple minutes on my computer since it runs through every file still. (also, it outputs every single test with "skipped because it doesn't match", terrible) However, the command in the root repo was broken, so this fixes that.
* main: [ci] format fix(withastro#8625): smooth scrolling in SPA mode on iOS (withastro#10235) [ci] release (withastro#10292) [ci] format finalize WIP API (withastro#10280) [ci] format fix(markdoc & mdx): Proxy crimes (withastro#10278) [ci] release (withastro#10286) fix(audits): Don't warn about loading on data URIs (withastro#10275) fix(node): Safely create requests (withastro#10285) [ci] release (withastro#10265) [ci] format fix(assets): Solidify Node endpoint (withastro#10284)
Changes
In both MDX and Markdoc we had issues with the proxy. Well, actually it's only in Markdoc, in MDX the issue is that our JSX renderer tries to access some stuff it shouldn't, I tried to fix that, but couldn't figure it out, so I went another way by making the proxy only trigger if the property exists.
In Markdoc we unfortunately just lose the proxy completely, so we can't track references. Oh well, we'll just assume images are always used, it's not the end of the world.
Fix #10066 (the Markdoc issue doesn't have a corresponding issue, noticed the problem on my website)
Testing
Added a test! For Markdoc I additionally tried on my own website that has a complex Markdoc setup (custom component and everything) to see if it fixes the issue and everything worked.
Docs
N/A