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

@cypress/core-socket

Package Overview
Dependencies
Maintainers
3
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@cypress/core-socket - npm Package Compare versions

Comparing version 0.1.0 to 0.2.0

10

lib/socket.js

@@ -0,4 +1,6 @@

var fs = require("fs")
var path = require("path")
var server = require("socket.io")
var client = require("socket.io-client")
var version = require("socket.io-client/package.json").version
var clientPath = require.resolve("socket.io-client")

@@ -15,3 +17,11 @@

return path.join(clientPath, "..", "..", "socket.io.js")
},
getClientVersion: function(){
return version
},
getClientSource: function(){
return fs.readFileSync(this.getPathToClientSource(), "utf8")
}
}

2

package.json
{
"name": "@cypress/core-socket",
"version": "0.1.0",
"version": "0.2.0",
"description": "Cypress Shared Socket Libs",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -49,3 +49,6 @@ # Cypress Core Socket

#### 0.2.0 - *(06/17/16)*
- added socket.getClientVersion and socket.getClientSource methods
#### 0.1.0 - *(04/29/16)*
- initial release

@@ -5,2 +5,3 @@ var fs = require("fs")

var expect = require("chai").expect
var pkg = require("../package.json")
var lib = require("../index")

@@ -27,2 +28,21 @@

})
context(".getClientVersion", function(){
it("returns client version", function(){
expect(lib.getClientVersion()).to.eq(pkg.dependencies["socket.io-client"])
})
})
context(".getClientSource", function(){
it("returns client source as a string", function(done) {
var p = process.cwd() + "/node_modules/socket.io-client/socket.io.js"
fs.readFile(p, "utf8", function(err, str){
if (err) done(err)
expect(lib.getClientSource()).to.eq(str)
done()
})
})
})
})
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