Skip to content

v1.0.0

Choose a tag to compare

@jodal jodal released this 01 Dec 22:05

Major release with backward-incompatible changes.

  • The prebuilt files at the GitHub release page now include a source map instead of an uncompressed version.

  • Backwards incompatible: The Mopidy class can no longer be instantiated without the new keyword.

    To upgrade existing code:

    // Change from this:
    const mopidy = Mopidy(...);
    // To this:
    const mopidy = new Mopidy(...);
  • Backwards incompatible: The API methods no longer support two different calling conventions. (Fixes: #10)

    To upgrade code using by-position-or-by-name, simply remove
    callingConvention from the settings object:

    // Change from this:
    const mopidy = new Mopidy({ callingConvention: "by-position-or-by-name" });
    // To this:
    const mopidy = new Mopidy();

    To upgrade code using the long deprecated, but still default, calling
    convention by-position-only multiple steps are required.

    1. The first step is to remove callingConvention from the settings object:

      // Change from this:
      const mopidy = new Mopidy({ callingConvention: "by-position-only" });
      // To this:
      const mopidy = new Mopidy();
    2. The second step is to update all API method calls to explicitly use positional arguments:

      // Change from this:
      mopidy.tracklist.setRepeat(true);
      // To this:
      mopidy.tracklist.setRepeat([true]);

      At this point, the application should work again.

    3. The final, and optional step, is to change API method calls to using objects instead of arrays where that makes the code clearer:

      // Optionally change from this:
      mopidy.library.search(["abba", null, true]);
      // To this:
      mopidy.library.search({ query: "abba", exact: true });