MichaelDeBoey / gatsby-remark-embedder

Gatsby Remark plugin to embed well known services by their URL.
MIT License
294 stars 58 forks source link

Gatsby 4 compatibility #214

Closed trevorblades closed 2 years ago

trevorblades commented 2 years ago

This branch makes the plugin compatible with Gatsby v4. It updates values in the package.json according to the steps in Gatsby's upgrade guide.

I noticed that the plugin would not be run unless it exported the transformer function using module.exports. Since we're using kcd-scripts, we can easily add a plugin that adds a module.exports line (and keeps everything else intact) by supplying a custom Babel config that extends kcd-scripts/preset.

Related to gatsbyjs/gatsby#15991

Fixes #211

jsg2021 commented 2 years ago

I've attempted to make the tests pass... it's proving to be futile. ESM mocking is just not working.. resulting in live data vs canned data... ... and some of the ast modifications aren't producing the expected markup. I hope the maintainer has better luck than I.

trevorblades commented 2 years ago

Thanks for rebasing @MichaelDeBoey! Tests look like they're passing now 🙂

github-actions[bot] commented 2 years ago

:tada: This issue has been resolved in version 6.0.0 :tada:

The release is available on:

Your semantic-release bot :package::rocket: