-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
monorepo single config #116
Comments
Hmm, I'm not sure I'd feel very comfortable with an approach that requires looking up the directory hierarchy past the package root. That feels like a prime recipe for vulnerabilities. Dropping a config file in any parent directory that would be parsed and read by a library that is explicitly meant to execute scripts? 😬 A few other problems:
What seems to be the core issue is an attempt to have multiple packages share a common set of scripty scripts. I believe that feature is already covered with scripty's support for sharing scripts via npm package. Slightly tangential (and perhaps not justification in its own right, but when taken together with the above concerns...): The fact that these multiple packages just happen to all be in the same git repository is rather incidental. That is, this configuration duplication is structural, not semantic, which does not lend itself to tight coupling. Other maintainers may feel differently, but I'm not sure I'm convinced this feature would be a net benefit. |
That is a very good point, indeed :)
I think these issues already exist when the scripts to be executed are located in parent folder - configure e.g. as Well, let me just wait if any other maintainer has some thoughts. If not, feel free to close this issue. I understand that the proposed feature might bring more problems when people start experimenting too much 😬 |
Hello, thanks for the library.
We are currently using it in a monorepo to ensure that the same script is run in all packages.
The one thing I would like to improve is to have a single point of configuration within the monorepo. To be more specific, we have the following configuration in every single
package.json
:A quite straight forward solution that comes to my mind is to use cosmiconfig that could easily find e.g.
.scriptyrc.js
in root of the monorepo in order to load the configuration. I think it might be a pretty simple PR.What do you think? Is it a viable option? Or is there a workaround I haven't found?
The text was updated successfully, but these errors were encountered: