These CLs update the Gerrit Monitor code to use ES6 modules and classes, replacing boilerplate such as:
(function(namespace) {
if (namespace.foo)
return;
var foo = {};
namespace.foo = badge;
// Define a function.
foo.myFunction = function(...) { ... };
})(this);
with just:
export function myFunction(...) { ... };
Similarly, ES5-style class definitions are replaced with more direct class based syntax.
ES6 support for classes and modules have been supported since Chrome 61 (September 2017), so should be safe to use directly.
Patches should have no behavioural differences. These diffs are best viewed by fetching them a running git show -w on the result to see actual content changes.
It may be worth me changing the author of these CLs to something like formatting-changes to avoid git blame pointing to me for every line (though git blame -w can see through the changes better). Let me know, and I'll adjust.
These CLs update the Gerrit Monitor code to use ES6 modules and classes, replacing boilerplate such as:
with just:
Similarly, ES5-style class definitions are replaced with more direct
class
based syntax.ES6 support for classes and modules have been supported since Chrome 61 (September 2017), so should be safe to use directly.
Patches should have no behavioural differences. These diffs are best viewed by fetching them a running
git show -w
on the result to see actual content changes.It may be worth me changing the author of these CLs to something like
formatting-changes
to avoidgit blame
pointing to me for every line (thoughgit blame -w
can see through the changes better). Let me know, and I'll adjust.