adamduncan / eleventy-plugin-i18n

Eleventy plugin to assist with internationalization and dictionary translations

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Support for Eleventy 1.0

JohnRiv opened this issue · comments

I just tried upgrading our existing Eleventy project to Eleventy 1.0 Beta and ran into some errors due to eleventy-plugin-i18n currently requiring Eleventy prior to v1.0.0:

$ npm install @11ty/eleventy@beta --save-dev
npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR! 
npm ERR! While resolving: eleventy-plugin-i18n@0.1.2
npm ERR! Found: @11ty/eleventy@1.0.0-beta.1
npm ERR! node_modules/@11ty/eleventy
npm ERR!   dev @11ty/eleventy@"1.0.0-beta.1" from the root project
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer @11ty/eleventy@">=0.11.0 <1.0.0" from eleventy-plugin-i18n@0.1.2
npm ERR! node_modules/eleventy-plugin-i18n
npm ERR!   dev eleventy-plugin-i18n@"^0.1.2" from the root project
npm ERR! 
npm ERR! Conflicting peer dependency: @11ty/eleventy@0.12.1
npm ERR! node_modules/@11ty/eleventy
npm ERR!   peer @11ty/eleventy@">=0.11.0 <1.0.0" from eleventy-plugin-i18n@0.1.2
npm ERR!   node_modules/eleventy-plugin-i18n
npm ERR!     dev eleventy-plugin-i18n@"^0.1.2" 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.

Ah cool, I haven't had a chance to play with the 1.0 beta yet. Thanks for flagging, @JohnRiv.

A similar issue came up with the move from 0.11.x to 0.12. While we worked around that with a simple deps update (PR #13), it's possible there are breaking changes here.

Will need to be tested against v1.0 to confirm all still works as expected. Won't have the chance to get around to this right away. Open to PRs in the meantime 👍

OK great, thanks @adamduncan. We did a quick test at work and things looked good with updating the peerDependencies. One of us can put up a PR.

FYI, looking at 11ty/eleventy#2001, we'll have to do something similar to the change in other eleventy-plugins to make this work

Made an update to get eleventy-plugin-i18n working with eleventy 1.0.0. I didn't notice anything breaking in our project which uses this as a dependency. I did run the sample script on both your master branch and mine, and saw the same errors on both branches.

Screen Shot 2021-10-08 at 3 28 14 PM