Skip to content
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

Merged

Conversation

chrisblossom
Copy link
Contributor

Because named exports are used it makes sense to directly export the default loaders instead of attaching it to the actual cosmiconfig export.

@codecov-io
Copy link

codecov-io commented Jul 25, 2019

Codecov Report

Merging #208 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@          Coverage Diff          @@
##           master   #208   +/-   ##
=====================================
  Coverage     100%   100%           
=====================================
  Files           7      7           
  Lines         231    228    -3     
  Branches       51     51           
=====================================
- Hits          231    228    -3
Impacted Files Coverage Δ
src/index.ts 100% <ø> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 9c9adc1...9608f77. Read the comment docs.

Copy link
Collaborator

@davidtheclark davidtheclark left a 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.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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.

Copy link
Contributor Author

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?

Copy link
Collaborator

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.

@davidtheclark davidtheclark merged commit 318d638 into cosmiconfig:master Jul 28, 2019
@chrisblossom chrisblossom deleted the loaders-to-named-export branch July 28, 2019 18:37
@davidtheclark davidtheclark mentioned this pull request Aug 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants