Releases: hashicorp/next-mdx-remote
2.1.3
2.1.2
2.1.1
2.1.0
This release adds support for wrapping the MDX content with custom providers! You can now pass a provider to both renderToString
and hydrate
:
renderToString(source, { provider: { component: MyProvider, props: { my: 'prop' } } });
hydrate(mdxSource, { provider: { component: MyProvider, props: { my: 'prop' } } });
Check out the README section on using providers for more information.
Big thanks to all who contributed to this release, either through direct contributions or testing:
- @devrsi0n for getting the custom provider work started
- @ynnoj for testing out the custom provider functionality in his project and identifying a bug in the initial implementation!
- @marcofranssen for updating our react peer dependencies
And a thanks to everyone who participated in the discussion, we appreciate all of your contributions! 🙏
Minor Changes
2.0.1
2.0.0
This release adds native types for typescript. If you are using existing third party or manually written types, it may cause an issue which is why this is a major release. Otherwise this should be a clean upgrade. This release also adds compatibility with IE11. There are a lot of thanks to give for work and reviews that went into this one:
- @cknitt for adding IE11 compatibility for hydrate
- @Southclaws for reviewing the types
- @stevenschmatz for contributing some type defintions
- @JunichiSugiura for going for a typescript rewrite long ago which prompted this originally
- @zefexdeveloper for reviewing the typescript rewrite PR and answering some of my questions
- @brianespinosa for also reviewing the typescript rewrite, submitting his own, and generally being very helpful in responding to issues 🙏🏼
Massive thanks to everyone who was involved, it wouldn't have been the same without you 👏🏼
Commit Log
1.0.1-canary.0
This is a prerelease that adds types to this library. If you are using external types already this may be breaking.
1.0.1
Mostly readme and dependency updates, the one potentially significant change here is that the server-rendered output is now wrapped in a <div>
rather than a <span>
- see #34 for details.
This was not released as breaking as it should have no impact actual appearance when using hydrate, but it could potentially cause rendering differences if you are not hydrating your content.
Commit Log
- Update mdxOptions to match mdx-js options update: 96be0b7
- Add blog example: 04122f4
- Update package.json: b044dad
- Update readme: dfbda44
- Wrap rendered output in <div> instead of <span>: 9239259
- Bump bl from 4.0.2 to 4.0.3: f812c92
- Fix api in readme example: e96d89b
- One more fix: 735fce4
- One more fix: 81ef6e2
- Update react peerDependency to support react v17: 22fc93f
- Remove usage of non-existent file: 8c838b5
- Wording clarity adjustment: 82216bf
- Merge pull request #31 from ScottAgirs/master: bf8f4cb
- Fix README for frontmatter: 7dc5860
- Merge pull request #67 from pbteja1998/fix-readme-for-frontmatter: 258c37e
- Elaborate on renderToString without hydration (fixes #61): 3f1dd18
- Merge pull request #69 from lostfictions/patch-1: 1e0711a
1.0.0
The big change is in the API. Previously, the two main functions were invoked as such:
renderToString(content, components, mdxOptions, scope)
hydrate(source, components)
Now, their signature has changed to move all arguments other than the first into an object, like this:
renderToString(content, { components, mdxOptions, scope })
hydrate(source, { components })
Additional small changes - react and react-dom were moved to peerDependencies
where they belong - this shouldn't be an issue as they are also peer dependencies to nextjs, documentation was improved, and all dependencies in general were updated.
Commit Log
- Fix error in readme example: 16f2d73
- Add license file: c935c06
- Improve function signatures: c9a6a55
- Document scope param: 8484c73
- Internal update source -> compiledSource: 32a1979
- Move react and react-dom to peer deps: 5e37821
- Update deps, add missing dep: 8ba807c
- Add security note to readme: 00fdcd9