Skip to content

Bug: peerDependencies isn't set in the package.json published to npm #2581

Closed
@kimulaco

Description

@kimulaco

Describe the bug

The package.json in the main branch has peerDependencies set, but the package.json actually published to npm does not have peerDependencies set.

This causes an issue in monorepo apps with multiple vue versions where unintended vue versions are imported.
pnpm/pnpm#8917

To Reproduce

Here's a minimal example:
https://github.com/kimulaco/monorepo-vue-example

The problem will not occur if you overwrite peerDependencies with pnpm's packageExtensions.
https://github.com/kimulaco/monorepo-vue-example/tree/add-peerDependencies

Expected behavior

peerDependencies should also be set in the npm published package.json.

Related information:

❯ npx envinfo --system --npmPackages vue,@vue/test-utils,vitest,jest

  System:
    OS: macOS 14.6.1
    CPU: (8) arm64 Apple M2
    Memory: 110.89 MB / 16.00 GB
    Shell: 5.9 - /bin/zsh

Additional context

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions