gnome-shell-extension-system-monitor icon indicating copy to clipboard operation
gnome-shell-extension-system-monitor copied to clipboard

Code refactoring: make the extension code ES6 compatible

Open elvetemedve opened this issue 7 years ago • 2 comments

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

elvetemedve avatar Sep 09 '17 16:09 elvetemedve

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.

genodeftest avatar Oct 26 '17 09:10 genodeftest

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.

elvetemedve avatar Oct 26 '17 11:10 elvetemedve