melos
melos copied to clipboard
Add git tags for caret version range
Context
We are using Melos to organize our private Flutter components monorepo.
Dependant projects use git references to securely obtain the packages like this:
dependencies:
my_private_package:
git:
url: [email protected]_org/my_monorepo.git
path: packages/my_package
ref: my_package-v1.0.0
Problem
This introduces 2 problems:
- This makes the dependants reliant on a single version, instead of a range (
^1.0.0) - Internal dependencies inside the monorepo need to change their ranges everytime a new child project is updated
Proposal
What I suggest is on melos version, create a tag which follows the equivalent of a caret range:
my_package-v1.x
This tag would be changed every time a new version within 1.x is tagged.
For unstable releases, create my_package-v0.1.x to follow semver correctly.
@danilofuchs Hello, Have you settled on a solution for this? We also have dependency between our internal packages. I thought about using ByteDance's unpub to host the packages as if were on pub. So we wouldn't lose melos features.
@danilofuchs Hello, Have you settled on a solution for this? We also have dependency between our internal packages. I thought about using ByteDance's unpub to host the packages as if were on pub. So we wouldn't lose melos features.
I haven't worked with flutter in a while (unfortunately) so I have no news about this, but unpub I think is the best replacement, but has downsides in terms of setting up and maintenance
Hello @Salakar, Do you guys have this in your plans? Do you have a workaround for me for the time being (other than un-pub since it is extremely expensive as a workaround)?
@ahmdaeyz Sorry, there are no concrete plans to implement this. OnePub looks like a more user-friendly option for private hosting of pub packages.