mirror of
https://github.com/cypress-io/cypress.git
synced 2026-03-14 13:20:29 -05:00
Changes: - Pulls down & stitches in the "Cypress Cloud" schema from remote. Currently defaulted to "staging" so we can make quick fixes / iteration there - Add dedicated type checking CircleCI job `check-ts` - Adds [graphcache](https://formidable.com/open-source/urql/docs/graphcache/) to normalize the cache & provide better auto-reactivity when data changes - Removes `LocalProject` / `DashboardProject` in favor of `Project` / `CloudProject` - General cleanup of Vue components' GraphQL fragments - Parallelizes launchpad tests & recording to new Cypress project: https://dashboard.cypress.io/projects/sehy69/runs - Did this b/c tests were frequently timing out, need to figure out the source of this - Basic mocks for remote schema
Socket
This is a shared lib for holding both the socket.io server and client.
Using
const socket = require("packages/socket")
// returns
{
server: require("socket.io"),
client: require("socket.io-client"),
getPathToClientSource: function () {
// returns path to the client 'socket.io.js' file
// for use in the browser
}
}
const socket = require("packages/socket")
// server usage
const srv = require("http").createServer()
const io = socket.server(srv)
io.on("connection", function(){})
// client usage
const client = socket.client("http://localhost:2020")
client.on("connect", function(){})
client.on("event", function(){})
client.on("disconnect", function(){})
// path usage
socket.getPathToClientSource()
// returns your/path/to/node_modules/socket.io-client/socket.io.js0
Testing
yarn workspace @packages/socket test