Skip to content

Commit 70d6cd1

Browse files
committed
Test for node 4 compatibility
1 parent 1fa7d82 commit 70d6cd1

7 files changed

Lines changed: 11 additions & 5 deletions

File tree

.babelrc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"presets": ["es2015"]
3+
}

.travis.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
language: node_js
22
node_js:
3+
- "4"
34
- "6"
5+
- "8"
46

57
cache:
68
yarn: true

README.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,6 @@ So it is likely that you will have to manually migrate some usages this tool can
1313

1414
## Usage
1515

16-
**This package requires Node 6 or later. Make sure you are using a newer version
17-
of Node before installing and running this package.**
18-
1916
**WARNING**: `jscodeshift`, and thus this codemod, **edits your files in place**.
2017
It does not make a copy. Make sure your code is checked into a source control
2118
repository like Git and that you have no outstanding changes to commit before

bin/ember-test-helpers-codemod.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#!/usr/bin/env node
2+
'use strict';
23

34
const execa = require("execa");
45
const chalk = require("chalk");

lib/transforms/acceptance/tail-eq.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ const sizzleFunctions = [ 'find', 'click', 'fillIn' ];
1212
function isAnEqExpression(j, node) {
1313
return j.CallExpression.check(node)
1414
&& j.Identifier.check(node.callee)
15-
&& sizzleFunctions.includes(node.callee.name)
15+
&& sizzleFunctions.indexOf(node.callee.name) !== -1
1616
&& j.Literal.check(node.arguments[0])
1717
&& typeof node.arguments[0].value === 'string'
1818
&& /:eq\(\d+\)$/.test(node.arguments[0].value)

lib/transforms/integration/trigger-shortcut.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ function isJQueryExpression(j, path) {
2727
&& j.MemberExpression.check(node.callee)
2828
&& isJQuerySelectExpression(j, node.callee.object, path)
2929
&& j.Identifier.check(node.callee.property)
30-
&& triggerShortcuts.includes(node.callee.property.name);
30+
&& triggerShortcuts.indexOf(node.callee.property.name) !== -1;
3131
}
3232

3333
/**

package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,8 @@
1818
"devDependencies": {
1919
"jest": "^21.2.1",
2020
"temp": "^0.8.3"
21+
},
22+
"engines": {
23+
"node": ">= 4"
2124
}
2225
}

0 commit comments

Comments
 (0)