melos icon indicating copy to clipboard operation
melos copied to clipboard

feat: Add global dependency overrides

Open jtdLab opened this issue 2 years ago โ€ข 8 comments

Description

Support global dependency_overrides (#439)

This allows to define dependency overrides for each workspace package in melos.yaml like:

name: foo

packages:
  - packages/**

globalDependencyOverrides:
  my_dependency: 1.2.3

Type of Change

  • [x] โœจ feat -- New feature (non-breaking change which adds functionality)
  • [ ] ๐Ÿ› ๏ธ fix -- Bug fix (non-breaking change which fixes an issue)
  • [ ] โŒ ! -- Breaking change (fix or feature that would cause existing functionality to change)
  • [ ] ๐Ÿงน refactor -- Code refactor
  • [ ] โœ… ci -- Build configuration change
  • [ ] ๐Ÿ“ docs -- Documentation
  • [ ] ๐Ÿ—‘๏ธ chore -- Chore

jtdLab avatar May 15 '23 18:05 jtdLab

To view this pull requests documentation preview, visit the following URL:

melos.invertase.dev/~520

Documentation is deployed and generated using docs.page.

docs-page[bot] avatar May 15 '23 18:05 docs-page[bot]

CLA assistant check
All committers have signed the CLA.

CLAassistant avatar May 15 '23 18:05 CLAassistant

Hint:

The added globalDependencyOverrides and the existing dependencyOverridePaths do add the dependency override(s) to all workspace packages. This means packages that do not have a regular or dev dependency also get the override(s) which seems to be bad. Is this behaviour intended?

jtdLab avatar May 15 '23 19:05 jtdLab

@jtdLab Thanks for this contribution!

We already have dependencyOverridePaths . Could you make the new option a sibling of that one? I think dependencyOverrides would be enough as its name. Please also document the new option.

Is this behaviour intended?

Yes. Often, dependency overrides are used to override transitive dependencies.

blaugold avatar May 15 '23 19:05 blaugold

@blaugold i am no sure about the docs is it only the overview page which needs an update?

jtdLab avatar May 15 '23 21:05 jtdLab

Any updates on this?

jtdLab avatar Jul 12 '23 17:07 jtdLab

@blaugold @Salakar can some check this pr?

jtdLab avatar Sep 20 '23 21:09 jtdLab

@jtdLab this is offering the same functionality as #594 right?

spydon avatar Dec 28 '23 09:12 spydon

I'll close this since the functionality will be implemented with the new system in 594, thanks for the effort though!

spydon avatar Mar 11 '24 20:03 spydon