Skip to content

Commit af2052c

Browse files
committed
feat: introduce @babel/helper-plugin-utils to ensure babel version
1 parent ed3a2fc commit af2052c

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

index.js

+5-2
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,10 @@
1010
*/
1111
'use strict';
1212

13-
module.exports = function (babel) {
13+
var declare = require('@babel/helper-plugin-utils').declare;
14+
15+
module.exports = declare(function (api, options, dirname) {
16+
api.assertVersion(7);
1417
return {
1518
visitor: {
1619
AssignmentExpression: {
@@ -51,7 +54,7 @@ module.exports = function (babel) {
5154
}
5255
}
5356
};
54-
};
57+
});
5558

5659
function replaceAssertIfMatch (node) {
5760
var target;

package.json

+1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
"bugs": "https://github.com/power-assert-js/babel-plugin-empower-assert/issues",
1111
"devDependencies": {
1212
"@babel/core": "^7.0.0",
13+
"@babel/helper-plugin-utils": "^7.0.0",
1314
"mocha": "^5.0.0",
1415
"xtend": "^4.0.1"
1516
},

0 commit comments

Comments
 (0)