Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New types breaks i18next-chained-backend compatibility #58

Closed
mxsxs2 opened this issue Mar 23, 2021 · 8 comments · Fixed by i18next/i18next-chained-backend#18
Closed

Comments

@mxsxs2
Copy link

mxsxs2 commented Mar 23, 2021

💥 Regression Report

The plugin overrides the backend type for i18next. This breaks existing code where developers use i18next-chained-backend

Last working version

Worked up to version: 1.1.1

Stopped working in version: 1.2.0

To Reproduce

Steps to reproduce the behavior:

Follow the guide at https://github.com/i18next/i18next-chained-backend

Expected behavior

To work as before

Your Environment

  • runtime version: node v14.15.1
  • i18next version: 20.0.0
  • os: Windows and Linux (Alpine)
@adrai
Copy link
Member

adrai commented Mar 23, 2021

//cc @pedrodurek

@pedrodurek
Copy link
Member

Hey @mxsxs2, can you provide an example?

@pedrodurek
Copy link
Member

Ohh never mind, I just got what's happening, I'll see what I can do

@mxsxs2
Copy link
Author

mxsxs2 commented Mar 24, 2021

i18next/i18next-browser-languageDetector#235 Will more than likely cause the same issue.

@pedrodurek
Copy link
Member

pedrodurek commented Mar 25, 2021

Hey @adrai, we have some options:
1 - Implement the augmentation for the i18next-chained-backend plugin, but users would have to import i18next-chained-backend first.

24-08-8jlp2-ijr0n

2 - Remove the augmentation from all backend plugins, and it's up to users to manually implement the augmentation.
3 - Alternatively, we can infer based on Backend passed to the init function, but that I'd cause major breaking changes.

Which one should we choose?

@adrai
Copy link
Member

adrai commented Mar 25, 2021

I have no clue... (I'm not a TypeScript user)
Maybe 1) or if not that much of a major break 3) 🤷‍♂️

@mxsxs2
Copy link
Author

mxsxs2 commented Mar 25, 2021

I think option 1 is good enough. If it is in the documentation then most people would understand it.

Option 3 would be good too but I am not sure if it is worth it to introduce a single braking change just for this. Maybe if there are more in the near future?

@yadigarbz
Copy link

Hey @adrai, we have some options: 1 - Implement the augmentation for the i18next-chained-backend plugin, but users would have to import i18next-chained-backend first.

24-08-8jlp2-ijr0n 24-08-8jlp2-ijr0n

2 - Remove the augmentation from all backend plugins, and it's up to users to manually implement the augmentation. 3 - Alternatively, we can infer based on Backend passed to the init function, but that I'd cause major breaking changes.

Which one should we choose?

Can't believe this is the solution 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants