Skip to content

[Feature]: Update peer dependency versions at publish time #955

@nicojs

Description

@nicojs

Given this package structure:

root
| -- packages
     | -- foo
     | -- bar

And bar is a peerDependency of foo.

When we publish a new version of foo and bar also update of the peerDependency in foo to the latest version.

We should only update the peer dependency on bar if the following conditions are met:

  • When the peerDependency on bar was an exact version. So "bar": "^0.14 || ^15.0.0" should not be updated, but "bar": "0.5.6" should be updated. Question: what about "bar": "^0.5.6"?
  • When the foo dependency is being published. i.e. we should not force a release of foo if bar is updated and we're running in independent versioning mode. Question: or should we force it?

Edit: Is this feature already implemented? https://github.com/lerna/lerna/blob/master/src/commands/PublishCommand.js#L452

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions