Skip to content

Commit

Permalink
Breaking: require Node.js 6+, upgrade acorn-jsx@4.1.1 (fixes #345) (#371
Browse files Browse the repository at this point in the history
)

* Breaking: upgrade acorn-jsx@4.1.1 (fixes #345)

* Fix: Literal => JSXText

* fix regex value

* fix regex value (+1 squashed commit)
Squashed commits:
[46261f6] fix regexp on node 9

* Build: add node 8, 9

* Breaking: drop supporting node 4.

* require node>6.0.0

* remove node 4, 5

* use conditionalRegex

* fix misspelling
  • Loading branch information
aladdin-add authored and not-an-aardvark committed Mar 23, 2018
1 parent 0252144 commit 0df063f
Show file tree
Hide file tree
Showing 15 changed files with 38 additions and 35 deletions.
6 changes: 2 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
language: node_js
sudo: false
node_js:
- "0.10"
- "0.12"
- 4
- 5
- 6
- 7
- 8
- 9
after_success:
- npm run coveralls
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"espree.js"
],
"engines": {
"node": ">=0.10.0"
"node": ">=6.0.0"
},
"repository": "eslint/espree",
"bugs": {
Expand All @@ -19,7 +19,7 @@
"license": "BSD-2-Clause",
"dependencies": {
"acorn": "^5.5.1",
"acorn-jsx": "^3.0.0"
"acorn-jsx": "^4.1.1"
},
"devDependencies": {
"browserify": "^7.0.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ module.exports = {
"children": []
},
{
"type": "Literal",
"type": "JSXText",
"loc": {
"start": {
"line": 1,
Expand Down
2 changes: 1 addition & 1 deletion tests/fixtures/ecma-features/jsx/embedded-tags.result.js
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ module.exports = {
},
"children": [
{
"type": "Literal",
"type": "JSXText",
"loc": {
"start": {
"line": 1,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ module.exports = {
},
"children": [
{
"type": "Literal",
"type": "JSXText",
"loc": {
"start": {
"line": 1,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ module.exports = {
},
"children": [
{
"type": "Literal",
"type": "JSXText",
"loc": {
"start": {
"line": 1,
Expand Down Expand Up @@ -265,7 +265,7 @@ module.exports = {
}
},
{
"type": "Literal",
"type": "JSXText",
"loc": {
"start": {
"line": 1,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -445,7 +445,7 @@ module.exports = {
},
"children": [
{
"type": "Literal",
"type": "JSXText",
"loc": {
"start": {
"line": 6,
Expand Down Expand Up @@ -727,7 +727,7 @@ module.exports = {
"children": []
},
{
"type": "Literal",
"type": "JSXText",
"loc": {
"start": {
"line": 7,
Expand Down Expand Up @@ -1009,7 +1009,7 @@ module.exports = {
"children": []
},
{
"type": "Literal",
"type": "JSXText",
"loc": {
"start": {
"line": 8,
Expand Down
2 changes: 1 addition & 1 deletion tests/fixtures/ecma-features/jsx/test-content.result.js
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ module.exports = {
},
"children": [
{
"type": "Literal",
"type": "JSXText",
"loc": {
"start": {
"line": 1,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
var conditionalRegex = require("../../../../lib/conditional-regex-value");
const conditionalRegex = require("../../../../lib/conditional-regex-value");

module.exports = {
"type": "Program",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
var conditionalRegex = require("../../../../lib/conditional-regex-value");
const conditionalRegex = require("../../../../lib/conditional-regex-value");

module.exports = {
"type": "Program",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
const conditionalRegex = require("../../../../lib/conditional-regex-value");

module.exports = {
"type": "Program",
"loc": {
Expand Down Expand Up @@ -31,7 +33,7 @@ module.exports = {
0,
8
],
"expression": {
"expression": conditionalRegex({
"type": "Literal",
"loc": {
"start": {
Expand All @@ -47,13 +49,12 @@ module.exports = {
0,
8
],
"value": null,
"raw": "/(?<!a)/",
"regex": {
"pattern": "(?<!a)",
"flags": ""
}
}
})
}
],
"sourceType": "script",
Expand Down Expand Up @@ -81,4 +82,4 @@ module.exports = {
}
}
]
};
};
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
const conditionalRegex = require("../../../../lib/conditional-regex-value");

module.exports = {
"type": "Program",
"loc": {
Expand Down Expand Up @@ -31,7 +33,7 @@ module.exports = {
0,
9
],
"expression": {
"expression": conditionalRegex({
"type": "Literal",
"loc": {
"start": {
Expand All @@ -47,13 +49,12 @@ module.exports = {
0,
9
],
"value": null,
"raw": "/(?<!a)/u",
"regex": {
"pattern": "(?<!a)",
"flags": "u"
}
}
})
}
],
"sourceType": "script",
Expand Down Expand Up @@ -81,4 +82,4 @@ module.exports = {
}
}
]
};
};
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
const conditionalRegex = require("../../../../lib/conditional-regex-value");

module.exports = {
"type": "Program",
"loc": {
Expand Down Expand Up @@ -31,7 +33,7 @@ module.exports = {
0,
8
],
"expression": {
"expression": conditionalRegex({
"type": "Literal",
"loc": {
"start": {
Expand All @@ -47,13 +49,12 @@ module.exports = {
0,
8
],
"value": null,
"raw": "/(?<=a)/",
"regex": {
"pattern": "(?<=a)",
"flags": ""
}
}
})
}
],
"sourceType": "script",
Expand Down Expand Up @@ -81,4 +82,4 @@ module.exports = {
}
}
]
};
};
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
const conditionalRegex = require("../../../../lib/conditional-regex-value");

module.exports = {
"type": "Program",
"loc": {
Expand Down Expand Up @@ -31,7 +33,7 @@ module.exports = {
0,
9
],
"expression": {
"expression": conditionalRegex({
"type": "Literal",
"loc": {
"start": {
Expand All @@ -47,13 +49,12 @@ module.exports = {
0,
9
],
"value": null,
"raw": "/(?<=a)/u",
"regex": {
"pattern": "(?<=a)",
"flags": "u"
}
}
})
}
],
"sourceType": "script",
Expand Down
7 changes: 4 additions & 3 deletions tests/fixtures/ecma-version/9/regexp-s-flag/s-flag.result.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
const conditionalRegex = require("../../../../lib/conditional-regex-value");

module.exports = {
"type": "Program",
"loc": {
Expand Down Expand Up @@ -31,7 +33,7 @@ module.exports = {
0,
4
],
"expression": {
"expression": conditionalRegex({
"type": "Literal",
"loc": {
"start": {
Expand All @@ -47,13 +49,12 @@ module.exports = {
0,
4
],
"value": null,
"raw": "/./s",
"regex": {
"pattern": ".",
"flags": "s"
}
}
})
}
],
"sourceType": "script",
Expand Down

0 comments on commit 0df063f

Please sign in to comment.