fix(deps): remove @intlify/shared and vue-i18n from dependencies#331
Open
asamofal wants to merge 1 commit intointlify:nextfrom
Open
fix(deps): remove @intlify/shared and vue-i18n from dependencies#331asamofal wants to merge 1 commit intointlify:nextfrom
@intlify/shared and vue-i18n from dependencies#331asamofal wants to merge 1 commit intointlify:nextfrom
Conversation
Both packages are already listed in `peerDependencies` and should not be in `dependencies` as well. Having them in both causes npm to install a separate copy (currently v10) even when the consumer already has v11, which triggers a deprecation warning during `npm install`. The source code only uses type-only imports from `vue-i18n` (erased at compile time), and the runtime utilities from `@intlify/shared` are always provided transitively by the consumer's `vue-i18n` installation.
|
Friendly pinging @kazupon to make sure this one did not get lost among other automated PRs.. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Hey! 👋
PR #305 fixed the
peerDependenciesto accept v11 — nice. But@intlify/sharedandvue-i18nare still listed independencieswith^10.0.0, which means npm installs a separate v10 copy alongside the consumer's v11. This triggers a deprecation warning on everynpm install:Both packages should only be in
peerDependencies(where they already are). Here's why it's safe to remove them fromdependencies:vue-i18n— every import in the source isimport type(intransform.ts). Zero runtime usage. The consumer provides thei18ninstance viaoptions.i18n.@intlify/shared— the runtime utilities used (isString,isNumber,format,hasOwn, etc.) are always available transitively through the consumer'svue-i18ninstallation.This is the standard pattern — these are peer dependencies, not direct ones.
Linked Issues
@intlify/sharedandvue-i18nv11.0.0 #305Additional context
Once this is released,
@intlify/unplugin-vue-i18nshould bump its@intlify/vue-i18n-extensionsdependency to pick up the fix (Renovate will probably handle that automatically).