Skip to content

Commit

Permalink
Merge pull request #236 from leapmotion/test-updates
Browse files Browse the repository at this point in the history
Update packages to address security vulnerabilities and deprecations
  • Loading branch information
Johnathon Selstad authored Dec 10, 2019
2 parents 31b0072 + f2e2791 commit a3d8605
Show file tree
Hide file tree
Showing 23 changed files with 21,580 additions and 9,475 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
language: node_js
node_js:
- "0.10"
- "12"
before_install: npm install -g grunt-cli
script: grunt test
4 changes: 2 additions & 2 deletions bower.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"name": "leapjs",
"version": "0.6.4",
"version": "1.0.0",
"homepage": "https://github.com/leapmotion/leapjs",
"description": "JavaScript client for the Leap Motion Controller",
"main": "leap-0.6.4.js",
"main": "leap-1.0.0.js",
"keywords": [
"leap",
"leapmotion"
Expand Down
2 changes: 1 addition & 1 deletion examples/css-visualizer.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<html>
<head>
<title>DOM Visualizer - Leap</title>
<script src="../leap-0.6.4.js"></script>
<script src="../leap-1.0.0.js"></script>
<script>
function moveFinger(Finger, posX, posY, posZ) {
Finger.style.webkitTransform = "translate3d("+posX+"px, "+posY+"px, "+posZ+"px)";
Expand Down
2 changes: 1 addition & 1 deletion examples/dialog.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
}
</style>
-->
<script src="../leap-0.6.4.js"></script>
<script src="../leap-1.0.0.js"></script>
<script>

var controller = (new Leap.Controller);
Expand Down
2 changes: 1 addition & 1 deletion examples/dumper.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<html>
<head>
<title>Dumper - Leap</title>
<script src="../leap-0.6.4.js"></script>
<script src="../leap-1.0.0.js"></script>
<script>
console.log("LeapJS v" + Leap.version.full);
var state = 'play';
Expand Down
2 changes: 1 addition & 1 deletion examples/gestures.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<head>
<script src="http://cdnjs.cloudflare.com/ajax/libs/underscore.js/1.5.2/underscore-min.js"></script>
<script src="http://cdnjs.cloudflare.com/ajax/libs/jquery/2.0.3/jquery.min.js"></script>
<script src="../leap-0.6.4.js"></script>
<script src="../leap-1.0.0.js"></script>
<script>

$(document).ready(function() {
Expand Down
2 changes: 1 addition & 1 deletion examples/iframe.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<html>
<head>
<title>iFrame - Leap</title>
<script src="../leap-0.6.4.js"></script>
<script src="../leap-1.0.0.js"></script>
</head>
<body>
<!-- Demonstrates https://github.com/leapmotion/leapjs/issues/176 -->
Expand Down
2 changes: 1 addition & 1 deletion examples/loop.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Loop - Leap</title>

<script src="../leap-0.6.4.js"></script>
<script src="../leap-1.0.0.js"></script>

<script>

Expand Down
2 changes: 1 addition & 1 deletion examples/math.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Math - Leap</title>

<script src="../leap-0.6.4.js"></script>
<script src="../leap-1.0.0.js"></script>

<script>

Expand Down
2 changes: 1 addition & 1 deletion examples/optimizeHMD.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<html>
<head>
<title>HMD Optimization - Leap</title>
<script src="../leap-0.6.4.js"></script>
<script src="../leap-1.0.0.js"></script>
<script>
var controller = new Leap.Controller({optimizeHMD: true}).connect();
</script>
Expand Down
2 changes: 1 addition & 1 deletion examples/plugins.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<html>
<head>
<title>Plugins - Leap</title>
<script src="../leap-0.6.4.js"></script>
<script src="../leap-1.0.0.js"></script>
<script>
Leap.Controller.plugin('test', function(){

Expand Down
2 changes: 1 addition & 1 deletion examples/roll-pitch-yaw.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<html>
<head>
<title>Dumper - Leap</title>
<script src="../leap-0.6.4.js"></script>
<script src="../leap-1.0.0.js"></script>
<script>
var paused = false;
window.onkeypress = function(e) {
Expand Down
2 changes: 1 addition & 1 deletion examples/threejs-bones-arrows.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<html>
<head>
<title>Bone Hands - Leap</title>
<script src="../leap-0.6.4.js"></script>
<script src="../leap-1.0.0.js"></script>
<script src="lib/leap-plugins-0.1.6.js"></script>
<script src="lib/three.js"></script>

Expand Down
2 changes: 1 addition & 1 deletion examples/threejs-bones.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<html>
<head>
<title>Bone Hands - Leap</title>
<script src="../leap-0.6.4.js"></script>
<script src="../leap-1.0.0.js"></script>
<script src="lib/leap-plugins-0.1.6.js"></script>
<script src="lib/three.js"></script>

Expand Down
11 changes: 8 additions & 3 deletions integration_test/protocol_versions.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,10 @@ downgradeProtocol = function(){
var expected = ['/v6.json', '/v5.json', '/v4.json', '/v3.json', '/v2.json', '/v1.json'];

var wss = new WebSocketServer({port: 9494})
wss.on('connection', function(ws) {
// https://github.com/websockets/ws/issues/1114
// https://github.com/websockets/ws/pull/1099
wss.on('connection', function(ws, req) {
ws.upgradeReq = req
if (passed) return;
console.log("connected to socket with "+ws.upgradeReq.url)
if (expected.length == 0) {
Expand All @@ -41,7 +44,8 @@ saveGoodProtocol = function(){

var wss = new WebSocketServer({port: 9495})
var origUrl;
wss.on('connection', function(ws) {
wss.on('connection', function(ws, req) {
ws.upgradeReq = req
console.log("connected to socket with "+ws.upgradeReq.url)

ws.send('{"version": 4}');
Expand Down Expand Up @@ -80,7 +84,8 @@ disconnectAfterConnect = function () {
var wss = new WebSocketServer({port: 9496})


wss.on('connection', function (ws) {
wss.on('connection', function (ws, req) {
ws.upgradeReq = req
timesConnected++;
console.log("connected to socket with "+ws.upgradeReq.url)

Expand Down
Loading

0 comments on commit a3d8605

Please sign in to comment.