Closed schmunk42 closed 6 years ago
With the option config.foxy.manager-version
. but config.foxy.manager
must be npm
for your example.
I have config.foxy.manager
set to yarn
.
I was looking more for a setting, which says: You can either use yarn >= 1.0
or npm >= 5.0
to install assets of this project.
I did not anticipate this behavior, but simplified with a single asset manager. In this case, all manager options should be changed. Initially, I had duplicate each option with the name of the manager, but it made the config much more complex.
Maybe, allowed for each option to define a map with the name of the manager, like:
{
"config": {
"foxy": {
"manager-version": {
"npm": ">=5.0",
"yarn": ">=1.0"
}
}
}
}
The code snippet looks good to me.
In my setups I'll have control over the package-manager to use, since it'll be in a Container. But I already stumbled upon a lot of strange behaviors between 0.x and 1.x versions of yarn and 3.x to 5.x version of npm.
Excluding knowingly broken versions is great.
Added by 71b8792664bf2fce286a6cdb0ac5201156f6e37c.
This demo-project: https://github.com/schmunk42/foxy-roxy-rabbit can be installed fine with
yarn
, but fails onnpm@3
(https://github.com/npm/npm/issues/9054), works again withnpm@5
Can I require this in
composer.json
?