deckgo / gatsby-remark-highlight-code

Adds stylish cards and syntax highlighting to code blocks in markdown files
MIT License
68 stars 18 forks source link

Support for gatsby 5? #61

Closed ricardochaves closed 1 year ago

ricardochaves commented 1 year ago
> docker compose run --rm app npm install --save gatsby-transformer-remark gatsby-remark-highlight-code @deckdeckgo/highlight-code

npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: ricardo-baltazar-blog@0.0.1
npm ERR! Found: gatsby@5.2.0
npm ERR! node_modules/gatsby
npm ERR!   gatsby@"^5.2.0" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer gatsby@"^3.0.0 || ^4.0.0" from gatsby-remark-highlight-code@3.2.0
npm ERR! node_modules/gatsby-remark-highlight-code
npm ERR!   gatsby-remark-highlight-code@"*" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR!
npm ERR! See /root/.npm/eresolve-report.txt for a full report.

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2022-12-12T21_38_47_556Z-debug-0.log

All your tests run successfully with version 5. Is that enough to validate that everything will work?

peterpeterparker commented 1 year ago

I don't use the plugin anymore nor gatsby, so I cannot confirm everything will works or not.

If anyone can help and can provide a PR to make the plugin support Gatsby v5 as well, happy to review and merge it.

tlylt commented 1 year ago

I'm using the updated v5 Gatsby with the current version of this package and things are working fine. Should be enough to add support by changing the package.json https://github.com/deckgo/gatsby-remark-highlight-code/blob/e2f0e3f2a09dcdda2967ca120555d792d82bd2f6/package.json#L16

to "gatsby": "^3.0.0 || ^4.0.0 || ^5.0.0",

peterpeterparker commented 1 year ago

Cool to know, can you provide a PR then @tlylt ?

tlylt commented 1 year ago

Cool to know, can you provide a PR then @tlylt ?

I have created the PR following similar changes done in the commits for supporting v4.

peterpeterparker commented 1 year ago

Thanks a lot for the PR @tlylt 👍

PR is merged and a new version has been published to npm (v3.3.0).

tlylt commented 1 year ago

Thanks a lot for the PR @tlylt 👍

PR is merged and a new version has been published to npm (v3.3.0).

Thanks @peterpeterparker for the quick action! Just tested the released package and works fine on my site 🚀

peterpeterparker commented 1 year ago

Great to hear that, thanks for the feedback!