Skip to content

Adds .avarc meta file support. #1627

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

Closed
wants to merge 1 commit into from
Closed

Adds .avarc meta file support. #1627

wants to merge 1 commit into from

Conversation

jtag05
Copy link

@jtag05 jtag05 commented Jan 4, 2018

Simple implementation resolving #520.

@novemberborn
Copy link
Member

Hey @jtag05, thanks for the PR. #520 has already been closed as wontfix. Clearly this is a contentious issue but I'd like to see an argument in favor of placing configuration outside of package.json that goes beyond "it's what I'm used to from other tools", which I think is where we left #520.

Anyway, #520 is the place for that discussion, though of course the "it's what I'm used to" point has already been made.

@pho3nixf1re
Copy link

pho3nixf1re commented Jan 4, 2018

@novemberborn there is a perfectly valid argument in #520 that was recently posted. The package.json file has become a dumping ground for configuration. In large projects it makes it huge and unwieldy. Digging through a giant JSON file is not a pleasant experience and is reminiscent of the Java world's XML configs. My team prefers the dotfiles as it neatly separates each tool's configuration that is easily explorable. It is not just because "we are used to it". Every other tool we use manages to support this trivial feature that we value but AVA. It seems absurd that even in the face of community outcry and the presence of a perfectly fine PR the maintainers here ignore the need.

@jtag05
Copy link
Author

jtag05 commented Jan 4, 2018

@novemberborn I'd like to see an argument against implementing 7 lines of code that has no performance issues. I understand that preferences are exactly that, but rather than taking the stance of "why should we?", as a utility should you not be approaching this from the perspective of "Why not?" as a means of maximizing adoption?

I think it's fair to argue that whichever route a developer chooses (meta file or package.json) all configuration should be stored the same way. As I have previously stated in the #520 thread, I was a supporter of package.json based configutation, but I've since run into issues on projects where a package.json file get's seriously bloated. Take for instance if you use a custom eslintConfig and store it in package.json, that can easily run 300 lines.

@@ -9,6 +9,7 @@ const EventEmitter = require('events');
const meow = require('meow');
const Promise = require('bluebird');
const pkgConf = require('pkg-conf');
const fs = require('pkg-conf');
Copy link

Choose a reason for hiding this comment

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

I think you meant require('fs') here.

@psirenny
Copy link

To add to what @pho3nixf1re said, I prefer dotfiles because they can easily be added to a .npmignore file. Consumers of my packages don't care about various config choices and don't need to download bloated package.json file.

@novemberborn
Copy link
Member

@psirenny the latest beta release (tagged next on npm) has support for ava.config.js files. Not a dotfile but you can keep config out of package.json and away from npm.

@avajs avajs locked as resolved and limited conversation to collaborators Jul 4, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants