elvetemedve / gnome-shell-extension-system-monitor

Gnome Shell extension for displaying resource usage
GNU General Public License v3.0
87 stars 15 forks source link

Code refactoring: make the extension code ES6 compatible #37

Open elvetemedve opened 6 years ago

elvetemedve commented 6 years ago

GJS has made many changes to be ES6 compatible. The extension code should follow it and use the new syntax wherever it is possible.

GJS changes are presented here: https://speakerdeck.com/ptomato/modern-javascript-in-gnome

genodeftest commented 6 years ago

As an example, gnome-shell 3.26.1 prints many warnings like this one:

Some code accessed the property 'STORAGE_METER' on the module 'prefs_keys'. That property was defined with 'let' or 'const' inside the module. This was previously supported, but is not correct according to the ES6 standard. Any symbols to be exported from a module must be defined with 'var'. The property access will work as previously for the time being, but please fix your code anyway.
elvetemedve commented 6 years ago

Yep, I know it prints a bunch of warnings, but fortunately the extension seems to be working. I'll have more free time in November when I want to fix all of these.