Skip to content

Commit 1ee1e82

Browse files
committed
Remove import-local
We no longer expect AVA to be installed globally. import-local was written for CJS and is unlikely to be compatible with modern Node.js packages.
1 parent f5b970c commit 1ee1e82

File tree

6 files changed

+14
-28
lines changed

6 files changed

+14
-28
lines changed

cli.js

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,3 @@
11
#!/usr/bin/env node
22
'use strict';
3-
const debug = require('debug')('ava');
4-
const importLocal = require('import-local');
5-
6-
// Prefer the local installation of AVA
7-
if (importLocal(__filename)) {
8-
debug('Using local install of AVA');
9-
} else {
10-
require('./lib/cli').run();
11-
}
3+
require('./lib/cli').run();

package-lock.json

Lines changed: 13 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,6 @@
8787
"figures": "^3.2.0",
8888
"globby": "^11.0.2",
8989
"ignore-by-default": "^2.0.0",
90-
"import-local": "^3.0.2",
9190
"indent-string": "^4.0.0",
9291
"is-error": "^2.2.2",
9392
"is-plain-object": "^5.0.0",

test-tap/fixture/local-bin/node_modules/ava/cli.js

Whitespace-only changes.

test-tap/fixture/local-bin/node_modules/ava/package.json

Lines changed: 0 additions & 3 deletions
This file was deleted.

test-tap/integration/assorted.js

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -66,19 +66,6 @@ test('should warn ava is required without the cli', t => {
6666
});
6767
});
6868

69-
test('prefers local version of ava', t => {
70-
execCli('', {
71-
dirname: 'fixture/local-bin',
72-
env: {
73-
DEBUG: 'ava'
74-
}
75-
}, (err, stdout, stderr) => {
76-
t.ifError(err);
77-
t.match(stderr, 'Using local install of AVA');
78-
t.end();
79-
});
80-
});
81-
8269
test('workers ensure test files load the same version of ava', t => {
8370
const target = path.join(__dirname, '..', 'fixture', 'ava-paths', 'target');
8471

0 commit comments

Comments
 (0)