diff --git a/CHANGELOG.md b/CHANGELOG.md index 28a520a..56b48a9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,12 @@ All notable changes to this project will be documented in this file. This project tries to adhere to [Semantic Versioning](http://semver.org/). +## 1.4.1 - 2017-10-25 +### Fixed +- Support Python comments after function definitions (see [#99](https://github.com/Hirse/brackets-outline-list/issues/99)), thanks to [__@pelatx__](https://github.com/pelatx) +- Enable experimentalObjectRestSpread for JavaScript parsing (see [#103](https://github.com/Hirse/brackets-outline-list/issues/103)) + + ## 1.4.0 - 2017-08-25 ### Added - Support for Vue Component Files using HTML mode (see [#98](https://github.com/Hirse/brackets-outline-list/issues/98)) diff --git a/package.json b/package.json index 425c924..2406d53 100755 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "hirse.outline-list", - "version": "1.4.0", + "version": "1.4.1", "title": "Brackets Outline List", "description": "Displays a list of the functions or definitions in the currently opened document. Works with CSS, CoffeeScript, HTML, Haxe, Jade, JavaScript, JSX, LESS, Markdown, PHP, Python, Ruby, SCSS, SVG, Stylus, and XML.", "engines": { diff --git a/src/lexers/JSParser.js b/src/lexers/JSParser.js index 1970d26..a6a9cac 100644 --- a/src/lexers/JSParser.js +++ b/src/lexers/JSParser.js @@ -146,7 +146,8 @@ define(function JSParser(require, exports, module) { ecmaVersion: 8, sourceType: "module", ecmaFeatures: { - jsx: true + jsx: true, + experimentalObjectRestSpread: true } }); } catch (error) { diff --git a/test/JavaScriptSpec.js b/test/JavaScriptSpec.js index 188a56d..0259db5 100644 --- a/test/JavaScriptSpec.js +++ b/test/JavaScriptSpec.js @@ -256,5 +256,11 @@ define(function JavaScriptSpec(require) { } ]); }); + + it("103 - object rest/spread", function () { + var test = require("text!example/javascript/103-objectSpread.js"); + var result = Parser.parse(test); + expect(result).toEqual([]); + }); }); }); diff --git a/test/example/javascript/103-objectSpread.js b/test/example/javascript/103-objectSpread.js new file mode 100644 index 0000000..659a925 --- /dev/null +++ b/test/example/javascript/103-objectSpread.js @@ -0,0 +1,2 @@ +let obj1 = {foo : bar, bar : foo}; +let obj2 = {...obj1, toto : tata};