🦤 Give me MDX/TSX strings and I'll give you back a component you can render. Supports imports!
by kentcdoddsJavaScript
Last 12 weeks · 0 commits
6 of 6 standards met
Hi, I am Cris from Endor Labs Security Research Team and I would like to report a vulnerability in this project. Can you please set up a security policy (in the Security tab of the repo) so that I can open an advisory? Alternatively, you can open an advisory yourself and add me to it for a private discussion or share with me an email address where I can disclose my findings. Thanks in advance! Best, Cris
In client/react.js, the line would override the exported functions (getMDXComponent, getMDXExport) with the dist/index module. This means users importing from 'mdx-bundler/client/react' would not get the intended client-side functions, breaking consumer code. The fix removes the erroneous module.exports assignment, allowing the named exports to be correctly exposed. Summary by CodeRabbit Refactor** Updated the React client module export configuration.
Problem CI was failing with two errors: 1. Navigator assignment error in Node.js 21+: 2. TypeScript type checking error in the deprecated dependency: Solution Navigator Fix Starting with Node.js 21, the global object became read-only. Changed from direct assignment to using with appropriate flags: TypeScript Fix The package (which is deprecated) has type incompatibilities with newer . Created a type declaration override that provides a simple module declaration, allowing TypeScript to skip the detailed type checking of this third-party package. Testing ✅ All 23 tests pass ✅ Build completes successfully ✅ Type checking passes ✅ Linting passes ✅ No security vulnerabilities introduced These minimal changes fix CI without requiring removal of kcd-scripts or other breaking changes. The solution works across all supported Node.js versions (18, 20, 22, 23). Fixes #[issue_number] Original prompt This section details on the original issue you should resolve* Fix CI In a recent CI run, we got the following output: kcd-scripts is a pretty dated package, but it should probably still work. Please investigate whether there's anything that can be done without completely removing kcd-scripts to fix CI. ## Comments on the Issue (you are @copilot in this section) Fixes kentcdodds/mdx-bundler#245 ✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo. [!NOTE] Use Object.defineProperty for global navigator in tests, add a remark-mdx-images type override, and relax TS config to pass CI. Tests: Update to set via for Node 21+. TypeScript: Add to declare as a . Update to enable and exclude . Written by Cursor Bugbot for commit 2d2db6b5ed8c8d6a2a21dc238a91f51c8b02447c. This will update automatically on new commits. Configure here.
Repository: kentcdodds/mdx-bundler. Description: 🦤 Give me MDX/TSX strings and I'll give you back a component you can render. Supports imports! Stars: 1903, Forks: 82. Primary language: JavaScript. Languages: JavaScript (99.6%), MDX (0.4%). License: MIT. Topics: esbuild, mdx, mdx-bundler. Latest release: v10.1.1 (1y ago). Open PRs: 2, open issues: 74. Last activity: 3mo ago. Community health: 85%. Top contributors: kentcdodds, allcontributors[bot], Arcath, muningis, Copilot, CottonCandyZ, MichaelDeBoey, tol-is, CanRau, casperiv0 and others.