Skip to content

fix(deps): remove @intlify/shared and vue-i18n from dependencies#331

Open
asamofal wants to merge 1 commit intointlify:nextfrom
asamofal:fix/remove-runtime-deps-from-dependencies
Open

fix(deps): remove @intlify/shared and vue-i18n from dependencies#331
asamofal wants to merge 1 commit intointlify:nextfrom
asamofal:fix/remove-runtime-deps-from-dependencies

Conversation

@asamofal
Copy link
Copy Markdown

Description

Hey! 👋

PR #305 fixed the peerDependencies to accept v11 — nice. But @intlify/shared and vue-i18n are still listed in dependencies with ^10.0.0, which means npm installs a separate v10 copy alongside the consumer's v11. This triggers a deprecation warning on every npm install:

npm warn deprecated [email protected]: v9 and v10 no longer supported. please migrate to v11.

Both packages should only be in peerDependencies (where they already are). Here's why it's safe to remove them from dependencies:

  • vue-i18n — every import in the source is import type (in transform.ts). Zero runtime usage. The consumer provides the i18n instance via options.i18n.
  • @intlify/shared — the runtime utilities used (isString, isNumber, format, hasOwn, etc.) are always available transitively through the consumer's vue-i18n installation.

This is the standard pattern — these are peer dependencies, not direct ones.

Linked Issues

Additional context

Once this is released, @intlify/unplugin-vue-i18n should bump its @intlify/vue-i18n-extensions dependency to pick up the fix (Renovate will probably handle that automatically).

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.
@aol-nnov
Copy link
Copy Markdown

aol-nnov commented Apr 1, 2026

Friendly pinging @kazupon to make sure this one did not get lost among other automated PRs..

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