gnome-shell/js/ui
Florian Müllner e8ee845e41 extensionSystem: Load extensions as modules
Continue the move to ESM by loading modules dynamically with
the standard import() expression, rather than by installing a
custom (legacy) importer.

This is a breaking change that affects all extensions, as they
now need to explicitly export the expected symbols.

As we are already breaking all extensions, take that opportunity
and remove support for the individual entry points: Using a
class with enable()/disable() methods has been the recommended
pattern for a long time, it is now the only entry point.

Instead of instantiating the class from an `init()` function,
the class must now be exported as default to be recognized.

Additionally, we no longer install an importer on the extension
object, so extensions that consist of more than one file MUST
import those files as modules now.

There will be a second breaking change for extensions when
gnome-shell's own code is ported to ESM, so most extension
developers will likely want to wait until the port is complete
before starting to port their extensions.

Based on a commit from Evan Welsh.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2795>
2023-07-06 18:41:29 +00:00
..
components js: Split gi imports to be on new lines to prepare for ES modules 2023-06-21 04:50:33 -07:00
status js: Fix linting errors from line shifts 2023-06-21 04:50:33 -07:00
accessDialog.js js: Fix linting errors from line shifts 2023-06-21 04:50:33 -07:00
altTab.js js: Split gi imports to be on new lines to prepare for ES modules 2023-06-21 04:50:33 -07:00
animation.js animations: Stop syncing size manually 2023-07-05 10:36:14 +00:00
appDisplay.js js: Fix linting errors from line shifts 2023-06-21 04:50:33 -07:00
appFavorites.js appFavorite: Add missing .desktop extension for simplescan 2023-03-29 21:51:04 +00:00
appMenu.js js: Split gi imports to be on new lines to prepare for ES modules 2023-06-21 04:50:33 -07:00
audioDeviceSelection.js js: Split gi imports to be on new lines to prepare for ES modules 2023-06-21 04:50:33 -07:00
background.js js: Split gi imports to be on new lines to prepare for ES modules 2023-06-21 04:50:33 -07:00
backgroundMenu.js js: Split gi imports to be on new lines to prepare for ES modules 2023-06-21 04:50:33 -07:00
barLevel.js js: Split gi imports to be on new lines to prepare for ES modules 2023-06-21 04:50:33 -07:00
boxpointer.js js: Split gi imports to be on new lines to prepare for ES modules 2023-06-21 04:50:33 -07:00
calendar.js js: Split gi imports to be on new lines to prepare for ES modules 2023-06-21 04:50:33 -07:00
checkBox.js js: Split gi imports to be on new lines to prepare for ES modules 2023-06-21 04:50:33 -07:00
closeDialog.js js: Split gi imports to be on new lines to prepare for ES modules 2023-06-21 04:50:33 -07:00
ctrlAltTab.js js: Split gi imports to be on new lines to prepare for ES modules 2023-06-21 04:50:33 -07:00
dash.js js: Split gi imports to be on new lines to prepare for ES modules 2023-06-21 04:50:33 -07:00
dateMenu.js js: Split gi imports to be on new lines to prepare for ES modules 2023-06-21 04:50:33 -07:00
dialog.js js: Split gi imports to be on new lines to prepare for ES modules 2023-06-21 04:50:33 -07:00
dnd.js js: Split gi imports to be on new lines to prepare for ES modules 2023-06-21 04:50:33 -07:00
edgeDragAction.js js: Split gi imports to be on new lines to prepare for ES modules 2023-06-21 04:50:33 -07:00
endSessionDialog.js js: Split gi imports to be on new lines to prepare for ES modules 2023-06-21 04:50:33 -07:00
environment.js js: Split gi imports to be on new lines to prepare for ES modules 2023-06-21 04:50:33 -07:00
extensionDownloader.js js: Split gi imports to be on new lines to prepare for ES modules 2023-06-21 04:50:33 -07:00
extensionSystem.js extensionSystem: Load extensions as modules 2023-07-06 18:41:29 +00:00
focusCaretTracker.js Adopt EventEmitter class instead of injecting Signal methods 2022-07-04 18:30:49 -04:00
grabHelper.js js: Split gi imports to be on new lines to prepare for ES modules 2023-06-21 04:50:33 -07:00
ibusCandidatePopup.js js: Split gi imports to be on new lines to prepare for ES modules 2023-06-21 04:50:33 -07:00
iconGrid.js js: Split gi imports to be on new lines to prepare for ES modules 2023-06-21 04:50:33 -07:00
inhibitShortcutsDialog.js js: Split gi imports to be on new lines to prepare for ES modules 2023-06-21 04:50:33 -07:00
init.js init: Move Meta main loop into JavaScript after GJS context is initialized 2023-06-07 19:23:27 +00:00
kbdA11yDialog.js js: Split gi imports to be on new lines to prepare for ES modules 2023-06-21 04:50:33 -07:00
keyboard.js js: Split gi imports to be on new lines to prepare for ES modules 2023-06-21 04:50:33 -07:00
layout.js js: Fix linting errors from line shifts 2023-06-21 04:50:33 -07:00
lightbox.js js: Split gi imports to be on new lines to prepare for ES modules 2023-06-21 04:50:33 -07:00
locatePointer.js js: Split gi imports to be on new lines to prepare for ES modules 2023-06-21 04:50:33 -07:00
lookingGlass.js js: Split gi imports to be on new lines to prepare for ES modules 2023-06-21 04:50:33 -07:00
magnifier.js js: Split gi imports to be on new lines to prepare for ES modules 2023-06-21 04:50:33 -07:00
main.js js: Split gi imports to be on new lines to prepare for ES modules 2023-06-21 04:50:33 -07:00
messageList.js js: Split gi imports to be on new lines to prepare for ES modules 2023-06-21 04:50:33 -07:00
messageTray.js js: Split gi imports to be on new lines to prepare for ES modules 2023-06-21 04:50:33 -07:00
modalDialog.js js: Split gi imports to be on new lines to prepare for ES modules 2023-06-21 04:50:33 -07:00
mpris.js js: Fix linting errors from line shifts 2023-06-21 04:50:33 -07:00
notificationDaemon.js js: Split gi imports to be on new lines to prepare for ES modules 2023-06-21 04:50:33 -07:00
osdMonitorLabeler.js js: Split gi imports to be on new lines to prepare for ES modules 2023-06-21 04:50:33 -07:00
osdWindow.js js: Split gi imports to be on new lines to prepare for ES modules 2023-06-21 04:50:33 -07:00
overview.js js: Split gi imports to be on new lines to prepare for ES modules 2023-06-21 04:50:33 -07:00
overviewControls.js js: Fix linting errors from line shifts 2023-06-21 04:50:33 -07:00
padOsd.js js: Fix linting errors from line shifts 2023-06-21 04:50:33 -07:00
pageIndicators.js js: Split gi imports to be on new lines to prepare for ES modules 2023-06-21 04:50:33 -07:00
panel.js windowManager: Add shortcut for toggling quick settings 2023-06-21 18:11:05 +00:00
panelMenu.js js: Split gi imports to be on new lines to prepare for ES modules 2023-06-21 04:50:33 -07:00
pointerA11yTimeout.js js: Split gi imports to be on new lines to prepare for ES modules 2023-06-21 04:50:33 -07:00
pointerWatcher.js js: Split gi imports to be on new lines to prepare for ES modules 2023-06-21 04:50:33 -07:00
popupMenu.js js: Fix linting errors from line shifts 2023-06-21 04:50:33 -07:00
quickSettings.js js: Split gi imports to be on new lines to prepare for ES modules 2023-06-21 04:50:33 -07:00
remoteSearch.js js: Split gi imports to be on new lines to prepare for ES modules 2023-06-21 04:50:33 -07:00
ripples.js js: Split gi imports to be on new lines to prepare for ES modules 2023-06-21 04:50:33 -07:00
runDialog.js js: Split gi imports to be on new lines to prepare for ES modules 2023-06-21 04:50:33 -07:00
screenShield.js js: Fix linting errors from line shifts 2023-06-21 04:50:33 -07:00
screenshot.js js: Fix linting errors from line shifts 2023-06-21 04:50:33 -07:00
scripting.js js: Split gi imports to be on new lines to prepare for ES modules 2023-06-21 04:50:33 -07:00
search.js js: Fix linting errors from line shifts 2023-06-21 04:50:33 -07:00
searchController.js js: Fix linting errors from line shifts 2023-06-21 04:50:33 -07:00
sessionMode.js main: Consider color-scheme setting for default stylesheet 2023-05-25 17:10:53 +02:00
shellDBus.js js: Split gi imports to be on new lines to prepare for ES modules 2023-06-21 04:50:33 -07:00
shellEntry.js js: Split gi imports to be on new lines to prepare for ES modules 2023-06-21 04:50:33 -07:00
shellMountOperation.js js: Fix linting errors from line shifts 2023-06-21 04:50:33 -07:00
slider.js js: Split gi imports to be on new lines to prepare for ES modules 2023-06-21 04:50:33 -07:00
swipeTracker.js js: Split gi imports to be on new lines to prepare for ES modules 2023-06-21 04:50:33 -07:00
switcherPopup.js js: Split gi imports to be on new lines to prepare for ES modules 2023-06-21 04:50:33 -07:00
switchMonitor.js js: Split gi imports to be on new lines to prepare for ES modules 2023-06-21 04:50:33 -07:00
unlockDialog.js js: Split gi imports to be on new lines to prepare for ES modules 2023-06-21 04:50:33 -07:00
userWidget.js js: Split gi imports to be on new lines to prepare for ES modules 2023-06-21 04:50:33 -07:00
welcomeDialog.js js: Split gi imports to be on new lines to prepare for ES modules 2023-06-21 04:50:33 -07:00
windowAttentionHandler.js js: Split gi imports to be on new lines to prepare for ES modules 2023-06-21 04:50:33 -07:00
windowManager.js windowManager: Add shortcut for toggling quick settings 2023-06-21 18:11:05 +00:00
windowMenu.js js: Fix linting errors from line shifts 2023-06-21 04:50:33 -07:00
windowPreview.js js: Split gi imports to be on new lines to prepare for ES modules 2023-06-21 04:50:33 -07:00
workspace.js js: Split gi imports to be on new lines to prepare for ES modules 2023-06-21 04:50:33 -07:00
workspaceAnimation.js js: Split gi imports to be on new lines to prepare for ES modules 2023-06-21 04:50:33 -07:00
workspacesView.js js: Split gi imports to be on new lines to prepare for ES modules 2023-06-21 04:50:33 -07:00
workspaceSwitcherPopup.js js: Split gi imports to be on new lines to prepare for ES modules 2023-06-21 04:50:33 -07:00
workspaceThumbnail.js js: Split gi imports to be on new lines to prepare for ES modules 2023-06-21 04:50:33 -07:00
xdndHandler.js js: Split gi imports to be on new lines to prepare for ES modules 2023-06-21 04:50:33 -07:00