storyboard v2.0.0 Release Notes

Release Date: 2016-07-18 // almost 8 years ago
  • 💥 Breaking changes

    • 0️⃣ No listeners are installed by default. The default behaviour in v1 was to automatically install some listeners, depending on whether Storyboard ran on the server or the client and the development/production mode. This was very convenient out of the box, but made it harder to customize the configuration in certain setups. If you need the old default behaviour, use this (note that for conditionally bundling listeners we recommend sticking to require for the time being):

      import { addListener } from 'storyboard';
      
      // Server
      import consoleListener from 'storyboard/lib/listeners/console';
      addListener(consoleListener);
      
      // Client
      if (process.env.NODE_ENV !== 'production') {
          addListener(require('storyboard/lib/listeners/console').default);
          addListener(require('storyboard/lib/listeners/browserExtension').default);
          addListener(require('storyboard/lib/listeners/wsClient').default);
      }
      
    • Listeners have been migrated to ES6. Notice above the different way to use them, depending on whether you import them (ES6 module) or require them (CommonJS):

      // ES6 module
      import fileListener from 'storyboard/lib/listeners/file';
      addListener(fileListener);
      
      // CommonJS module
      const fileListener = require('storyboard/lib/listeners/file').default;
      addListener(fileListener);
      
    • 🔊 The Console listener no longer uses stderr on Node, to avoid out-of-order logs (see this link for some background); it now uses stdout for all log levels. If you want the old behaviour, configure it with useStderr: true. On the browser, console.error() is used as before.

    Other changes

    • Add a command-line interface (CLI) tool to use Storyboard on unmodified applications/modules (i.e. without requiring the use of the library). This tool wraps the application and allows redirecting the logs to a file, the console and/or the web (using the WebSocket Server listener). In principle, this makes any application compatible with the Storyboard DevTools. More details here.
    • Library:
      • [M] Implement a refined listener architecture, affecting in particular the client side. These changes should be transparent to the user. The WsClient listener no longer interfaces directly with the browser extension, but rather relays its messages via the hub. The BrowserExtension listener has been merged with the interfaceExtension helper, since no other module can have access to this interface any more. This architecture is more flexible and will allow other uses of the library, e.g. using the WsClient listener in a non-browser application to obtain logs from another process and offload database access or file storage.
      • [M] WebSocket Server and Client can now estimate their clock differences, so that timestamps correspond to (approximately) the client's system clock. This functionality is disabled by default, but can be opted in by setting clockSync: true in the WebSocket Client configuration.
      • [M] Add Postgres database listener: stores logs to a PostgreSQL database, including attachments.
      • [M] Add file listener: stores all logs to a file, with or without ANSI color escapes (disabled by default).
      • [M] Better attachment serialization. undefined values will no longer disappear from your attachments when they traverse the WebSocket interface between the WsServer and WsClient plugins.
      • [m] Improve graceful exits, tearing down all listeners if possible. Previously, we only closed the main story.
    • 💻 Browser extension:
      • [m] Settings: show version.
      • Bugfix: Settings: Fix hysteresis tooltip.
    • Internal:
      • Ongoing migration from CoffeeScript to JS.