Skip to content

Commit 52e36e1

Browse files
committed
Port to an ES6 class
Using Prettier for formatting.
1 parent 4129726 commit 52e36e1

File tree

3 files changed

+272
-271
lines changed

3 files changed

+272
-271
lines changed

README.md

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,38 +9,34 @@ frontend or from npm. The library makes Mopidy's core API available from the
99
browser or a Node.js environment, using JSON-RPC messages over a WebSocket to
1010
communicate with Mopidy.
1111

12-
1312
## Getting it for browser use
1413

1514
Regular and minified versions of Mopidy.js, ready for use, is available from
1615
the project's
1716
[GitHub release page](https://github.com/mopidy/mopidy.js/releases).
1817

19-
2018
## Getting it for Node.js use
2119

2220
If you want to use Mopidy.js from Node.js instead of a browser, you can install
2321
Mopidy.js using npm:
2422

2523
npm install mopidy
2624

27-
After npm completes, you can import Mopidy.js using ``require()``:
25+
After npm completes, you can import Mopidy.js using `require()`:
2826

2927
var Mopidy = require("mopidy");
3028

31-
3229
## Using the library
3330

3431
See the [Mopidy.js documentation](https://docs.mopidy.com/en/latest/api/js/).
3532

36-
3733
## Building from source
3834

39-
1. Install [Node.js](https://nodejs.org/) and npm. If you're running Ubuntu:
35+
1. Install [Node.js](https://nodejs.org/) and npm. If you're running Ubuntu:
4036

4137
sudo apt-get install nodejs-legacy npm
4238

43-
2. Enter the source directory, and install all dependencies:
39+
2. Enter the source directory, and install all dependencies:
4440

4541
npm install
4642

@@ -64,9 +60,22 @@ To run other [grunt](https://gruntjs.com/) targets which isn't predefined in
6460

6561
PATH=./node_modules/.bin:$PATH grunt foo
6662

67-
6863
## Changelog
6964

65+
### 1.0.0 (UNRELEASED)
66+
67+
- **Backwards incompatible:** The `Mopidy` class can no longer be instantiated
68+
without the `new` keyword.
69+
70+
Example of how to upgrade existing code:
71+
72+
```js
73+
// Change from this:
74+
const mopidy = Mopidy(...);
75+
// To this:
76+
const Mopidy = new Mopidy(...);
77+
```
78+
7079
### 0.5.0 (2015-01-31)
7180

7281
- Reexport When.js library as `Mopidy.when`, to make it easily available to

__tests__/mopidy.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ describe("constructor", () => {
9090
expect(warn).not.toBeCalled();
9191
});
9292

93-
test("works without 'new' keyword", () => {
93+
test.skip("works without 'new' keyword", () => {
9494
const mopidy = Mopidy({
9595
callingConvention: "by-position-or-by-name",
9696
});

0 commit comments

Comments
 (0)