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
Hi, we are working in several mono-repositories. Here an example of our structure:
MONOREPO X
~/monorepo-x/.volta/hooks.json
~/monorepo-x/services/a
~/monorepo-x/services/b
MONOREPO Y
~/monorepo-y/.volta/hooks.json
~/monorepo-y/services/c
~/monorepo-y/services/d
Problem
The problem we see is that when we are in ~/monorepo-x/services/a it will try to fetch the current service .volta/hooks.json otherwise, it will jump directly to the $HOME one.
We could add the .volta/hooks.json per service, but we have hundreds of them per monorepo and this file will be repeated and unnecessary. If we repeat this per each monorepo we have, it will be thousands of duplication.
In another hand, each monorepo has different repositories, so we cannot use the $HOME one.
Desired behavior
Our desired behavior is: if you cannot find .volta/hooks.json on the current directory, go a step back on directories until you find it.
This will support having global hooks.json per monorepo without duplicating the configuration per service. E.g.
The way we have this designed at present is that you can extends a parent volta config in your package.json, which will correctly use the hooks from the root. So, e.g. in monorepo-x/services/a/package.json, and assuming a monorepo-x/package.json:
{
"volta": {
"extends": "../../package.json"
}
}
For the sake of speed we have consciously chosen not to walk the file system like this: it can take a semi-arbitrary amount of time, depending on your folder structure. It's also not a given that it's a desired behavior for all situations like this! See some prior discussions in volta-cli/rfcs#43, #862, #282, and #950.
That doesn't make it a never, just a needs quite a bit of thought and design work, especially given we don't want to break any existing behavior!
Hi, we are working in several mono-repositories. Here an example of our structure:
Problem
The problem we see is that when we are in
~/monorepo-x/services/a
it will try to fetch the current service.volta/hooks.json
otherwise, it will jump directly to the$HOME
one.We could add the
.volta/hooks.json
per service, but we have hundreds of them per monorepo and this file will be repeated and unnecessary. If we repeat this per each monorepo we have, it will be thousands of duplication.In another hand, each monorepo has different repositories, so we cannot use the
$HOME
one.Desired behavior
Our desired behavior is: if you cannot find
.volta/hooks.json
on the current directory, go a step back on directories until you find it.This will support having global
hooks.json
per monorepo without duplicating the configuration per service. E.g.Is there any way now to have this behavior?
Is it something that will be implemented in the future?
The text was updated successfully, but these errors were encountered: