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.
(This is to consolidate every little, individual inquiry on ES6 request)
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
I also would like to know when this is going to happen.
Hi. Answering to your questions:
1) When we solve all issues listed here https://github.com/ariya/phantomjs/issues/14458
2) Yes. 2.5 will have full support for ES2015.
babel-polyfill seems to be crashing PhantomJS for me...has anyone else seen that happen?
2.5 beta release now supports ES2015! Give it a try! 馃檶
How do I install beta release?
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)?
@atesgoral current (and upcoming) 2.5 source code is in the master branch. Beta binaries are here
Hi, is there a timeline for 2.5 release?
@Vitallium I downloaded the 2.5 beta Windows exe and attempted a simple js file not transpiled with just a single import statement and I got "SyntaxError: Unexpected keyword 'import'" error. Seems like it doesn't support es6 yet.
@branpar ES6 modules are not enabled currently.
@Vitallium thanks for the quick response! Do we know when it might be enabled again?
import modules resolution is not part of the ES2015 spec. If you use a bundler such as webpack, systemjs or browserify you should be able to use ES2015 code without the pain of resolving imports from phantomJS.
@jtheoof that's not actually true. If you read the ECMAScript庐 2015 Language Specification you'll see that modules, import, and exportare all three in the spec.
I'm trying to avoid using a transpiler for this project because there are problems associated with using a transpiler when also using PhantomJS. And if native support is coming it isn't needed to transpile down to es5 anymore.
Most modern browsers have a wide range of support for es6 naively es6 Compatibility Table so really PhantomJS is lagging behind on this standard right now.
Mmm I disagree, the keywords are present but how they are resolved is not in the spec.
Section 15.2 of the ES2015 specification describes the syntax for the new import and export declarations, but does not specify how modules are to be loaded. This repository consolidates work on the ECMAScript module loading semantics with the integration points of Web browsers, as well as Node.js.
@branpar You'll notice the compat table doesn't include ES6 modules. They are not shipped by any browser nor Node at this point, as there are still issues to work out, so I would be surprised and impressed if PhantomJS was the first.
babel-polyfill seems to be crashing PhantomJS for me...has anyone else seen that happen?
@jedwards1211 did you fix this?
@hisapy I haven't tried with the latest PhantomJS recently...
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
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.
@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.
@arokhmistrov Whoops. Updated! Thank you.
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!
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.
@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).
@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.
Seems that it is now viable with the updated community QtWebKit.
From now on, please track #15342. Thank you!
Most helpful comment
2.5 beta release now supports ES2015! Give it a try! 馃檶