Skip to content
Permalink
Browse files

Remove bench files; clean up & bump dependencies

* Remove bench files

* Remove unused dependencies

* Bump dev dependencies

* Bump dependencies
  • Loading branch information
novemberborn committed Jan 4, 2020
1 parent 8fa2825 commit 4fdd416a602fdb0d22df51246adf4d2b00609914
@@ -1,5 +1,4 @@
node_modules
.nyc_output
coverage
bench/.results
test/.tmpdir

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

@@ -1,17 +1,17 @@
'use strict';
const fs = require('fs');
const path = require('path');
const os = require('os');
const commonPathPrefix = require('common-path-prefix');
const uniqueTempDir = require('unique-temp-dir');
const isCi = require('is-ci');
const resolveCwd = require('resolve-cwd');
const debounce = require('lodash/debounce');
const Bluebird = require('bluebird');
const arrify = require('arrify');
const makeDir = require('make-dir');
const ms = require('ms');
const chunkd = require('chunkd');
const Emittery = require('emittery');
const pMap = require('p-map');
const tempDir = require('temp-dir');
const globs = require('./globs');
const RunStatus = require('./run-status');
const fork = require('./fork');
@@ -199,7 +199,7 @@ class Api extends Emittery {
}

// Try and run each file, limited by `concurrency`.
await Bluebird.map(selectedFiles, async file => {
await pMap(selectedFiles, async file => {
// No new files should be run once a test has timed out or failed,
// and failFast is enabled.
if (bailed) {
@@ -229,9 +229,15 @@ class Api extends Emittery {
restartTimer();

return worker.promise;
}, {concurrency});
}, {concurrency, stopOnError: false});
} catch (error) {
runStatus.emitStateChange({type: 'internal-error', err: serializeError('Internal error', false, error)});
if (error && error.name === 'AggregateError') {
for (const err of error) {
runStatus.emitStateChange({type: 'internal-error', err: serializeError('Internal error', false, err)});
}
} else {
runStatus.emitStateChange({type: 'internal-error', err: serializeError('Internal error', false, error)});
}
}

restartTimer.cancel();
@@ -244,11 +250,11 @@ class Api extends Emittery {
}

const cacheDir = this.options.cacheEnabled === false ?
uniqueTempDir() :
fs.mkdtempSync(`${tempDir}${path.sep}`) :
path.join(this.options.projectDir, 'node_modules', '.cache', 'ava');

// Ensure cacheDir exists
makeDir.sync(cacheDir);
fs.mkdirSync(cacheDir, {recursive: true});

this._cacheDir = cacheDir;

@@ -7,7 +7,7 @@ const debug = require('debug')('ava');
let ignoreStackLines = [];

const avaInternals = /\/ava\/(?:lib\/|lib\/worker\/)?[\w-]+\.js:\d+:\d+\)?$/;
const avaDependencies = /\/node_modules\/(?:@ava\/babel|append-transform|bluebird|empower-core|nyc|require-precompiled|(?:ava\/node_modules\/)?(?:babel-runtime|core-js))\//;
const avaDependencies = /\/node_modules\/(?:@ava\/babel|append-transform|empower-core|nyc|require-precompiled|(?:ava\/node_modules\/)?(?:babel-runtime|core-js))\//;
const stackFrameLine = /^.+( \(.+:\d+:\d+\)|:\d+:\d+)$/; // eslint-disable-line prefer-named-capture-group

if (!debug.enabled) {

0 comments on commit 4fdd416

Please sign in to comment.
You can’t perform that action at this time.