From b0ba3e1b577efdac8dc45bc63acc3fe67705e8ba Mon Sep 17 00:00:00 2001 From: Jan Pilzer Date: Wed, 25 Oct 2017 18:21:49 -0700 Subject: [PATCH] v1.4.1 JS experimentalObjectRestSpread --- CHANGELOG.md | 6 ++++++ package.json | 2 +- src/lexers/JSParser.js | 3 ++- test/JavaScriptSpec.js | 6 ++++++ test/example/javascript/103-objectSpread.js | 2 ++ 5 files changed, 17 insertions(+), 2 deletions(-) create mode 100644 test/example/javascript/103-objectSpread.js 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};