Skip to content

Commit 2e7c76b

Browse files
authored
Node.js 14 compatibility
* Fix circular dependency * Add to CI matrix * Update supported engines * Add reporter logs
1 parent 59c227d commit 2e7c76b

23 files changed

+1643
-4
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
strategy:
1616
fail-fast: false
1717
matrix:
18-
node-version: [^10.18.0, ^12.14.0, ^13.5.0]
18+
node-version: [^10.18.0, ^12.14.0, ^13.5.0, ^14.0.0]
1919
os: [ubuntu-latest, windows-latest]
2020
steps:
2121
- uses: actions/checkout@v1

lib/globs.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ const globby = require('globby');
44
const ignoreByDefault = require('ignore-by-default');
55
const picomatch = require('picomatch');
66
const slash = require('slash');
7-
const {levels: providerLevels} = require('./provider-manager');
7+
const providerManager = require('./provider-manager');
88

99
const defaultIgnorePatterns = [...ignoreByDefault.directories(), '**/node_modules'];
1010
const defaultPicomatchIgnorePatterns = [
@@ -85,7 +85,7 @@ function normalizeGlobs({extensions, files: filePatterns, ignoredByWatcher: igno
8585
}
8686

8787
for (const {level, main} of providers) {
88-
if (level >= providerLevels.pathRewrites) {
88+
if (level >= providerManager.levels.pathRewrites) {
8989
({filePatterns, ignoredByWatcherPatterns} = main.updateGlobs({filePatterns, ignoredByWatcherPatterns}));
9090
}
9191
}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"homepage": "https://avajs.dev",
88
"bin": "cli.js",
99
"engines": {
10-
"node": ">=10.18.0 <11 || >=12.14.0 <13 || >=13.5.0"
10+
"node": ">=10.18.0 <11 || >=12.14.0 <13 || >=13.5.0 <14 || >=14.0.0"
1111
},
1212
"scripts": {
1313
"test": "xo && tsd && nyc tap"
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
[?25l---tty-stream-chunk-separator
2+
3+
---tty-stream-chunk-separator
4+
* ---tty-stream-chunk-separator
5+
---tty-stream-chunk-separator
6+
* ✖ No tests found in ava-import-no-test-declaration.js---tty-stream-chunk-separator
7+
---tty-stream-chunk-separator
8+
* ✖ No tests found in no-ava-import.js, make sure to import "ava" at the top of your test file---tty-stream-chunk-separator
9+
---tty-stream-chunk-separator
10+
[?25h
11+
✖ No tests found in no-ava-import.js, make sure to import "ava" at the top of your test file
12+
✖ No tests found in ava-import-no-test-declaration.js
13+
✖ No tests found in import-and-use-test-member.js
14+
✖ No tests found in throws.js
15+
16+
2 uncaught exceptions
17+
18+
Uncaught exception in import-and-use-test-member.js
19+
20+
import-and-use-test-member.js:3
21+
22+
2:
23+
 3: test('pass', t => t.pass());
24+
4:
25+
26+
TypeError: test is not a function
27+
28+
› Object.<anonymous> (test-tap/fixture/report/edgecases/import-and-use-test-member.js:3:1)
29+
30+
31+
32+
Uncaught exception in throws.js
33+
34+
throws.js:1
35+
36+
 1: throw new Error('throws');
37+
2:
38+
39+
Error: throws
40+
41+
› Object.<anonymous> (test-tap/fixture/report/edgecases/throws.js:1:7)
42+
43+
---tty-stream-chunk-separator
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
[?25l---tty-stream-chunk-separator
2+
3+
---tty-stream-chunk-separator
4+
* ---tty-stream-chunk-separator
5+
---tty-stream-chunk-separator
6+
* a › fails
7+
8+
1 test failed---tty-stream-chunk-separator
9+
---tty-stream-chunk-separator
10+
[?25h
11+
1 test failed
12+
13+
a › fails
14+
15+
a.js:3
16+
17+
2:
18+
 3: test('fails', t => t.fail());
19+
4:
20+
21+
Test failed via `t.fail()`
22+
23+
› test-tap/fixture/report/failfast/a.js:3:22
24+
25+
26+
27+
`--fail-fast` is on. 1 test file was skipped.
28+
29+
---tty-stream-chunk-separator
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
[?25l---tty-stream-chunk-separator
2+
3+
---tty-stream-chunk-separator
4+
* ---tty-stream-chunk-separator
5+
---tty-stream-chunk-separator
6+
* a › fails
7+
8+
1 test failed---tty-stream-chunk-separator
9+
---tty-stream-chunk-separator
10+
[?25h
11+
1 test failed
12+
13+
a › fails
14+
15+
a.js:3
16+
17+
2:
18+
 3: test('fails', t => t.fail()); 
19+
4: test('passes', t => t.pass());
20+
21+
Test failed via `t.fail()`
22+
23+
› test-tap/fixture/report/failfast2/a.js:3:22
24+
25+
26+
27+
`--fail-fast` is on. At least 1 test was skipped, as well as 1 test file.
28+
29+
---tty-stream-chunk-separator
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
[?25l---tty-stream-chunk-separator
2+
3+
---tty-stream-chunk-separator
4+
* ---tty-stream-chunk-separator
5+
---tty-stream-chunk-separator
6+
* a › only
7+
8+
1 passed---tty-stream-chunk-separator
9+
---tty-stream-chunk-separator
10+
* b › passes
11+
12+
2 passed---tty-stream-chunk-separator
13+
---tty-stream-chunk-separator
14+
[?25h
15+
2 tests passed
16+
17+
---tty-stream-chunk-separator

0 commit comments

Comments
 (0)