Various minor tweaks
This commit is contained in:
parent
a1e08ab8fe
commit
2ed94853dd
11 changed files with 23 additions and 22 deletions
|
|
@ -7,6 +7,6 @@ charset = utf-8
|
|||
trim_trailing_whitespace = true
|
||||
insert_final_newline = true
|
||||
|
||||
[{package.json,*.yml}]
|
||||
[*.yml]
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
|
|
|
|||
1
.gitattributes
vendored
1
.gitattributes
vendored
|
|
@ -1,3 +1,4 @@
|
|||
* text=auto
|
||||
*.js text eol=lf
|
||||
*.ai binary
|
||||
*.psd binary
|
||||
|
|
|
|||
|
|
@ -12,4 +12,4 @@ before_install:
|
|||
before_script:
|
||||
- 'npm prune'
|
||||
after_success:
|
||||
- '[ -z "$COVERALLS_REPO_TOKEN" ] && tap --coverage-report=text-lcov | ./node_modules/.bin/coveralls'
|
||||
- './node_modules/.bin/nyc report --reporter=text-lcov > coverage.lcov && ./node_modules/.bin/codecov'
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ const childProcess = require('child_process');
|
|||
const path = require('path');
|
||||
const fs = require('fs');
|
||||
const arrify = require('arrify');
|
||||
const mkdirp = require('mkdirp');
|
||||
const makeDir = require('make-dir');
|
||||
const branch = require('git-branch').sync(path.join(__dirname, '..'));
|
||||
|
||||
const cliPath = require.resolve('../cli');
|
||||
|
|
@ -124,7 +124,7 @@ Promise.each(combined, definition => {
|
|||
});
|
||||
});
|
||||
}).then(() => {
|
||||
mkdirp.sync(path.join(__dirname, '.results'));
|
||||
makeDir.sync(path.join(__dirname, '.results'));
|
||||
results['.time'] = Date.now();
|
||||
|
||||
fs.writeFileSync(
|
||||
|
|
|
|||
1
cli.js
1
cli.js
|
|
@ -5,6 +5,7 @@ const debug = require('debug')('ava');
|
|||
|
||||
// Prefer the local installation of AVA.
|
||||
const resolveCwd = require('resolve-cwd');
|
||||
|
||||
const localCLI = resolveCwd('ava/cli');
|
||||
|
||||
// Use `path.relative()` to detect local AVA installation,
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ const chalk = require('chalk');
|
|||
const figures = require('figures');
|
||||
const configManager = require('hullabaloo-config-manager');
|
||||
const md5Hex = require('md5-hex');
|
||||
const mkdirp = require('mkdirp');
|
||||
const makeDir = require('make-dir');
|
||||
const colors = require('./colors');
|
||||
|
||||
function validate(conf) {
|
||||
|
|
@ -90,7 +90,7 @@ function build(projectDir, cacheDir, userOptions, powerAssert) {
|
|||
const seed = md5Hex([process.versions.node, projectDir]);
|
||||
|
||||
// Ensure cacheDir exists
|
||||
mkdirp.sync(cacheDir);
|
||||
makeDir.sync(cacheDir);
|
||||
|
||||
// The file names predict where valid options may be cached, and thus should
|
||||
// include the seed.
|
||||
|
|
|
|||
15
package.json
15
package.json
|
|
@ -103,7 +103,6 @@
|
|||
"arrify": "^1.0.0",
|
||||
"auto-bind": "^1.1.0",
|
||||
"ava-init": "^0.2.0",
|
||||
"babel-code-frame": "^6.16.0",
|
||||
"babel-core": "^6.17.0",
|
||||
"bluebird": "^3.0.0",
|
||||
"caching-transform": "^1.0.0",
|
||||
|
|
@ -149,11 +148,11 @@
|
|||
"lodash.flatten": "^4.2.0",
|
||||
"lodash.isequal": "^4.5.0",
|
||||
"loud-rejection": "^1.2.0",
|
||||
"make-dir": "^1.0.0",
|
||||
"matcher": "^0.1.1",
|
||||
"md5-hex": "^2.0.0",
|
||||
"meow": "^3.7.0",
|
||||
"mkdirp": "^0.5.1",
|
||||
"ms": "^0.7.1",
|
||||
"ms": "^1.0.0",
|
||||
"multimatch": "^2.1.0",
|
||||
"observable-to-promise": "^0.5.0",
|
||||
"option-chain": "^0.1.0",
|
||||
|
|
@ -174,12 +173,12 @@
|
|||
"update-notifier": "^2.1.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"babel-preset-react": "^6.5.0",
|
||||
"cli-table2": "^0.2.0",
|
||||
"coveralls": "^2.11.4",
|
||||
"delay": "^1.3.0",
|
||||
"codecov": "^2.1.0",
|
||||
"del": "^2.2.2",
|
||||
"delay": "^2.0.0",
|
||||
"execa": "^0.6.0",
|
||||
"flow-bin": "^0.42.0",
|
||||
"flow-bin": "^0.45.0",
|
||||
"get-stream": "^3.0.0",
|
||||
"git-branch": "^0.3.0",
|
||||
"has-ansi": "^2.0.0",
|
||||
|
|
@ -188,7 +187,6 @@
|
|||
"lolex": "^1.4.0",
|
||||
"nyc": "^10.0.0",
|
||||
"proxyquire": "^1.7.4",
|
||||
"rimraf": "^2.5.0",
|
||||
"signal-exit": "^3.0.0",
|
||||
"sinon": "^2.0.0",
|
||||
"source-map-fixtures": "^2.1.0",
|
||||
|
|
@ -202,7 +200,6 @@
|
|||
"typings": "types/generated.d.ts",
|
||||
"xo": {
|
||||
"rules": {
|
||||
"import/newline-after-import": "off",
|
||||
"no-use-extend-native/no-use-extend-native": "off"
|
||||
}
|
||||
},
|
||||
|
|
|
|||
|
|
@ -2,9 +2,10 @@
|
|||
const path = require('path');
|
||||
const fs = require('fs');
|
||||
const figures = require('figures');
|
||||
const rimraf = require('rimraf');
|
||||
const del = require('del');
|
||||
const test = require('tap').test;
|
||||
const Api = require('../api');
|
||||
|
||||
const testCapitalizerPlugin = require.resolve('./fixture/babel-plugin-test-capitalizer');
|
||||
|
||||
const ROOT_DIR = path.join(__dirname, '..');
|
||||
|
|
@ -658,7 +659,7 @@ function generateTests(prefix, apiCreator) {
|
|||
});
|
||||
|
||||
test(`${prefix} caching is enabled by default`, t => {
|
||||
rimraf.sync(path.join(__dirname, 'fixture/caching/node_modules'));
|
||||
del.sync(path.join(__dirname, 'fixture/caching/node_modules'));
|
||||
|
||||
const api = apiCreator({
|
||||
resolveTestsFrom: path.join(__dirname, 'fixture/caching')
|
||||
|
|
@ -687,7 +688,7 @@ function generateTests(prefix, apiCreator) {
|
|||
});
|
||||
|
||||
test(`${prefix} caching can be disabled`, t => {
|
||||
rimraf.sync(path.join(__dirname, 'fixture/caching/node_modules'));
|
||||
del.sync(path.join(__dirname, 'fixture/caching/node_modules'));
|
||||
|
||||
const api = apiCreator({
|
||||
resolveTestsFrom: path.join(__dirname, 'fixture/caching'),
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
const fs = require('fs');
|
||||
const path = require('path');
|
||||
const test = require('tap').test;
|
||||
const mkdirp = require('mkdirp');
|
||||
const makeDir = require('make-dir');
|
||||
const uniqueTempDir = require('unique-temp-dir');
|
||||
const configManager = require('hullabaloo-config-manager');
|
||||
|
||||
|
|
@ -154,7 +154,7 @@ test('updates cached verifier if dependency hashes change', t => {
|
|||
const cacheDir = path.join(projectDir, 'cache');
|
||||
const depFile = path.join(projectDir, 'plugin.js');
|
||||
|
||||
mkdirp.sync(cacheDir);
|
||||
makeDir.sync(cacheDir);
|
||||
fs.writeFileSync(depFile, 'foo');
|
||||
|
||||
const userOptions = {
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
'use strict';
|
||||
const proxyquire = require('proxyquire').noPreserveCache();
|
||||
const test = require('tap').test;
|
||||
|
||||
const beautifyStack = proxyquire('../lib/beautify-stack', {
|
||||
debug() {
|
||||
return {
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ const childProcess = require('child_process');
|
|||
const test = require('tap').test;
|
||||
const getStream = require('get-stream');
|
||||
const figures = require('figures');
|
||||
const mkdirp = require('mkdirp');
|
||||
const makeDir = require('make-dir');
|
||||
const touch = require('touch');
|
||||
const proxyquire = require('proxyquire');
|
||||
const sinon = require('sinon');
|
||||
|
|
@ -451,7 +451,7 @@ test('workers ensure test files load the same version of ava', t => {
|
|||
|
||||
// Copy the index.js so the testFile imports it. It should then load the correct AVA install.
|
||||
const targetInstall = path.join(target, 'node_modules/ava');
|
||||
mkdirp.sync(targetInstall);
|
||||
makeDir.sync(targetInstall);
|
||||
fs.writeFileSync(
|
||||
path.join(targetInstall, 'index.js'),
|
||||
fs.readFileSync(path.join(__dirname, '../index.js'))
|
||||
|
|
|
|||
Loading…
Reference in a new issue