You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you agree that this is a limitation and it should be resolved (it appears you do since you created this issue), just let us know how you're thinking about it and what roughly needs to be done to support it. We're eager to resolve it and can properly dedicate resources to it now.
Thanks for examples. Keyed array in object should but already possible but indeed top level array might make sense too.
Main thing to solve before attempting implementation is figure out how we are going to merge different sources. For example if configrc is enabled, or we have extending layers, should they apply to all? or should they be applied to one? if layer also exports and array how to merge then?
Can you point me to those features or show examples for the 3 scenarios you described? I am not familiar with them, I've always used a single config file. By extension, I assume 99% of our users do the same since we guide towards that in the documentation. So these "edge cases" don't really apply to us specifically, but of course happy to think through them
As i guess we don't really need to support all those extension/cases you mentioned, I just created a fork with basic update of the c12 to simply support array on configs
Activity
sadeghbarati commentedon Feb 13, 2024
mrlubos commentedon May 15, 2024
pi0 commentedon Jun 11, 2024
mrlubos commentedon Aug 27, 2025
@pi0 what are your latest thoughts on this? Still looking to add this? Let us know if there's any guidance, @carson2222 could work on it
pi0 commentedon Aug 27, 2025
@mrlubos Can you share an example of input config and desired returned value in your case? 🙏🏼
mrlubos commentedon Aug 27, 2025
Our request comes from this thread hey-api/hey-api#564
All of those use cases can be handled on our end as long as the root is an object. That leaves us with one exception: arrays.
This is a c12 constraint, right?
mrlubos commentedon Aug 27, 2025
We could hack around it by wrapping the array in another object.
But this isn't ergonomic + there's a challenge with how to name the array.
mrlubos commentedon Aug 27, 2025
If you agree that this is a limitation and it should be resolved (it appears you do since you created this issue), just let us know how you're thinking about it and what roughly needs to be done to support it. We're eager to resolve it and can properly dedicate resources to it now.
pi0 commentedon Aug 27, 2025
Thanks for examples. Keyed array in object should but already possible but indeed top level array might make sense too.
Main thing to solve before attempting implementation is figure out how we are going to merge different sources. For example if configrc is enabled, or we have extending layers, should they apply to all? or should they be applied to one? if layer also exports and array how to merge then?
mrlubos commentedon Aug 27, 2025
Can you point me to those features or show examples for the 3 scenarios you described? I am not familiar with them, I've always used a single config file. By extension, I assume 99% of our users do the same since we guide towards that in the documentation. So these "edge cases" don't really apply to us specifically, but of course happy to think through them
carson2222 commentedon Sep 5, 2025
Hey @pi0, Your answer would be very helpful 🙂
carson2222 commentedon Sep 9, 2025
As i guess we don't really need to support all those extension/cases you mentioned, I just created a fork with basic update of the c12 to simply support array on configs
https://github.com/carson2222/c12
pi0 commentedon Sep 11, 2025
@carson2222 @mrlubos, please feel free to drop a PR for https://github.com/hey-api/c12/commit/74c06e7202772f74b7ecc728cf54777bd0f28f94
carson2222 commentedon Sep 11, 2025
There you go!
#272
pi0 commentedon Sep 15, 2025
Available in
c12@^3.3.0(https://github.com/unjs/c12/releases/tag/v3.3.0)