From ee1d3eca310cab1b1cf1563294434977d26358d4 Mon Sep 17 00:00:00 2001 From: Milos Djermanovic Date: Wed, 8 Sep 2021 21:39:17 +0200 Subject: [PATCH] Fix: 0x2028 and 0x2029 in string literals should increment line number (#514) --- package.json | 2 +- .../10/json-superset/valid-2028.result.js | 20 +++++++++---------- .../10/json-superset/valid-2029.result.js | 20 +++++++++---------- .../6/newTarget/invalid-new-target.result.js | 2 +- 4 files changed, 22 insertions(+), 22 deletions(-) diff --git a/package.json b/package.json index 78d22862..4aad62f7 100644 --- a/package.json +++ b/package.json @@ -31,7 +31,7 @@ }, "license": "BSD-2-Clause", "dependencies": { - "acorn": "^8.4.1", + "acorn": "^8.5.0", "acorn-jsx": "^5.3.1", "eslint-visitor-keys": "^3.0.0" }, diff --git a/tests/fixtures/ecma-version/10/json-superset/valid-2028.result.js b/tests/fixtures/ecma-version/10/json-superset/valid-2028.result.js index 55b6b7e5..7f752bcc 100644 --- a/tests/fixtures/ecma-version/10/json-superset/valid-2028.result.js +++ b/tests/fixtures/ecma-version/10/json-superset/valid-2028.result.js @@ -6,8 +6,8 @@ export default { "column": 0 }, "end": { - "line": 1, - "column": 11 + "line": 2, + "column": 1 } }, "range": [ @@ -23,8 +23,8 @@ export default { "column": 0 }, "end": { - "line": 1, - "column": 11 + "line": 2, + "column": 1 } }, "range": [ @@ -40,8 +40,8 @@ export default { "column": 4 }, "end": { - "line": 1, - "column": 11 + "line": 2, + "column": 1 } }, "range": [ @@ -74,8 +74,8 @@ export default { "column": 8 }, "end": { - "line": 1, - "column": 11 + "line": 2, + "column": 1 } }, "range": [ @@ -155,8 +155,8 @@ export default { "column": 8 }, "end": { - "line": 1, - "column": 11 + "line": 2, + "column": 1 } }, "range": [ diff --git a/tests/fixtures/ecma-version/10/json-superset/valid-2029.result.js b/tests/fixtures/ecma-version/10/json-superset/valid-2029.result.js index a1fa3082..b1914062 100644 --- a/tests/fixtures/ecma-version/10/json-superset/valid-2029.result.js +++ b/tests/fixtures/ecma-version/10/json-superset/valid-2029.result.js @@ -6,8 +6,8 @@ export default { "column": 0 }, "end": { - "line": 1, - "column": 11 + "line": 2, + "column": 1 } }, "range": [ @@ -23,8 +23,8 @@ export default { "column": 0 }, "end": { - "line": 1, - "column": 11 + "line": 2, + "column": 1 } }, "range": [ @@ -40,8 +40,8 @@ export default { "column": 4 }, "end": { - "line": 1, - "column": 11 + "line": 2, + "column": 1 } }, "range": [ @@ -74,8 +74,8 @@ export default { "column": 8 }, "end": { - "line": 1, - "column": 11 + "line": 2, + "column": 1 } }, "range": [ @@ -155,8 +155,8 @@ export default { "column": 8 }, "end": { - "line": 1, - "column": 11 + "line": 2, + "column": 1 } }, "range": [ diff --git a/tests/fixtures/ecma-version/6/newTarget/invalid-new-target.result.js b/tests/fixtures/ecma-version/6/newTarget/invalid-new-target.result.js index 20ec1b9b..a1144dc9 100644 --- a/tests/fixtures/ecma-version/6/newTarget/invalid-new-target.result.js +++ b/tests/fixtures/ecma-version/6/newTarget/invalid-new-target.result.js @@ -2,5 +2,5 @@ export default { "index": 8, "lineNumber": 1, "column": 9, - "message": "'new.target' can only be used in functions" + "message": "'new.target' can only be used in functions and class static block" };