Skip to content

Commit 21fc514

Browse files
release: v3.0.0
1 parent 7dce7e1 commit 21fc514

File tree

3 files changed

+34
-2
lines changed

3 files changed

+34
-2
lines changed

.travis/gh-pages.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ then
4444
git push upstream --tags
4545
echo "Tagged ${VERSION} on GitHub"
4646

47-
echo -e "$NPM_AUTH" > ~/.npmrc
47+
echo -e "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > ~/.npmrc
4848
npm publish
4949
echo "Published ${VERSION} to the npm registry"
5050
fi

README.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,38 @@ obs.send('GetVersion');
181181
obs.on('SwitchScenes');
182182
```
183183

184+
## Upgrading from 2.x to 3.x
185+
- The `es5` build is no longer provided. If you're in an environment which must run ES5-compatible code, continue using the latest 2.x release.
186+
- The Callback API has been separated from the Promise API. If you use callbacks in your `send` invocations, you will need to update them to use the new `sendCallback` method:
187+
188+
```js
189+
// No longer supported!
190+
obs.send('StartStreaming', (error) => {
191+
// Code here...
192+
});
193+
194+
// Use this instead:
195+
obs.sendCallback('StartStreaming', (error) => {
196+
// Code here...
197+
});
198+
```
199+
200+
- The `connect` method no longer accepts a callback. Use the promise it returns instead.
201+
202+
```js
203+
// No longer supported!
204+
obs.connect({address: 'localhost: 4444'}, (error) => {
205+
// Code here...
206+
});
207+
208+
// Use this instead:
209+
obs.connect({address: 'localhost: 4444'}).then(() => {
210+
console.log('connected');
211+
}).catch((error) => {
212+
console.error(error);
213+
});
214+
```
215+
184216
## Projects Using **obs-websocket-js**
185217
_To add your project to this list, submit a Pull Request._
186218
- [GamesDoneQuick/agdq17-layouts](https://github.com/GamesDoneQuick/agdq17-layouts)

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "obs-websocket-js",
3-
"version": "2.0.1",
3+
"version": "3.0.0",
44
"description": "OBS Websocket API in Javascript, consumes @Palakis/obs-websocket",
55
"author": "Brendan Hagan (haganbmj)",
66
"license": "MIT",

0 commit comments

Comments
 (0)