ava 6.4.1 → 7.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/concordance-options.js +2 -3
- package/lib/reporters/tap.js +5 -5
- package/package.json +39 -35
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import {inspect} from 'node:util';
|
|
1
|
+
import {inspect, stripVTControlCharacters} from 'node:util';
|
|
2
2
|
|
|
3
3
|
import ansiStyles from 'ansi-styles';
|
|
4
4
|
import {Chalk} from 'chalk'; // eslint-disable-line unicorn/import-style
|
|
5
|
-
import stripAnsi from 'strip-ansi';
|
|
6
5
|
|
|
7
6
|
import {chalk} from './chalk.js';
|
|
8
7
|
|
|
@@ -85,7 +84,7 @@ const colorTheme = {
|
|
|
85
84
|
undefined: ansiStyles.yellow,
|
|
86
85
|
};
|
|
87
86
|
|
|
88
|
-
const plainTheme = JSON.parse(JSON.stringify(colorTheme), (_name, value) => typeof value === 'string' ?
|
|
87
|
+
const plainTheme = JSON.parse(JSON.stringify(colorTheme), (_name, value) => typeof value === 'string' ? stripVTControlCharacters(value) : value);
|
|
89
88
|
|
|
90
89
|
const theme = chalk.level > 0 ? colorTheme : plainTheme;
|
|
91
90
|
|
package/lib/reporters/tap.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import os from 'node:os';
|
|
2
2
|
import path from 'node:path';
|
|
3
|
+
import {stripVTControlCharacters} from 'node:util';
|
|
3
4
|
|
|
4
5
|
import indentString from 'indent-string';
|
|
5
6
|
import plur from 'plur';
|
|
6
|
-
import stripAnsi from 'strip-ansi';
|
|
7
7
|
import * as supertap from 'supertap';
|
|
8
8
|
|
|
9
9
|
import prefixTitle from './prefix-title.js';
|
|
@@ -20,7 +20,7 @@ function dumpError({
|
|
|
20
20
|
if (type === 'unknown') {
|
|
21
21
|
return {
|
|
22
22
|
message: 'Non-native error',
|
|
23
|
-
formatted:
|
|
23
|
+
formatted: stripVTControlCharacters(formattedError),
|
|
24
24
|
};
|
|
25
25
|
}
|
|
26
26
|
|
|
@@ -33,8 +33,8 @@ function dumpError({
|
|
|
33
33
|
|
|
34
34
|
if (formattedDetails.length > 0) {
|
|
35
35
|
originalError.details = Object.fromEntries(formattedDetails.map(({label, formatted}) => [
|
|
36
|
-
|
|
37
|
-
|
|
36
|
+
stripVTControlCharacters(label),
|
|
37
|
+
stripVTControlCharacters(formatted),
|
|
38
38
|
]));
|
|
39
39
|
}
|
|
40
40
|
}
|
|
@@ -119,7 +119,7 @@ export default class TapReporter {
|
|
|
119
119
|
}
|
|
120
120
|
|
|
121
121
|
writeComment(evt, {title = this.prefixTitle(evt.testFile, evt.title)}) {
|
|
122
|
-
this.reportStream.write(`# ${
|
|
122
|
+
this.reportStream.write(`# ${stripVTControlCharacters(title)}${os.EOL}`);
|
|
123
123
|
if (evt.logs) {
|
|
124
124
|
for (const log of evt.logs) {
|
|
125
125
|
const logLines = indentString(log, 4).replaceAll(/^ {4}/gm, '# ');
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ava",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "7.0.0",
|
|
4
4
|
"description": "Node.js test runner that lets you develop with confidence.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
},
|
|
40
40
|
"type": "module",
|
|
41
41
|
"engines": {
|
|
42
|
-
"node": "^
|
|
42
|
+
"node": "^20.19 || ^22.20 || ^24.12 || >=25"
|
|
43
43
|
},
|
|
44
44
|
"scripts": {
|
|
45
45
|
"test": "./scripts/test.sh"
|
|
@@ -86,64 +86,68 @@
|
|
|
86
86
|
"typescript"
|
|
87
87
|
],
|
|
88
88
|
"dependencies": {
|
|
89
|
-
"@vercel/nft": "^
|
|
90
|
-
"acorn": "^8.
|
|
91
|
-
"acorn-walk": "^8.3.
|
|
92
|
-
"ansi-styles": "^6.2.
|
|
89
|
+
"@vercel/nft": "^1.3.2",
|
|
90
|
+
"acorn": "^8.16.0",
|
|
91
|
+
"acorn-walk": "^8.3.5",
|
|
92
|
+
"ansi-styles": "^6.2.3",
|
|
93
93
|
"arrgv": "^1.0.2",
|
|
94
94
|
"arrify": "^3.0.0",
|
|
95
95
|
"callsites": "^4.2.0",
|
|
96
|
-
"cbor": "^10.0.
|
|
97
|
-
"chalk": "^5.
|
|
96
|
+
"cbor": "^10.0.11",
|
|
97
|
+
"chalk": "^5.6.2",
|
|
98
98
|
"chunkd": "^2.0.1",
|
|
99
|
-
"ci-info": "^4.
|
|
99
|
+
"ci-info": "^4.4.0",
|
|
100
100
|
"ci-parallel-vars": "^1.0.1",
|
|
101
|
-
"cli-truncate": "^
|
|
101
|
+
"cli-truncate": "^5.1.1",
|
|
102
102
|
"code-excerpt": "^4.0.0",
|
|
103
103
|
"common-path-prefix": "^3.0.0",
|
|
104
104
|
"concordance": "^5.0.4",
|
|
105
105
|
"currently-unhandled": "^0.4.1",
|
|
106
|
-
"debug": "^4.4.
|
|
106
|
+
"debug": "^4.4.3",
|
|
107
107
|
"emittery": "^1.2.0",
|
|
108
108
|
"figures": "^6.1.0",
|
|
109
|
-
"globby": "^
|
|
109
|
+
"globby": "^16.1.1",
|
|
110
110
|
"ignore-by-default": "^2.1.0",
|
|
111
111
|
"indent-string": "^5.0.0",
|
|
112
112
|
"is-plain-object": "^5.0.0",
|
|
113
113
|
"is-promise": "^4.0.0",
|
|
114
|
-
"matcher": "^
|
|
115
|
-
"memoize": "^10.
|
|
114
|
+
"matcher": "^6.0.0",
|
|
115
|
+
"memoize": "^10.2.0",
|
|
116
116
|
"ms": "^2.1.3",
|
|
117
|
-
"p-map": "^7.0.
|
|
117
|
+
"p-map": "^7.0.4",
|
|
118
118
|
"package-config": "^5.0.0",
|
|
119
|
-
"picomatch": "^4.0.
|
|
120
|
-
"plur": "^
|
|
121
|
-
"pretty-ms": "^9.
|
|
119
|
+
"picomatch": "^4.0.3",
|
|
120
|
+
"plur": "^6.0.0",
|
|
121
|
+
"pretty-ms": "^9.3.0",
|
|
122
122
|
"resolve-cwd": "^3.0.0",
|
|
123
123
|
"stack-utils": "^2.0.6",
|
|
124
|
-
"strip-ansi": "^7.1.0",
|
|
125
124
|
"supertap": "^3.0.1",
|
|
126
125
|
"temp-dir": "^3.0.0",
|
|
127
|
-
"write-file-atomic": "^
|
|
128
|
-
"yargs": "^
|
|
126
|
+
"write-file-atomic": "^7.0.0",
|
|
127
|
+
"yargs": "^18.0.0"
|
|
129
128
|
},
|
|
130
129
|
"devDependencies": {
|
|
131
130
|
"@ava/test": "github:avajs/test",
|
|
132
131
|
"@ava/typescript": "^6.0.0",
|
|
133
|
-
"@sindresorhus/tsconfig": "^
|
|
134
|
-
"@types/node": "^
|
|
135
|
-
"ansi-escapes": "^7.
|
|
136
|
-
"c8": "^
|
|
137
|
-
"execa": "^9.6.
|
|
138
|
-
"expect": "^30.0
|
|
139
|
-
"sinon": "^21.0.
|
|
140
|
-
"tap": "^21.
|
|
141
|
-
"tempy": "^3.
|
|
142
|
-
"tsd": "^0.
|
|
143
|
-
"typescript": "~5.
|
|
144
|
-
"xo": "^1.
|
|
132
|
+
"@sindresorhus/tsconfig": "^8.1.0",
|
|
133
|
+
"@types/node": "^24.10.15",
|
|
134
|
+
"ansi-escapes": "^7.3.0",
|
|
135
|
+
"c8": "^11.0.0",
|
|
136
|
+
"execa": "^9.6.1",
|
|
137
|
+
"expect": "^30.2.0",
|
|
138
|
+
"sinon": "^21.0.1",
|
|
139
|
+
"tap": "^21.6.2",
|
|
140
|
+
"tempy": "^3.2.0",
|
|
141
|
+
"tsd": "^0.33.0",
|
|
142
|
+
"typescript": "~5.9.3",
|
|
143
|
+
"xo": "^1.2.3",
|
|
145
144
|
"zen-observable": "^0.10.0"
|
|
146
145
|
},
|
|
146
|
+
"overrides": {
|
|
147
|
+
"c8": {
|
|
148
|
+
"yargs": "^18.0.0"
|
|
149
|
+
}
|
|
150
|
+
},
|
|
147
151
|
"peerDependencies": {
|
|
148
152
|
"@ava/typescript": "*"
|
|
149
153
|
},
|
|
@@ -153,7 +157,7 @@
|
|
|
153
157
|
}
|
|
154
158
|
},
|
|
155
159
|
"volta": {
|
|
156
|
-
"node": "
|
|
157
|
-
"npm": "11.
|
|
160
|
+
"node": "24.14.0",
|
|
161
|
+
"npm": "11.11.0"
|
|
158
162
|
}
|
|
159
163
|
}
|