[Pkg-javascript-commits] [acorn] 01/03: New upstream version 5.5.3+ds1
Julien Puydt
julien.puydt at laposte.net
Fri Mar 9 20:49:35 UTC 2018
This is an automated email from the git hooks/post-receive script.
jpuydt-guest pushed a commit to branch master
in repository acorn.
commit 73a44f318f8524b6e60ce35f17636bfb49bbcdcb
Author: Julien Puydt <julien.puydt at laposte.net>
Date: Fri Mar 9 07:02:00 2018 +0100
New upstream version 5.5.3+ds1
---
CHANGELOG.md | 28 +++++++++++++++++++++++++++-
package.json | 2 +-
src/index.js | 2 +-
src/tokenize.js | 7 ++++++-
src/walk/index.js | 6 ++++--
test/tests-harmony.js | 6 ++++--
6 files changed, 43 insertions(+), 8 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 0deb736..f9e5a4f 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,29 @@
+## 5.5.3 (2018-03-08)
+
+### Bug fixes
+
+A _second_ republish of the code in 5.5.1, this time with yarn, to hopefully get valid timestamps.
+
+## 5.5.2 (2018-03-08)
+
+### Bug fixes
+
+A republish of the code in 5.5.1 in an attempt to solve an issue with the file timestamps in the npm package being 0.
+
+## 5.5.2 (2018-03-08)
+
+### Bug fixes
+
+A republish of the code in 5.5.1 in an attempt to solve an issue with the file timestamps in the npm package being 0.
+
+## 5.5.1 (2018-03-06)
+
+### Bug fixes
+
+Fix regression in walker causing property values in object patterns to be walked as expressions.
+
+Fix misleading error message for octal escapes in template strings.
+
## 5.5.0 (2018-02-27)
### Bug fixes
@@ -8,7 +34,7 @@ Support object spread in the AST walker.
The identifier character categorization is now based on Unicode version 10.
-Acorn will not validate the content of regular expressions, including new ES9 features.
+Acorn will now validate the content of regular expressions, including new ES9 features.
## 5.4.1 (2018-02-02)
diff --git a/package.json b/package.json
index d57c317..6707778 100644
--- a/package.json
+++ b/package.json
@@ -4,7 +4,7 @@
"homepage": "https://github.com/acornjs/acorn",
"main": "dist/acorn.js",
"module": "dist/acorn.es.js",
- "version": "5.5.0",
+ "version": "5.5.3",
"engines": {
"node": ">=0.4.0"
},
diff --git a/src/index.js b/src/index.js
index 7dfb3aa..aaf664d 100644
--- a/src/index.js
+++ b/src/index.js
@@ -37,7 +37,7 @@ export {isIdentifierChar, isIdentifierStart} from "./identifier"
export {Token} from "./tokenize"
export {isNewLine, lineBreak, lineBreakG, nonASCIIwhitespace} from "./whitespace"
-export const version = "5.5.0"
+export const version = "5.5.3"
// The main exported interface (under `self.acorn` when in the
// browser) is a `parse` function that takes a code string and
diff --git a/src/tokenize.js b/src/tokenize.js
index 3dbaf67..3afb838 100644
--- a/src/tokenize.js
+++ b/src/tokenize.js
@@ -628,7 +628,12 @@ pp.readEscapedChar = function(inTemplate) {
this.pos += octalStr.length - 1
ch = this.input.charCodeAt(this.pos)
if ((octalStr !== "0" || ch == 56 || ch == 57) && (this.strict || inTemplate)) {
- this.invalidStringToken(this.pos - 1 - octalStr.length, "Octal literal in strict mode")
+ this.invalidStringToken(
+ this.pos - 1 - octalStr.length,
+ inTemplate
+ ? "Octal literal in template string"
+ : "Octal literal in strict mode"
+ )
}
return String.fromCharCode(octal)
}
diff --git a/src/walk/index.js b/src/walk/index.js
index 741eb48..f5a0fcb 100644
--- a/src/walk/index.js
+++ b/src/walk/index.js
@@ -292,8 +292,10 @@ base.ArrayPattern = (node, st, c) => {
}
}
base.ObjectPattern = (node, st, c) => {
- for (let prop of node.properties)
- c(prop, st, "Pattern")
+ for (let prop of node.properties) {
+ if (prop.computed) c(prop.key, st, "Expression")
+ c(prop.value, st, "Pattern")
+ }
}
base.Expression = skipThrough
diff --git a/test/tests-harmony.js b/test/tests-harmony.js
index 3f9b401..775106f 100644
--- a/test/tests-harmony.js
+++ b/test/tests-harmony.js
@@ -13281,7 +13281,7 @@ testFail("[...a, b] = c", "Comma is not permitted after the rest element (1:5)",
testFail("({ t(eval) { \"use strict\"; } });", "Binding eval in strict mode (1:5)", {ecmaVersion: 6});
-testFail("\"use strict\"; `${test}\\02`;", "Octal literal in strict mode (1:22)", {ecmaVersion: 6});
+testFail("\"use strict\"; `${test}\\02`;", "Octal literal in template string (1:22)", {ecmaVersion: 6});
testFail("if (1) import \"acorn\";", "'import' and 'export' may only appear at the top level (1:7)", {ecmaVersion: 6});
@@ -14591,7 +14591,9 @@ test("export default function foo() {} false", {
// https://github.com/acornjs/acorn/issues/274
-testFail("`\\07`", "Octal literal in strict mode (1:1)", {ecmaVersion: 6});
+testFail("`\\07`", "Octal literal in template string (1:1)", {ecmaVersion: 6});
+
+testFail("(function(){ 'use strict'; '\\07'; })", "Octal literal in strict mode (1:28)", {ecmaVersion: 6});
// https://github.com/acornjs/acorn/issues/277
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/acorn.git
More information about the Pkg-javascript-commits
mailing list