askmrsinh / touchpad-indicator

Touchpad management GNOME Shell Extension.
https://extensions.gnome.org/extension/131/touchpad-indicator/
GNU General Public License v2.0
83 stars 20 forks source link

ES6 Standard Warnings #35

Closed askmrsinh closed 4 years ago

askmrsinh commented 5 years ago
Apr 04 14:33:21 ubuntu gnome-shell[1827]: Some code accessed the property 'METHOD' on the module 'lib'. 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.
Apr 04 14:33:21 ubuntu gnome-shell[1827]: Some code accessed the property 'TRACKPOINTS' on the module 'lib'. 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.
Apr 04 14:33:21 ubuntu gnome-shell[1827]: Some code accessed the property 'SETTINGS_SCHEMA' on the module 'lib'. 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.
Apr 04 14:33:21 ubuntu gnome-shell[1827]: Some code accessed the property 'TOUCHPAD_SETTINGS_SCHEMA' on the module 'lib'. 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.
Apr 04 14:33:21 ubuntu gnome-shell[1827]: Some code accessed the property 'TOUCHPADS' on the module 'lib'. 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.
Apr 04 14:33:21 ubuntu gnome-shell[1827]: Some code accessed the property 'StoragePath' on the module 'lib'. 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.
Apr 04 14:33:21 ubuntu gnome-shell[1827]: Some code accessed the property 'FINGER_TOUCHES' on the module 'lib'. 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.
Apr 04 14:33:21 ubuntu gnome-shell[1827]: Some code accessed the property 'TOUCHSCREENS' on the module 'lib'. 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.
Apr 04 14:33:21 ubuntu gnome-shell[1827]: Some code accessed the property 'PENS' on the module 'lib'. 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.
Apr 04 14:33:21 ubuntu gnome-shell[1827]: Some code accessed the property 'OTHERS' on the module 'lib'. 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.

https://github.com/user501254/TouchpadIndicator/blob/6b9489d963137114d7122a390055f60eca987959/extension.js#L69-L87

Destroy666x commented 5 years ago

Are you going to fix this (and possibly other ES6 errors) in the near future so that this useful extension works on Ubuntu 19.04?

askmrsinh commented 5 years ago

Yes, I do intend to fix these (https://github.com/user501254/TouchpadIndicator/issues/35, https://github.com/user501254/TouchpadIndicator/issues/34) issues. The upstream changes provide a good opportunity for at least a partial rewrite of the extension while dropping support for older gnome-shell versions. I also want to adopt some good practices like linting and setting up build configuration for the project. I haven't yet started making the changes but hope to do so in the coming month.

~Until then, you can use the unstable-3.32 branch if you wish to.~ (these issues have been fixed, please use the master branch)

askmrsinh commented 5 years ago

@Destroy666x Please check if the current master works for you. Let me know in case of any issues.

mauriziopinotti commented 4 years ago

@user501254 I can confirm the latest code works on gnome-shell 3.32.

askmrsinh commented 4 years ago

@mauriziopinotti Thanks! There are still a couple of things that are stopping me from uploading the new version on the GNOME Shell Extensions website (eg: extension will crash if there are no detectable input devices). Once I have them sorted out, I will update with a new release.

Totoro83 commented 4 years ago

I'm totally new with gnome, so I don't know if I did something wrong, however I receive an error with the git version:

The settings of extension touchpad-indicator@orangeshirt had an error:

TypeError: comp[1] is undefined

Stack trace:

_listPointingDevices@/home/totoro/.local/share/gnome-shell/extensions/touchpad-indicator@orangeshirt/xinput.js:60:13
_init@/home/totoro/.local/share/gnome-shell/extensions/touchpad-indicator@orangeshirt/xinput.js:42:32
XInput@/home/totoro/.local/share/gnome-shell/extensions/touchpad-indicator@orangeshirt/xinput.js:37:9
TouchpadIndicatorSettings@/home/totoro/.local/share/gnome-shell/extensions/touchpad-indicator@orangeshirt/prefs.js:44:22
buildPrefsWidget@/home/totoro/.local/share/gnome-shell/extensions/touchpad-indicator@orangeshirt/prefs.js:239:20
_selectExtension@resource:///org/gnome/shell/extensionPrefs/main.js:75:22
_onCommandLine@resource:///org/gnome/shell/extensionPrefs/main.js:320:17
main@resource:///org/gnome/shell/extensionPrefs/main.js:635:5
@<main>:1:43
askmrsinh commented 4 years ago

@Totoro83 Can you please tell me the branch you are currently using? (it must be the master branch and not unstable-3.32). If you are already on the master branch, please share the output for the below commands:

  1. xinput --list
  2. egrep -i 'synap|alps|etps|elan' /proc/bus/input/devices
askmrsinh commented 4 years ago

Fixed under v33.