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

[Discussion] Potential breaking changes for v6 #191

Closed
chrisblossom opened this issue Jun 12, 2019 · 7 comments
Closed

[Discussion] Potential breaking changes for v6 #191

chrisblossom opened this issue Jun 12, 2019 · 7 comments

Comments

@chrisblossom
Copy link
Contributor

Looks like #190 will be released soon and will require a major version bump.

Are there any potential changes to the API that should be considered before releasing 6.0.0?

I personally would like to see this repository converted to typescript as it has a much larger community backing. I've recently made the switch and with some exceptions, I have found it a much more pleasant development experience. I'd be willing to put together an initial PR if that is something @davidtheclark @sudo-suhas @olsonpm is interested in. If not I completely understand...it isn't needed and somewhat "bikeshedding".

@davidtheclark
Copy link
Collaborator

Thanks for opening this, @chrisblossom.

Re TypeScript: At this point, I wouldn't mind switching to TypeScript — it would be a good educational opportunity for me, since I don't have experience with it — especially if you're interested in putting in the legwork. I'm assuming it won't require significant refactoring of non-type code: if it does, I'd be more hesitant. If you want to start a PR towards that, go for it. If you're finding yourself making more than type-level changes though, it may be a good idea to pause and discuss those before you put in too much work.

@chrisblossom
Copy link
Contributor Author

I'm assuming it won't require significant refactoring of non-type code: if it does, I'd be more hesitant. ... If you're finding yourself making more than type-level changes though, it may be a good idea to pause and discuss those before you put in too much work.

Should be very straight forward with minimal changes necessary. I have a fair amount of experience what it takes to convert and update the build process. FYI, I don't think I'll have time to start on it until next week at the earliest.

I think the biggest change that you'll find is common js / module interop (which I think is currently an issue, just not very known). I think the best / most future proof solution is to remove default exports and use a named export instead. Relevant discussion: johnagan/clean-webpack-plugin#114

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

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

@sudo-suhas
Copy link
Contributor

While migrating to typescript(I too support this), we should try to use the --strict compiler option. However, I think we should minimise changes required for users to upgrade cosmiconfig unless there is a very good reason to do so.

@chrisblossom
Copy link
Contributor Author

I put in PRs #192 #193 #194 #195 in preparation for typescript. The only one that is necessary is #194, the others are just things I noticed while updating the packages. Please close if they aren't wanted changes.

This was referenced Jun 21, 2019
@chrisblossom
Copy link
Contributor Author

chrisblossom commented Jul 26, 2019

Moved from #197 (comment):

I've opened some PRs to start discussions with some breaking changes I'm proposing. I'm not sure they are the best API possible, but wanted to open the PRs to get the process started.

@chrisblossom
Copy link
Contributor Author

After #211 and #212 the only PR left for me to do before a new release is published is to fix/update the dependencies because of the issue described in #206.

@davidtheclark
Copy link
Collaborator

I just released v6 🎈

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

No branches or pull requests

3 participants