-
-
Notifications
You must be signed in to change notification settings - Fork 50
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
Make syncpack configurable from the 'config' option in package.json #86
Comments
Hey Hector, this is all handled by https://github.com/davidtheclark/cosmiconfig – not sure yet but maybe it's some option we need to pass or it's something they might add as a new feature on request. |
Hey, thanks for the response, here's the prop you're looking for: packageProp : Looks like it only allows one value for package.json, it would've been nice if multiple values were could be configured. |
Had a quick look at this just now @bombillazo, what it would need is for syncpack to run cosmiconfig a 2nd time if Line 31 in 2d9516f
I'll lower the priority on this rather than close it, as I can see why it would be desirable. But a relative minority of users would use it, while all users which don't use the default config file location would get a performance penalty. Thanks for raising, let's look again in a while. |
Sure, one recommendation I could give is to directly read the package.json file and see which keys exist before running cosmiconfig: var pjson = require('./package.json');
const hasConfigOption = !!pjson.config.syncpack The performance penalty for this is minimal, especially compared to rerunning cosmiconfig. |
Yeah, good shout 👍🏻 |
Released in 8.3.8, thanks a lot. |
Thank you! |
Description
Currently, when configuring
syncpack
from package.json, it is only configurable with thesyncpack
option directly in the root of the package.json file. For compatibility with the config option, it would be great ifsyncpack
also checked for the config inside the config option.Suggested Solution
Have
syncpack
check for the configuration insideconfig
:The text was updated successfully, but these errors were encountered: