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
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion lib/cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ const arrify = require('arrify');
const meow = require('meow');
const Promise = require('bluebird');
const pkgConf = require('pkg-conf');
const fs = require('fs');
const isCi = require('is-ci');
const hasFlag = require('has-flag');
const Api = require('../api');
Expand All @@ -21,7 +22,7 @@ const babelConfigHelper = require('./babel-config');
Promise.longStackTraces();

exports.run = () => {
const conf = pkgConf.sync('ava');
const conf = (fs.exists('.avarc') ? JSON.parse(fs.readFileSync('.avarc')) : pkgConf.sync('ava'));

const filepath = pkgConf.filepath(conf);
const projectDir = filepath === null ? process.cwd() : path.dirname(filepath);
Expand Down
10 changes: 5 additions & 5 deletions profile.js
Original file line number Diff line number Diff line change
Expand Up @@ -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.

const findCacheDir = require('find-cache-dir');
const uniqueTempDir = require('unique-temp-dir');
const arrify = require('arrify');
Expand All @@ -35,11 +36,10 @@ globals.clearTimeout = clearTimeout.bind(null);

Promise.longStackTraces();

const conf = pkgConf.sync('ava', {
defaults: {
babel: 'default'
}
});
const conf = Object.assign(
{ babel: 'default' },
(fs.exists('.avarc') ? JSON.parse(fs.readFileSync('.avarc')) : pkgConf.sync('ava'))
);

// Define a minimal set of options from the main CLI
const cli = meow(`
Expand Down