Skip to content

Commit

Permalink
Node.js 14 compatibility
Browse files Browse the repository at this point in the history
* Fix circular dependency
* Add to CI matrix
* Update supported engines
* Add reporter logs
  • Loading branch information
zackschuster committed Apr 25, 2020
1 parent 59c227d commit 2e7c76b
Show file tree
Hide file tree
Showing 23 changed files with 1,643 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Expand Up @@ -15,7 +15,7 @@ jobs:
strategy:
fail-fast: false
matrix:
node-version: [^10.18.0, ^12.14.0, ^13.5.0]
node-version: [^10.18.0, ^12.14.0, ^13.5.0, ^14.0.0]
os: [ubuntu-latest, windows-latest]
steps:
- uses: actions/checkout@v1
Expand Down
4 changes: 2 additions & 2 deletions lib/globs.js
Expand Up @@ -4,7 +4,7 @@ const globby = require('globby');
const ignoreByDefault = require('ignore-by-default');
const picomatch = require('picomatch');
const slash = require('slash');
const {levels: providerLevels} = require('./provider-manager');
const providerManager = require('./provider-manager');

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

for (const {level, main} of providers) {
if (level >= providerLevels.pathRewrites) {
if (level >= providerManager.levels.pathRewrites) {
({filePatterns, ignoredByWatcherPatterns} = main.updateGlobs({filePatterns, ignoredByWatcherPatterns}));
}
}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -7,7 +7,7 @@
"homepage": "https://avajs.dev",
"bin": "cli.js",
"engines": {
"node": ">=10.18.0 <11 || >=12.14.0 <13 || >=13.5.0"
"node": ">=10.18.0 <11 || >=12.14.0 <13 || >=13.5.0 <14 || >=14.0.0"
},
"scripts": {
"test": "xo && tsd && nyc tap"
Expand Down
43 changes: 43 additions & 0 deletions test-tap/reporters/mini.edgecases.v14.log
@@ -0,0 +1,43 @@
[?25l---tty-stream-chunk-separator

---tty-stream-chunk-separator
* ---tty-stream-chunk-separator
---tty-stream-chunk-separator
* ✖ No tests found in ava-import-no-test-declaration.js---tty-stream-chunk-separator
---tty-stream-chunk-separator
* ✖ No tests found in no-ava-import.js, make sure to import "ava" at the top of your test file---tty-stream-chunk-separator
---tty-stream-chunk-separator
[?25h
✖ No tests found in no-ava-import.js, make sure to import "ava" at the top of your test file
✖ No tests found in ava-import-no-test-declaration.js
✖ No tests found in import-and-use-test-member.js
✖ No tests found in throws.js

2 uncaught exceptions

Uncaught exception in import-and-use-test-member.js

import-and-use-test-member.js:3

2:
 3: test('pass', t => t.pass());
4:

TypeError: test is not a function

› Object.<anonymous> (test-tap/fixture/report/edgecases/import-and-use-test-member.js:3:1)



Uncaught exception in throws.js

throws.js:1

 1: throw new Error('throws');
2:

Error: throws

› Object.<anonymous> (test-tap/fixture/report/edgecases/throws.js:1:7)

---tty-stream-chunk-separator
29 changes: 29 additions & 0 deletions test-tap/reporters/mini.failfast.v14.log
@@ -0,0 +1,29 @@
[?25l---tty-stream-chunk-separator

---tty-stream-chunk-separator
* ---tty-stream-chunk-separator
---tty-stream-chunk-separator
* a › fails

1 test failed---tty-stream-chunk-separator
---tty-stream-chunk-separator
[?25h
1 test failed

a › fails

a.js:3

2:
 3: test('fails', t => t.fail());
4:

Test failed via `t.fail()`

› test-tap/fixture/report/failfast/a.js:3:22



`--fail-fast` is on. 1 test file was skipped.

---tty-stream-chunk-separator
29 changes: 29 additions & 0 deletions test-tap/reporters/mini.failfast2.v14.log
@@ -0,0 +1,29 @@
[?25l---tty-stream-chunk-separator

---tty-stream-chunk-separator
* ---tty-stream-chunk-separator
---tty-stream-chunk-separator
* a › fails

1 test failed---tty-stream-chunk-separator
---tty-stream-chunk-separator
[?25h
1 test failed

a › fails

a.js:3

2:
 3: test('fails', t => t.fail()); 
4: test('passes', t => t.pass());

Test failed via `t.fail()`

› test-tap/fixture/report/failfast2/a.js:3:22



`--fail-fast` is on. At least 1 test was skipped, as well as 1 test file.

---tty-stream-chunk-separator
17 changes: 17 additions & 0 deletions test-tap/reporters/mini.only.v14.log
@@ -0,0 +1,17 @@
[?25l---tty-stream-chunk-separator

---tty-stream-chunk-separator
* ---tty-stream-chunk-separator
---tty-stream-chunk-separator
* a › only

1 passed---tty-stream-chunk-separator
---tty-stream-chunk-separator
* b › passes

2 passed---tty-stream-chunk-separator
---tty-stream-chunk-separator
[?25h
2 tests passed

---tty-stream-chunk-separator

0 comments on commit 2e7c76b

Please sign in to comment.