[14:26:49] [telegram] Hi all, is ES6 supported within mediawiki add-ons? I've been working on an addon but once I turned off debug mode and it began minifying my javascript code, I started seeing lots of syntax errors. [14:27:15] [telegram] I'm currently running mediawiki 1.33.0 [14:32:23] Also, that's an EOL version of MW [14:33:22] [telegram] did you write anything before that? (re @wmtelegram_bot: [irc] Also, that's an EOL version of MW) [14:33:42] No, a conversation split between two IRC channels [14:33:47] [telegram] (there is nothing between Mike's messages and this one on tg side) [14:33:57] [telegram] oh [14:34:35] [telegram] no, not even all of ES5 is supportedIIRC. see https://phabricator.wikimedia.org/T75714 (re @nolski: Hi all, is ES6 supported within mediawiki add-ons? I've been working on an addon but once I turned off debug mode and it began minifying my javascript code, I started seeing lots of syntax errors.) [14:35:15] [telegram] no, not even all of ES5 is supported IIRC. see https://phabricator.wikimedia.org/T75714 (re @nolski: Hi all, is ES6 supported within mediawiki add-ons? I've been working on an addon but once I turned off debug mode and it began minifying my javascript code, I started seeing lots of syntax errors.) [14:35:28] [telegram] yeah it sucks [14:35:42] Tell people to stop using old browsers to browse Wikipedia then ;P [14:36:22] [telegram] well, having wikipedia break might be a good push to start using new browsers :P [14:37:08] [telegram] I’m always tempted to go “only [small x]% of requests come from Internet Explorer, surely we can drop support by now” before realizing that the share of Firefox is barely any higher [14:37:46] [telegram] Major difference is that Firefox doesn't have nearly as many…quirks…as IE does (re @lucaswerkmeister: I’m always tempted to go “only [small x]% of requests come from Internet Explorer, surely we can drop support by now” before realizing that the share of Firefox is barely any higher) [14:37:55] [telegram] As Firefox chases to copy Chromium more and more I think in a few years we will only have Chromium [14:38:47] [telegram] (For instance the updated Firefox for Android sucks :( ) [14:39:07] [telegram] Well, in my experience the most bugs are coming from Safari nowadays … [14:39:42] [telegram] oh true [14:42:59] [telegram] I asked this question in matrix as well which may or not may be bridged. I found adding /*@nomin*/ at the top of my js file a great workaround for my use case (re @lucaswerkmeister: no, not even all of ES5 is supported IIRC. see T75714) [14:43:00] T75714: Allow ES6 syntax features in gadgets and other site-wide scripts - https://phabricator.wikimedia.org/T75714 [14:43:29] [telegram] well, yes, that will bypass ResourceLoader’s minification [14:49:30] [telegram] Oh, I didn't know there were directives like this [14:49:51] [telegram] But I guess in this case one should use minification of their own [15:08:44] [telegram] speaking of minification, is it possible to get common.js to include all the scripts it loads instead of needing separate requests for each one? [15:13:00] [telegram] (by which I mean scripts loaded using mw.loader.load) [15:13:45] [telegram] mw.loader.load’s https://doc.wikimedia.org/mediawiki-core/master/js/#!/api/mw.loader says it can take an array of sources [15:13:53] [telegram] so you could rewrite your common.js to that form [15:22:35] [telegram] and then it'll load them all as a single request? (probably answered by that link but I can't read it right now, I'm on my phone and it's helpfully being displayed ~1 word per line thanks to the sidebar -_-) [15:28:13] [telegram] I assume so (haven’t tried tbh) [15:30:40] [telegram] ah no, it looks like if you call it with an array then it needs to be a list of module names, not URLs [15:31:05] [telegram] ok, on second thought that does make sense, yeah [15:31:08] [telegram] aww, that would've been perfect