Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 482612

Summary: Update to Escope 3.6.0
Product: [ECD] Orion Reporter: Michael Rennie <Michael_Rennie>
Component: JS ToolsAssignee: Michael Rennie <Michael_Rennie>
Status: RESOLVED FIXED QA Contact:
Severity: enhancement    
Priority: P3 CC: curtis.windatt.public, Silenio_Quarti
Version: 11.0   
Target Milestone: 12.0   
Hardware: All   
OS: All   
Whiteboard:
Bug Depends on:    
Bug Blocks: 460728    
Attachments:
Description Flags
built 3.6.0 none

Description Michael Rennie CLA 2015-11-19 12:19:19 EST
We should update the the latest version to get the latest in ES6 scoping.

There will be a bit more work this time around as we have to convert the es6 module code in escope to AMD.
Comment 1 Michael Rennie CLA 2015-11-19 12:23:22 EST
CQ is here: https://dev.eclipse.org/ipzilla/show_bug.cgi?id=10405
Comment 2 Michael Rennie CLA 2016-03-31 11:22:20 EDT
I opened the CQ to just jump to EScope 3.6.0:

https://dev.eclipse.org/ipzilla/show_bug.cgi?id=11163
Comment 3 Michael Rennie CLA 2016-05-12 17:31:19 EDT
The CQ is approved - but 3.6.0 has other node dependencies that we need to remove.

Then we can build it using the webpack build file I placed in master.
Comment 4 Michael Rennie CLA 2016-05-12 17:36:58 EDT
The offending references are:

1. assert in referencer.js
2. es6-map and assert in scope.js
3. es6-weak-map and assert in scope-manager.js
Comment 5 Michael Rennie CLA 2016-05-12 17:52:48 EDT
Created attachment 261703 [details]
built 3.6.0

Here is a built version of 3.6.0 with the offending node deps removed.

We need to test this, because it is using the globally defined Map and WeakMap - which according to the compat tables, all of the browser now have (and have had for a while)
Comment 6 Michael Rennie CLA 2016-05-12 18:06:08 EDT
*** Bug 493587 has been marked as a duplicate of this bug. ***
Comment 7 Michael Rennie CLA 2016-05-12 18:07:33 EDT
(In reply to Michael Rennie from comment #5)
> Created attachment 261703 [details]
> built 3.6.0
> 
> Here is a built version of 3.6.0 with the offending node deps removed.
> 
> We need to test this, because it is using the globally defined Map and
> WeakMap - which according to the compat tables, all of the browser now have
> (and have had for a while)

I did find one issue - the new version of escope is throwy - meaning if you have an import statement and it is not in es6 + "module" mode it throws an exception causing eslint to not lint the rest of the file. 

My suggestion would be to just get rid of the throw statement from escope
Comment 8 Michael Rennie CLA 2016-05-16 16:21:27 EDT
Pushed the new version into master:

http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=f75161608e5f229b908d8f1b945005ab808eb817

Will leave this bug open until we test in new builds
Comment 9 Michael Rennie CLA 2016-05-17 15:05:14 EDT
Support looks good after additional testing in the new builds.

Closing fixed.