Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

opentok

Package Overview
Dependencies
Maintainers
3
Versions
54
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

opentok - npm Package Compare versions

Comparing version 2.2.0 to 2.2.1

21

DEVELOPING.md

@@ -34,13 +34,18 @@ # Development Guidelines

1. Ensure all the tests are passing (`grunt`) and that there is enough test coverage.
1. Make sure you are on the `master` branch of the repository, with all changes merged/commited already.
1. Update the version number in the source code and the README. See [Versioning](#versioning) for information
about selecting an appropriate version number. Files to change:
1. Make sure you are on the `master` branch of the repository, with all changes merged/commited
already.
1. Update the version number anywhere it appears in the source code and documentation. See
[Versioning](#versioning) for information about selecting an appropriate version number. Files to
check:
- package.json
- README.md
1. Commit the version number change with the message "Update to version x.x.x", substituting the new version number.
1. Create a git tag: `git tag -a vx.x.x -m "Release vx.x.x"`
1. Ensure that you have permission to update the [opentok npm module](https://www.npmjs.org/package/opentok)
1. Commit the version number change with the message "Update to version x.y.z", substituting the new
version number.
1. Create a git tag: `git tag -a vx.y.z -m "Release vx.y.z"`
1. Ensure that you have permission to update the
[opentok npm module](https://www.npmjs.org/package/opentok)
1. Run `npm publish` to release to npm.
1. Change the version number for future development by adding "-alpha.1" in each file, then make another commit with the
message "Begin development on next version".
1. Change the version number for future development by incrementing the patch number (z) adding
"-alpha.1" in the source code (not the documentation). For possible files, see above. Then make
another commit with the message "Begin development on next version".
1. Push the changes to the source repository: `git push origin master`

@@ -47,0 +52,0 @@

@@ -36,5 +36,10 @@ var util = require('util'),

// handle client errors
if (resp.statusCode === 403) {
return cb(new Error('An authentcation error occurred: (' + resp.statusCode + ') ' + body));
}
// handle server errors
if (resp.statusCode === 500) {
return cb(new Error('A server error occurred: ('+resp.statusCode+') '+body));
return cb(new Error('A server error occurred: (' + resp.statusCode + ') ' + body));
}

@@ -41,0 +46,0 @@

{
"name": "opentok",
"description": "OpenTok server-side SDK",
"version": "2.2.0",
"version": "2.2.1",
"homepage": "http://opentok.github.io/opentok-node",

@@ -46,3 +46,3 @@ "repository": {

"grunt-mocha-test": "^0.10.0",
"nock": "^0.27.2"
"nock": "^0.32.3"
},

@@ -49,0 +49,0 @@ "dependencies": {

@@ -16,3 +16,5 @@ var expect = require('chai').expect,

// This is specifically concocted for these tests (uses fake apiKey/apiSecret above)
sessionId = '1_MX4xMjM0NTZ-flNhdCBNYXIgMTUgMTQ6NDI6MjMgUERUIDIwMTR-MC40OTAxMzAyNX4';
sessionId = '1_MX4xMjM0NTZ-flNhdCBNYXIgMTUgMTQ6NDI6MjMgUERUIDIwMTR-MC40OTAxMzAyNX4'
badApiKey = 'badkey',
badApiSecret = 'badsecret';
nock.disableNetConnect();

@@ -81,2 +83,24 @@

describe('when initialized with bad credentials', function() {
beforeEach(function() {
this.opentok = new OpenTok(badApiKey, badApiSecret);
});
describe('#createSession', function() {
it('throws a client error', function(done) {
var scope = nock('https://api.opentok.com:443')
.post('/hl/session/create', "p2p.preference=disabled")
.reply(403, "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?><errorPayload><code>-1</code><message>Invalid partner credentials</message></errorPayload>", { server: 'nginx',
date: 'Fri, 30 May 2014 19:37:12 GMT',
'content-type': 'application/xml',
connection: 'keep-alive',
'content-length': '145' });
this.opentok.createSession(function(err, session) {
expect(err).to.be.an.instanceof(Error);
scope.done();
done();
});
});
});
});
describe('#createSession', function() {

@@ -83,0 +107,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc