Open TrySound opened 2 years ago
cc @kentcdodds
Thanks for this! Is this a breaking change?
Shouldn't be. lilconfig is mostly compatible. Yaml loaders are covered. Not sure why tests are failing. Looks like something unrelated to change.
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 lilconfig
and yaml
would save ~275kb in node_modules
(751 -> 466KB of deps for config loading). It's a moderate win, but not nearly as big as also eliminating the useless yaml dep, at which point we'd be down to 27kb of config loading which finally sounds like a number on the correct order of magnitude.
I fixed build here. Though not sure as ci run need to be approved. https://github.com/kentcdodds/babel-plugin-macros/pull/184
You'll also need to change https://github.com/kentcdodds/babel-plugin-macros/blob/d613985d297a73aeb3d7c8fad18a4944416b0bed/src/__tests__/index.js#L10-L18
What the heck is that for I wonder!?
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=yamlThis 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: