This repository has been archived by the owner. It is now read-only.

Support ES6/ES2015 Features #14506

Closed
ariya opened this Issue Aug 25, 2016 · 28 comments

Comments

Projects
None yet
@ariya
Copy link
Owner

ariya commented Aug 25, 2016

ES2015 (also colloquially known as ES6) will be possible with the new effort towards version 2.5 (see #14458 for details).

When building PhantomJS with the latest QtWebKit, PhantomJS will get all the latest JavaScriptCore support for ES2015. See the blog post ES6 Feature Complete for more details.

At that time, all examples should be also modernized to use the latest ES2015 syntax.

@ariya

This comment has been minimized.

Copy link
Owner Author

ariya commented Aug 25, 2016

(This is to consolidate every little, individual inquiry on ES6 request)

@nataljatamming

This comment has been minimized.

Copy link

nataljatamming commented Sep 27, 2016

Hi!

  1. When approximately do you plan release PhantomJS version 2.5( with ES6 support)?
  2. New PhantomJS version 2.5 will support 100% ES6?

Thanks in advance

@mgamsjager

This comment has been minimized.

Copy link

mgamsjager commented Oct 5, 2016

I also would like to know when this is going to happen.

@Vitallium

This comment has been minimized.

Copy link
Collaborator

Vitallium commented Oct 5, 2016

Hi. Answering to your questions:

  1. When we solve all issues listed here #14458
  2. Yes. 2.5 will have full support for ES2015.

Cortys added a commit to runnr/LokiJS that referenced this issue Oct 22, 2016

dropped support for "non-Promise" environments
Loki won't be tested against Node 0.10 anymore, since it is officially at its EOL. This is also necessary to move to a Promise based API.

Because PhantomJS currently does not support ES6, a Promise polyfill is used in the browser tests in the meantime (see ariya/phantomjs#14506).
@jedwards1211

This comment has been minimized.

Copy link

jedwards1211 commented Dec 14, 2016

babel-polyfill seems to be crashing PhantomJS for me...has anyone else seen that happen?

@Vitallium

This comment has been minimized.

Copy link
Collaborator

Vitallium commented Jan 11, 2017

2.5 beta release now supports ES2015! Give it a try! 🙌

@killerbytes

This comment has been minimized.

Copy link

killerbytes commented Mar 2, 2017

How do I install beta release?

@atesgoral

This comment has been minimized.

Copy link

atesgoral commented Mar 2, 2017

After spending around 30 minutes looking around (GitHub, Bitbucket, existing documentation) and even looking at the commit history (on master and 2.1 branches), I still don't know where the 2.5 beta source code is. Where is the latest and greatest (even if unstable) codebase for PhantomJS (for those of us who want to try building it ourselves)?

@hisapy

This comment has been minimized.

Copy link

hisapy commented Apr 10, 2017

babel-polyfill seems to be crashing PhantomJS for me...has anyone else seen that happen?
@jedwards1211 did you fix this?

@jedwards1211

This comment has been minimized.

Copy link

jedwards1211 commented Apr 10, 2017

@hisapy I haven't tried with the latest PhantomJS recently...

@hisapy

This comment has been minimized.

Copy link

hisapy commented Apr 11, 2017

I tried the latest beta version yesterday and couldn't make it work with Webpack, babel-polyfill, React. I had the following errors:

SyntheticEvent.augmentClass is not a function. (In 'SyntheticEvent.augmentClass(SyntheticCompositionEvent, CompositionEventInterface)', 'SyntheticEvent.augmentClass' is undefined)
TypeError: __WEBPACK_IMPORTED_MODULE_6_react_dom___default.a.render is not a function. (In '__WEBPACK_IMPORTED_MODULE_6_react_dom___default.a.render(__WEBPACK_IMPORTED_MODULE_5_react___default.a.createElement(Application, null), document.getElementById('react-root'))', '__WEBPACK_IMPORTED_MODULE_6_react_dom___default.a.render' is undefined)

PhantomJS 2.1.1 is working fine with babel-polyfill but it doesn't support flexbox. Anyways I managed to implement a hack for it using postcss-loader and autoprefixer plugin

@shellscape

This comment has been minimized.

Copy link

shellscape commented Apr 25, 2017

Would someone with the project be able to release the 2.5 beta on npm under a next or beta tag? Tried the binary directly and ended up with dyld: Library not loaded: /usr/local/opt/webp/lib/libwebp.6.dylib.

@arokhmistrov

This comment has been minimized.

Copy link

arokhmistrov commented May 25, 2017

@Vitallium Binaries of the latest beta version for windows (phantomjs-2.5.0-beta-windows.zip) does not follow naming conversion for executable path as in previous versions.
It's now
phantomjs-2.5.0.beta-windows\bin\phantomjs.exe
instead of
phantomjs-2.5.0-beta-windows\bin\phantomjs.exe

It breaks phantomjs-maven-plugin, which uses this template phantomjs-{version}-{classifier}/bin/phantomjs.exe for the path.

For linux it's ok.

@Vitallium

This comment has been minimized.

Copy link
Collaborator

Vitallium commented May 25, 2017

@arokhmistrov Whoops. Updated! Thank you.

@Bard182

This comment has been minimized.

Copy link

Bard182 commented May 31, 2017

Any plans to create a ruby gem for the 2.5 beta? Super eager to experiment with it in a ruby project, but not having any luck implementing the downloads. Thanks!

@arantius

This comment has been minimized.

Copy link

arantius commented Jun 22, 2017

I'm on trusty:

$ grep DISTRIB /etc/lsb-release
DISTRIB_CODENAME=trusty
DISTRIB_DESCRIPTION="Ubuntu 14.04.1 LTS"
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=14.04

I downloaded phantomjs-2.5.0-beta-linux-ubuntu-trusty-x86_64.tar.gz and extracted it, I get:

$ ./phantomjs-2.5.0-beta-ubuntu-trusty/bin/phantomjs 
./phantomjs-2.5.0-beta-ubuntu-trusty/bin/phantomjs: /usr/lib/x86_64-linux-gnu/libstdc++.so.6: version `CXXABI_1.3.8' not found (required by ./phantomjs-2.5.0-beta-ubuntu-trusty/bin/phantomjs)
./phantomjs-2.5.0-beta-ubuntu-trusty/bin/phantomjs: /usr/lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.21' not found (required by ./phantomjs-2.5.0-beta-ubuntu-trusty/bin/phantomjs)
./phantomjs-2.5.0-beta-ubuntu-trusty/bin/phantomjs: /usr/lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.20' not found (required by ./phantomjs-2.5.0-beta-ubuntu-trusty/bin/phantomjs)
./phantomjs-2.5.0-beta-ubuntu-trusty/bin/phantomjs: /usr/lib/x86_64-linux-gnu/libstdc++.so.6: version `CXXABI_1.3.9' not found (required by ./phantomjs-2.5.0-beta-ubuntu-trusty/bin/phantomjs)

Looks like, I think, it wants gcc 4.9 but only up to 4.8 is available. I can't use PPAs, which seems to be the way the internet suggests getting gcc 4.9 on trusty.

@Vitallium

This comment has been minimized.

Copy link
Collaborator

Vitallium commented Jun 22, 2017

@arantius yes, we follow Webkit plans to drop old compilers (like GCC 4.8 or MSVC2015). Modern WebKit requires compilers with C++11 and C++14 support (most of them).

@ashawley

This comment has been minimized.

Copy link

ashawley commented Jul 3, 2017

@Bard182 For Ruby gems of 2.5, try building the branch at colszowka/phantomjs-gem#97.

The gem needs testing on Windows, so it would be useful to have someone verify it works.

jupe added a commit to OpenTMI/opentmi-jsclient that referenced this issue Oct 17, 2017

jupe added a commit to OpenTMI/opentmi-jsclient that referenced this issue Oct 17, 2017

Fix browser test in CI (#10)
* replace phantomjs with headless_chrome

phantomjs doesn't support es6 (ariya/phantomjs#14506)

afeld added a commit to afeld/jsonp that referenced this issue Dec 15, 2017

convert client test to not use ES6
...for compatibility with PhantomJS.

ariya/phantomjs#14506

@ghost ghost removed this from the Release 2.5 milestone Jan 10, 2018

@ghost ghost removed the Fixed in dev label Jan 10, 2018

@ariya

This comment has been minimized.

Copy link
Owner Author

ariya commented Mar 3, 2018

Seems that it is now viable with the updated community QtWebKit.
From now on, please track #15342. Thank you!

@ariya ariya closed this Mar 3, 2018

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.