Skip to content

Commit 465aef2

Browse files
committed
Update Babel protocol
1 parent bd5c05f commit 465aef2

File tree

3 files changed

+10
-43
lines changed

3 files changed

+10
-43
lines changed

lib/babel-manager.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ module.exports = ({projectDir}) => {
77

88
let fatal;
99
const provider = makeProvider({
10-
negotiateProtocol(identifiers) {
11-
// TODO: Settle on a identifier before releasing AVA@3; fix error message.
12-
if (!identifiers.includes('1')) {
13-
fatal = new Error('TODO: Throw error when @ava/babel does not negotiate the expected protocol');
10+
negotiateProtocol(identifiers, {version}) {
11+
// TODO: Remove `-pre` before releasing AVA@3.
12+
if (!identifiers.includes('ava-3-pre')) {
13+
fatal = new Error(`This version of AVA (${ava.version}) is not compatible with@ava/babel@${version}`);
1414
return null;
1515
}
1616

@@ -19,7 +19,7 @@ module.exports = ({projectDir}) => {
1919
async findFiles({extensions, patterns}) {
2020
return globs.findFiles({cwd: projectDir, extensions, filePatterns: patterns});
2121
},
22-
identifier: '1',
22+
identifier: 'ava-3-pre',
2323
normalizeGlobPatterns: globs.normalizePatterns,
2424
projectDir
2525
};

package-lock.json

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

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@
111111
"yargs": "^15.1.0"
112112
},
113113
"devDependencies": {
114-
"@ava/babel": "^0.4.0",
114+
"@ava/babel": "^0.5.0",
115115
"@types/node": "^10.17.13",
116116
"delay": "^4.3.0",
117117
"esm": "^3.2.25",

0 commit comments

Comments
 (0)