-
Notifications
You must be signed in to change notification settings - Fork 135
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
refactor: replace cosmiconfig with lilconfig #183
base: main
Are you sure you want to change the base?
Conversation
cc @kentcdodds |
Thanks for this! Is this a breaking change? |
Shouldn't be. lilconfig is mostly compatible. Yaml loaders are covered. |
Bummer, looks like this project is using old versions of deps and something broke. I'm afraid I don't have any time to get things updated in this project and get things fixed so we can get this merged :( |
If you want I can take care of this on weekend. |
It looks nonbreaking since it still requires yaml and defines a yaml loader. I really wouldn't mind seeing yaml config support dropped. Would it work to just have yaml as an optional peer dependency? |
Whatever you two want to do. I don't use babel anymore. |
I don't personally use macros support but care about node_modules size so it's enough motivation. Will look tomorrow. |
From what you shared just changing to |
I fixed build here. Though not sure as ci run need to be approved. |
cosmiconfig is a massive package which recently got a small alternative without dependencies lilconfig. https://github.com/antonk52/lilconfig https://packagephobia.com/result?p=cosmiconfig https://packagephobia.com/result?p=lilconfig Though still a big part of cosmiconfig is `yaml` package. https://packagephobia.com/result?p=yaml This package is important piece of [relay](https://github.com/facebook/relay/blob/378104f341c0682dbad646221db34fc5e0ce41c9/packages/babel-plugin-relay/package.json#L16) and [emotion](https://github.com/emotion-js/emotion/blob/242f7d8c9f3ddbba2a69664bcc0fa22501df849f/packages/babel-plugin/package.json#L22). Would be good to make it as small as possible.
You'll also need to change babel-plugin-macros/src/__tests__/index.js Lines 10 to 18 in d613985
What the heck is that for I wonder!? |
"resolve": "^1.19.0" | ||
"lilconfig": "^2.0.4", | ||
"resolve": "^1.19.0", | ||
"yaml": "^1.10.2" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
there is just a recent security vulnerability on yaml <2.2.2, is it possible to take an upgraded version? Thanks
https://security.snyk.io/vuln/SNYK-JS-YAML-5458867
What:
cosmiconfig is a massive package which recently got a small alternative
without dependencies lilconfig.
https://github.com/antonk52/lilconfig
https://packagephobia.com/result?p=cosmiconfig
https://packagephobia.com/result?p=lilconfig
Though still a big part of cosmiconfig is
yaml
package.https://packagephobia.com/result?p=yaml
This package is important piece of relay and emotion. Would be good to make it as small as possible.
Why:
Node modules are bloated with large dependencies. I'm trying to help with this.
How:
Just switch to alternative.
Checklist: