This Bugzilla instance is deprecated, and most Eclipse projects now use GitHub or Eclipse GitLab. Please see the deprecation plan for details.
Bug 482612 - Update to Escope 3.6.0
Summary: Update to Escope 3.6.0
Status: RESOLVED FIXED
Alias: None
Product: Orion (Archived)
Classification: ECD
Component: JS Tools (show other bugs)
Version: 11.0   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: 12.0   Edit
Assignee: Michael Rennie CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 493587 (view as bug list)
Depends on:
Blocks: 460728
  Show dependency tree
 
Reported: 2015-11-19 12:19 EST by Michael Rennie CLA
Modified: 2016-05-17 15:05 EDT (History)
2 users (show)

See Also:


Attachments
built 3.6.0 (88.66 KB, application/javascript)
2016-05-12 17:52 EDT, Michael Rennie CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
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.