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

Fix typescript module augmentation #22

Merged
merged 2 commits into from
Aug 20, 2024
Merged

Fix typescript module augmentation #22

merged 2 commits into from
Aug 20, 2024

Conversation

FlorianBruckner
Copy link
Contributor

This PR fixes a type declaration issue with vue.

The package augments the ComponentCustomProperties type to include declarations for $t and $i18next. The current release does this by augmenting the module @vue/runtime-core

This conflicts with augmentation for the module "vue" - only one of the augmented modules will be effective, and the recommended module is "vue". Other packages have made that transition (e.g. vue-router), leading to typescript issues.

To allow this package to be included as a git dependency in a project, a "prepare" task has been added to package.json. While not strictly related to the issue with module augmentations, this allows us to use the updated module from our fork without having to publish a package.

Checklist

  • only relevant code is changed (make a diff before you submit the PR)
  • run tests npm run test
  • tests are included
  • commit message and code follows the Developer's Certification of Origin

Checklist (for documentation change)

  • [] only relevant documentation part is changed (make a diff before you submit the PR)
  • [] motivation/reason is provided
  • [] commit message and code follows the Developer's Certification of Origin

@kkuegler kkuegler merged commit dd878de into i18next:main Aug 20, 2024
2 checks passed
@kkuegler
Copy link
Member

Thanks for the PR!

Looking at vuejs/router#2295 and the PRs referencing that, this is really about consistency across all libraries.
For existing (working) setups this looks like a potentially breaking change.

Thus, I released this as a new major release 5.0.

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 this pull request may close these issues.

2 participants