Skip to content

Commit

Permalink
Move api.js into lib/
Browse files Browse the repository at this point in the history
Originally the goal may have been for this to be accessible
programmatically, but it's unclear whether we'd ever end up supporting
that. For now moving it into the lib/ directory better communicates it's
internal.
  • Loading branch information
novemberborn committed Apr 19, 2019
1 parent ebf4807 commit 2704b16
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
12 changes: 6 additions & 6 deletions api.js → lib/api.js
Expand Up @@ -14,12 +14,12 @@ const arrify = require('arrify');
const makeDir = require('make-dir');
const ms = require('ms');
const chunkd = require('chunkd');
const babelPipeline = require('./lib/babel-pipeline');
const Emittery = require('./lib/emittery');
const RunStatus = require('./lib/run-status');
const AvaFiles = require('./lib/ava-files');
const fork = require('./lib/fork');
const serializeError = require('./lib/serialize-error');
const babelPipeline = require('./babel-pipeline');
const Emittery = require('./emittery');
const RunStatus = require('./run-status');
const AvaFiles = require('./ava-files');
const fork = require('./fork');
const serializeError = require('./serialize-error');

function resolveModules(modules) {
return arrify(modules).map(name => {
Expand Down
2 changes: 1 addition & 1 deletion lib/cli.js
Expand Up @@ -156,7 +156,7 @@ exports.run = () => { // eslint-disable-line complexity
}

const ciParallelVars = require('ci-parallel-vars');
const Api = require('../api');
const Api = require('./api');
const VerboseReporter = require('./reporters/verbose');
const MiniReporter = require('./reporters/mini');
const TapReporter = require('./reporters/tap');
Expand Down
2 changes: 1 addition & 1 deletion test/api.js
Expand Up @@ -6,7 +6,7 @@ const path = require('path');
const fs = require('fs');
const del = require('del');
const {test} = require('tap');
const Api = require('../api');
const Api = require('../lib/api');
const babelPipeline = require('../lib/babel-pipeline');

const testCapitalizerPlugin = require.resolve('./fixture/babel-plugin-test-capitalizer');
Expand Down
4 changes: 2 additions & 2 deletions test/helper/report.js
Expand Up @@ -10,8 +10,8 @@ const pkg = require('../../package.json');
let _Api = null;
const createApi = options => {
if (!_Api) {
_Api = proxyquire('../../api', {
'./lib/fork': proxyquire('../../lib/fork', {
_Api = proxyquire('../../lib/api', {
'./fork': proxyquire('../../lib/fork', {
child_process: Object.assign({}, childProcess, { // eslint-disable-line camelcase
fork(filename, argv, options) {
return childProcess.fork(path.join(__dirname, 'report-worker.js'), argv, options);
Expand Down

0 comments on commit 2704b16

Please sign in to comment.