New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

primus

Package Overview
Dependencies
Maintainers
5
Versions
109
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

primus - npm Package Compare versions

Comparing version 2.4.6 to 2.4.7

transformers/socket.io/library.js

6

index.js

@@ -83,3 +83,7 @@ 'use strict';

this.server = server;
this.pathname = options.pathname || '/primus';
this.pathname = 'string' === typeof options.pathname
? options.pathname.charAt(0) !== '/'
? '/'+ options.pathname
: options.pathname
: '/primus';

@@ -86,0 +90,0 @@ //

4

package.json
{
"name": "primus",
"version": "2.4.6",
"version": "2.4.7",
"description": "Primus is a simple abstraction around real-time frameworks. It allows you to easily switch between different frameworks without any code changes.",

@@ -72,3 +72,3 @@ "main": "index.js",

"pre-commit": "0.0.x",
"request": "2.42.x",
"request": "2.44.x",
"socket.io": "0.9.x",

@@ -75,0 +75,0 @@ "socket.io-client": "0.9.x",

@@ -952,3 +952,3 @@ /*globals require, define */

this.write('primus::id::');
this._write('primus::id::');
return this.once('incoming::id', fn);

@@ -1073,3 +1073,3 @@ };

primus.clearTimeout('ping').write('primus::ping::'+ value);
primus.clearTimeout('ping')._write('primus::ping::'+ value);
primus.emit('outgoing::ping', value);

@@ -1076,0 +1076,0 @@ primus.timers.pong = setTimeout(pong, primus.options.pong);

'use strict';
var path = require('path')
, directory = path.dirname(require.resolve('socket.io'))
, library = path.join(directory, 'node_modules/socket.io-client/dist/socket.io.js');
//
// Testing edge-case. We're also installing the socket.io-client and npm tries
// to be a smarty pants and optimize our packages and removes the
// socket.io-client from the dependencies directory as it's already in the
// parents `node_module`.
//
try {
directory = path.dirname(require.resolve('socket.io-client'));
library = path.join(directory, '../dist/socket.io.js');
} catch (e) {}
//
// Expose the module as new Transformer instance.

@@ -29,3 +14,3 @@ //

// The client-side library of socket.io.
library: require('fs').readFileSync(library, 'utf-8')
library: require('fs').readFileSync(__dirname + '/library.js', 'utf-8')
});
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