Dear friends,
Nuvola 4.8 & friends were released.
Announcement for users is in Medium blog as usually, more technical details for maintainers and packagers are here:
For script maintainers:
- Nuvola 4.8 introduced various asynchronous equivalents of synchronous JavaScript API functions. The main motivation is to stop blocking JavaScript event loop, which has unwanted side effect (such as lags or even dead locks of the WebKit WebProcess). The asynchronous (or async for short) functions are clearly documented in NuvolaKit API Reference (e.g. Actions.getStateAsync): "Asynchronous: This function returns a Promise object to resolve the value when it is ready. Read Using Promises to learn how to work with them." If you have any questions, don't hesitate to ask.
- List of async methods: Notifications.isPersistenceSupportedAsync, Actions.isEnabledAsync, Actions.getStateAsync, Core.getComponentInfoAsync, Core.isComponentLoadedAsync, Core.isComponentActiveAsync, KeyValueStorage.setDefaultAsync, KeyValueStorage.hasKeyAsync, KeyValueStorage.getAsync and KeyValueStorage.setAsync.
- The async functions are optional for now but the synchronous variants will be eventually removed.
- There is a new utility function - Nuvola.logException - to log exceptions to terminal:
actions.isEnabledAsync(...).then(...).catch(Nuvola.logException);
- JavaScript API reference now supports new annotations such as "Deprecated since", "Available since" and "asynchronous" function.
For packagers:
- Groove Music script requires Media Source Extension (MSE), which is not enabled in the default WebKitGTK configuration.
- Yandex Music script is currently orphaned and may be removed in the future unless a new maintainer is found.
Best regards,
Jiri Janousek
P.S. Full changelog follows:
Release 4.8
Nuvola 4.8 was released on September 29th, 2017.
New Features
- New script: Pocket Casts by Jiří Janoušek. Pocket Casts is the only podcatcher you’ll ever need. Listen to your favorite shows in one place, keep in sync progress across various devices, find great new content with curated featured podcasts, currently trending podcasts and much more. Now also with desktop integration provided by Nuvola.
- Updated script: Groove Music script 2.0 by Joel Cumberland works again in Nuvola after being ported to use Media Source Extension instead of Flash plugin.
- Updated script: Amazon Cloud Player script 5.5 by Andrew Stubbs integrates a track progress bar and volume controls.
- Updated script: Google Play Music script 6.0 by Jiří Janoušek uses new asynchronous API to improve responsiveness and reduce lags, but also drops support for Nuvola 4.7 and older.
Discontinued Features
- Spotify script is temporarily unsupported until Nuvola is ported to Chromium Embedded framework because Spotify dropped support for WebKit browsers (including Nuvola and Safari).
- Yandex Music script is currently orphaned and needs a new maintainer. The script is still shipped with Nuvola 4.8 but may be removed in the future unless somebody adopts it. If anyone is interested, please get in touch with me at Nuvola Devel mailing list.
News for Script Maintainers
- Asynchronous variants of various JavaScript API calls were introduced deprecating original synchronous methods. The async methods return a Promise object, which is used to resolve the result of the async operation.
- List of async methods: Notifications.isPersistenceSupportedAsync, Actions.isEnabledAsync, Actions.getStateAsync, Core.getComponentInfoAsync, Core.isComponentLoadedAsync, Core.isComponentActiveAsync, KeyValueStorage.setDefaultAsync, KeyValueStorage.hasKeyAsync, KeyValueStorage.getAsync and KeyValueStorage.setAsync.
- New function: Nuvola.logException to log exceptions to terminal.
- JavaScript API reference now supports new annotations such as "Deprecated since", "Available since" and "asynchronous" function.
Under the Hood
- Nuvola uses new IPC API from Diorite 4.8 and replaced a lot of synchronous IPC calls between WebWorker and AppRunner processes with asynchronous variants. This should improve the performance of the WebKit WebProcess, reduce lags and prevent occasional deadlocks. However, scripts must use the newly-introduced async JavaScript API to reach the full potential. Google Play Music is the first one.
Diorite 4.8.0
- Various IPC classes were refactored and united into new API (Rpc prefix) and it is possible to respond to IPC messages asynchronously.
- KeyValueStorage got async equivalents of non-void methods.