kentcdodds / mdx-bundler

🦤 Give me MDX/TSX strings and I'll give you back a component you can render. Supports imports!
MIT License
1.78k stars 75 forks source link

feat: support vfile input #179

Closed stefanprobst closed 1 year ago

stefanprobst commented 2 years ago

What: support providing input source as Vfile with full path, which can be accessed by plugins on vfile.path

Why: being able to pass input to a unified pipeline as VFile is expected to work in the ecosystem i think. also, providing remark/rehype plugins with an actual source file path can be useful.

How: see below

Checklist:

kentcdodds commented 1 year ago

If you can fix the tests then we can get this merged. Thanks.

stefanprobst commented 1 year ago

do you mean the type error? - i think this is unrelated - current main has the same error in the logs

codecov[bot] commented 1 year ago

Codecov Report

Merging #179 (998436b) into main (8f0b681) will not change coverage. The diff coverage is 100.00%.

@@            Coverage Diff            @@
##              main      #179   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            3         3           
  Lines          280       296   +16     
  Branches         1         1           
=========================================
+ Hits           280       296   +16     
Impacted Files Coverage Δ
src/index.js 100.00% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

kentcdodds commented 1 year ago

@All-contributors please add @stefanprobst for code and tests

allcontributors[bot] commented 1 year ago

@kentcdodds

I've put up a pull request to add @stefanprobst! :tada:

github-actions[bot] commented 1 year ago

:tada: This PR is included in version 9.2.0 :tada:

The release is available on:

Your semantic-release bot :package::rocket: