-
-
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
Breaking: remove cosmiconfig.loaders and add named export defaultLoaders. #208
Breaking: remove cosmiconfig.loaders and add named export defaultLoaders. #208
Conversation
Codecov Report
@@ Coverage Diff @@
## master #208 +/- ##
=====================================
Coverage 100% 100%
=====================================
Files 7 7
Lines 231 228 -3
Branches 51 51
=====================================
- Hits 231 228 -3
Continue to review full report at Codecov.
|
6ed7df8
to
9608f77
Compare
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.
Makes sense to me 👍
@@ -303,17 +303,19 @@ Default: See below. | |||
|
|||
An object that maps extensions to the loader functions responsible for loading and parsing files with those extensions. | |||
|
|||
Cosmiconfig exposes its default loaders for `.js`, `.json`, and `.yaml` as `cosmiconfig.loadJs`, `cosmiconfig.loadJson`, and `cosmiconfig.loadYaml`, respectively. | |||
Cosmiconfig exposes its default loaders as a named export `defaultLoaders` for `.js`, `.json`, and `.yaml` as `defaultLoaders.loadJs`, `defaultLoaders.loadJson`, and `defaultLoaders.loadYaml`, respectively. |
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.
Cosmiconfig exposes its default loaders as a named export `defaultLoaders` for `.js`, `.json`, and `.yaml` as `defaultLoaders.loadJs`, `defaultLoaders.loadJson`, and `defaultLoaders.loadYaml`, respectively. | |
Cosmiconfig exposes its default loaders on a named export `defaultLoaders`. The loaders for `.js`, `.json`, and `.yaml` are `defaultLoaders.loadJs`, `defaultLoaders.loadJson`, and `defaultLoaders.loadYaml`, respectively. |
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.
Did you want me to put another PR in with the requested changes?
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.
Oh, oops. I'll take care of it.
Because named exports are used it makes sense to directly export the default loaders instead of attaching it to the actual
cosmiconfig
export.