Skip to content

Releases: hashicorp/next-mdx-remote

2.1.3

22 Jan 22:30
9a675cc
Compare
Choose a tag to compare

Fixes type imports so they work when consumed (#99)

Huge thanks to @BRKalow for this fix!

2.1.2

20 Jan 03:01
875e56b
Compare
Choose a tag to compare

Fixes typings for remark plugins (#96)

2.1.1

07 Jan 21:44
f8fa05e
Compare
Choose a tag to compare

Fixes typing for the MdxRemote.Components type, and fixes a couple dependencies. Thanks to @MatthewCaseres for filing the typescript issue!

Patches

  • Fix component typings: #95
  • Bump ini from 1.3.5 to 1.3.8: #92
  • Bump dot-prop from 4.2.0 to 4.2.1: #93

2.1.0

06 Jan 20:27
Compare
Choose a tag to compare

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

  • Support custom Providers (#35)
  • Fix peer dependencies to include react 17.0.1 (#91)

2.0.1

27 Dec 19:25
797f471
Compare
Choose a tag to compare

Fixes typescript definition of the hydrate function by making the options argument optional - see 1404ff5 for details

2.0.0

23 Dec 22:31
5958c05
Compare
Choose a tag to compare

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

  • Typescript Type Definitions: #70
  • Update deps: 0b1a71e
  • Convert hydrate.js to ES5 for IE11 compatibility (closes #77): 24a6772

1.0.1-canary.0

23 Dec 03:07
f6a2640
Compare
Choose a tag to compare
1.0.1-canary.0 Pre-release
Pre-release

This is a prerelease that adds types to this library. If you are using external types already this may be breaking.

1.0.1

08 Dec 21:08
34e7748
Compare
Choose a tag to compare

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

18 Aug 22:36
15d8a23
Compare
Choose a tag to compare

⚠️ This is a BREAKING RELEASE and is guaranteed to require manual changes ⚠️

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

0.6.0

17 Jul 17:14
a995352
Compare
Choose a tag to compare

This release fixes a bug in which rehydration was not occurring on client-side page transitions

Minor Changes

  • Update deps, add more tests: a075662
  • Fix bug in readme: c7e5232
  • Fix hydration not happening on client-side page transition: 37aa560