Closed ajbarry closed 3 years ago
for a couple of flutter apps that have a shared (private) package
This is definitely supported and a common use case that melos supports as you described.
However, versioning works for pub.dev only and skips private packages (I imagine your apps have publish_to: none
on their pubspec.yaml files). Not sure what your use case here for versioning private apps but I guess we could make a change to allow the version bump to still occur for private packages. This is where it gets excluded so you should be able to test it out easily locally by removing these lines: https://github.com/invertase/melos/blob/master/packages/melos/lib/src/command/version.dart#L122-L124 (though we'd probably need to put this behind a flag so as not to be a breaking change).
Everything else apart from versioning should all be working though, with your shared package correctly interlinked across your apps in Dart.
I have a similar use case, multiple customer facing apps that depend on common packages. Ideally you'd be able to bump and version a specific app for release
I have a similar use case, multiple customer facing apps that depend on common packages. Ideally you'd be able to bump and version a specific app for release
If we can get that line I mentioned above changed to not skip private packages then if you change the common package, and run melos version
- melos will bump all packages (or in your case apps) that depend on the common package
I just tried that and it doesnt seem to find anything: No packages were found that required versioning.
Aside from the Conventional Commits is there anything else that needs to be done to make it work?
Ah ye forgot, there's multiple places where private packages are filtered out, will need to remove that one I mentioned previously and also this one: https://github.com/invertase/melos/blob/master/packages/melos/lib/src/command/version.dart#L184-L186 - should be fine after that.
Any update on this? Can the package be used to version a private package?
Any update on this? Can the package be used to version a private package?
The changes I mentioned above would need doing through a PR which would allow this. It's been low priority for me and was hoping someone would help out and contribute a PR for this, otherwise it may be while until I get to it. PRs are reviewed and shipped fairly quickly.
Any update on this? Can the package be used to version a private package?
The changes I mentioned above would need doing through a PR which would allow this. It's been low priority for me and was hoping someone would help out and contribute a PR for this, otherwise it may be while until I get to it. PRs are reviewed and shipped fairly quickly.
Happy to contribute with a PR for this.
Any update on this? Can the package be used to version a private package?
The changes I mentioned above would need doing through a PR which would allow this. It's been low priority for me and was hoping someone would help out and contribute a PR for this, otherwise it may be while until I get to it. PRs are reviewed and shipped fairly quickly.
Happy to contribute with a PR for this.
Yes please
This is now available in 0.4.7 as --all
- thanks @essarn for the PR (#67).
Melos appears to be just what I was looking for to help with the release process for a couple of flutter apps that have a shared (private) package. I have been looking through the docs, examples, issues etc but I am unable to figure out if our current use-case is supported. Here is a melos.yaml config that I am hoping is supported but I can't seem to use the
melos version
command to bump and generate the app changelogs as I hoped:The result of my command line session yields:
I have tried all combinations I can think of using
--all
,--private
,--no-published
etc.Is this a matter of misconfiguration, filesystem layout or something just not supported at this time?