Open jcnventura opened 1 year ago
Part of this use case is already somewhat supported by the drupal-libraries-dependencies
option.
That being said, I don't think it's a good idea to try to allow this sort of dynamic functionality due to how dangerous it could potentially be, so it's not currently on the plans for the project.
However if you're able to implement the feature in an isolated manner without breaking existing features or introducing a lot of additional complexity, then I'd be happy to merge it in. It'd probably need safeguards on directories which they're allowed to write to just to reduce any potential damage.
Instead of having the site builder explicitly set the library version on the site's root composer.json, as a module maintainer, I'd like to be able to specify exactly which version and the installer-name of the library is used when installing my module.
The best option that I've seen upto now for this is what webform does with composer.libraries.json, but this has the undesired side effect of having to use the wikimedia/composer-merge-plugin which is doing a lot more than just installing libraries, and requires a 2nd pass of composer every time.
I'd like an option like: