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

es modules and build system updates #198

Merged
merged 6 commits into from
Jun 26, 2019

Conversation

chrisblossom
Copy link
Contributor

This PR tackles item number 1 in #197 (comment).

This lays most of the groundwork to migrate to typescript, but I tried to also let this PR stand on its own.

b2b5d39 - Please look at this commit and the description and verify you agree with this change.
c486b86 - This PR includes a breaking change to using a named export as described here.

// es modules
import { cosmiconfig } from 'cosmiconfig';

// common js
const { cosmiconfig } = require('cosmiconfig');

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.

b2b5d39 - Please look at this commit and the description and verify you agree with this change.

I'm fine with removing tests from the precommit hooks, but I'd like to keep linting and type checking there. I think it's important to check those with every commit, so you don't need to make follow-up commits just to clean-up linting/typing errors.

Overall code looks good. I had a few questions about changes that might not be necessary.

I haven't yet pulled it down and tried out, but will give that a shot soon.

.travis.yml Outdated Show resolved Hide resolved
appveyor.yml Outdated Show resolved Hide resolved
package.json Outdated Show resolved Hide resolved
package.json Outdated Show resolved Hide resolved
package.json Outdated Show resolved Hide resolved
package.json Outdated Show resolved Hide resolved
README.md Show resolved Hide resolved
@chrisblossom
Copy link
Contributor Author

chrisblossom commented Jun 23, 2019

I think it's important to check those with every commit, so you don't need to make follow-up commits just to clean-up linting/typing errors.

This is why I wanted to point this out. I've been taught to commit often so it is easy to go back then merge commits when finished. I just end up using the --no-verify arg. I'll add it back to pre-commit.

EDIT:

I'm fine with removing tests from the precommit hooks

If we keep linting and type errors, we should probably keep tests in there too, right?

The "coverage" script looks to have been replaced previously using jest's configuration. I checked both CI scripts and do not see this being used anywhere
@codecov-io
Copy link

codecov-io commented Jun 23, 2019

Codecov Report

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

Impacted file tree graph

@@          Coverage Diff          @@
##           master   #198   +/-   ##
=====================================
  Coverage     100%   100%           
=====================================
  Files           7      7           
  Lines         210    188   -22     
=====================================
- Hits          210    188   -22
Impacted Files Coverage Δ
src/cacheWrapper.js 100% <ø> (ø) ⬆️
src/createExplorer.js 100% <ø> (ø) ⬆️
src/getDirectory.js 100% <ø> (ø) ⬆️
src/index.js 100% <ø> (ø) ⬆️
src/getPropertyByPath.js 100% <ø> (ø) ⬆️
src/loaders.js 100% <ø> (ø) ⬆️
src/readFile.js 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 26a961a...615c8f1. Read the comment docs.

@davidtheclark
Copy link
Collaborator

If we keep linting and type errors, we should probably keep tests in there too, right?

Tests are significantly slower and don't run only on the staged files, so I'm fine with drawing that line. There aren't too many tests here, since there's not that much code, so I also don't mind keeping the tests in the pre-commit hook. Either way.

@chrisblossom
Copy link
Contributor Author

Tests are significantly slower and don't run only on the staged files, so I'm fine with drawing that line. There aren't too many tests here, since there's not that much code, so I also don't mind keeping the tests in the pre-commit hook. Either way.

I put the tests along with linting/type checking back into the hook.

I think the last concern (currently) I need to deal with is codecov. Should I remove that change or fix the windows errors?

@davidtheclark
Copy link
Collaborator

Yeah, let's undo the codecov change until it becomes necessary; then we can merge when this has the green light.

@chrisblossom
Copy link
Contributor Author

Yeah, let's undo the codecov change until it becomes necessary; then we can merge when this has the green light.

Sounds good! Let me know if I should put PRs in a different way.

Also, I've been git force pushing to keep the commits clean in case it gets merged. If you want me to stop doing that (and possibly do it before it is merged) let me know.

@davidtheclark
Copy link
Collaborator

davidtheclark commented Jun 26, 2019

Also, I've been git force pushing to keep the commits clean in case it gets merged. If you want me to stop doing that (and possibly do it before it is merged) let me know.

Thanks for asking. I don't have any problem with this unless I'm also contributing commits to the branch; since that's not the case here, go for it. I appreciate the effort to make clean commits.

@davidtheclark davidtheclark merged commit 53d2d40 into cosmiconfig:master Jun 26, 2019
@chrisblossom chrisblossom deleted the with-babel branch June 26, 2019 16:25
@chrisblossom chrisblossom mentioned this pull request Jul 1, 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