Skip to content

Commit

Permalink
chore: move dev dependencies in the parent package.json file
Browse files Browse the repository at this point in the history
  • Loading branch information
darrachequesne committed Jul 9, 2024
1 parent d3761e3 commit 0b4259c
Show file tree
Hide file tree
Showing 17 changed files with 8,800 additions and 20,821 deletions.
29,359 changes: 8,709 additions & 20,650 deletions package-lock.json

Large diffs are not rendered by default.

54 changes: 52 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,59 @@
],
"overrides": {
"@types/estree": "0.0.52",
"@types/lodash": "4.14.189"
"@types/lodash": "4.14.189",
"ws": "8.17.1"
},
"devDependencies": {
"@types/node": "18.15.3"
"@babel/core": "^7.24.7",
"@babel/plugin-transform-object-assign": "^7.24.7",
"@babel/preset-env": "^7.24.7",
"@babel/register": "^7.24.6",
"@fails-components/webtransport": "^0.1.7",
"@rollup/plugin-alias": "^5.1.0",
"@rollup/plugin-babel": "^6.0.4",
"@rollup/plugin-commonjs": "^26.0.1",
"@rollup/plugin-node-resolve": "^15.2.3",
"@sinonjs/fake-timers": "^11.2.2",
"@types/debug": "^4.1.12",
"@types/expect.js": "^0.3.32",
"@types/mocha": "^10.0.7",
"@types/node": "18.15.3",
"@types/sinonjs__fake-timers": "^8.1.5",
"@wdio/cli": "^8.39.1",
"@wdio/local-runner": "^8.39.1",
"@wdio/mocha-framework": "^8.39.0",
"@wdio/sauce-service": "^8.39.1",
"@wdio/spec-reporter": "^8.39.0",
"babel-loader": "^9.1.3",
"base64-arraybuffer": "^1.0.2",
"benchmark": "^2.1.4",
"blob": "^0.1.0",
"eiows": "^7.1.0",
"engine.io-client-v3": "npm:engine.io-client@^3.5.2",
"expect.js": "^0.3.1",
"express": "^4.19.2",
"express-session": "^1.18.0",
"has-cors": "^1.1.0",
"helmet": "^7.1.0",
"mocha": "^10.6.0",
"node-forge": "^1.3.1",
"nyc": "^17.0.0",
"prettier": "^2.8.8",
"rimraf": "^6.0.0",
"rollup": "^2.79.1",
"rollup-plugin-terser": "^7.0.2",
"should": "^13.2.3",
"socket.io-client-v2": "npm:socket.io-client@^2.5.0",
"socket.io-msgpack-parser": "^3.0.2",
"superagent": "^9.0.2",
"supertest": "^7.0.0",
"text-blob-builder": "^0.0.1",
"ts-loader": "^9.5.1",
"ts-node": "^10.9.2",
"tsd": "^0.31.1",
"typescript": "^5.5.3",
"uWebSockets.js": "github:uNetworking/uWebSockets.js#v20.30.0",
"wdio-geckodriver-service": "^5.0.2"
}
}
1 change: 1 addition & 0 deletions packages/engine.io-client/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
test/support/public/engine.io.min.js
32 changes: 0 additions & 32 deletions packages/engine.io-client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,38 +58,6 @@
"ws": "~8.17.1",
"xmlhttprequest-ssl": "~2.0.0"
},
"devDependencies": {
"@babel/core": "^7.12.9",
"@babel/plugin-transform-object-assign": "^7.12.1",
"@babel/preset-env": "^7.12.7",
"@fails-components/webtransport": "^0.1.7",
"@rollup/plugin-babel": "^5.3.0",
"@rollup/plugin-commonjs": "^21.0.0",
"@rollup/plugin-node-resolve": "^13.0.5",
"@sinonjs/fake-timers": "^7.1.2",
"@types/debug": "^4.1.12",
"@types/mocha": "^9.0.0",
"@types/node": "^16.10.1",
"@types/sinonjs__fake-timers": "^6.0.3",
"babel-loader": "^8.2.2",
"blob": "0.0.5",
"engine.io": "^6.5.2-alpha.1",
"expect.js": "^0.3.1",
"express": "^4.17.1",
"mocha": "^10.2.0",
"node-forge": "^1.3.1",
"prettier": "^2.8.1",
"rollup": "^2.58.0",
"rollup-plugin-terser": "^7.0.2",
"socket.io-browsers": "~1.0.4",
"typescript": "^4.9.5",
"webpack": "^4.44.2",
"webpack-cli": "^3.3.12",
"webpack-remove-debug": "^0.1.0",
"zuul": "~3.11.1",
"zuul-builder-webpack": "^1.2.0",
"zuul-ngrok": "4.0.0"
},
"scripts": {
"compile": "rimraf ./build && tsc && tsc -p tsconfig.esm.json && ./postcompile.sh",
"test": "npm run format:check && npm run compile && if test \"$BROWSERS\" = \"1\" ; then npm run test:browser; else npm run test:node; fi",
Expand Down
18 changes: 1 addition & 17 deletions packages/engine.io-parser/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,23 +11,7 @@
},
"types": "build/esm/index.d.ts",
"devDependencies": {
"@babel/core": "~7.9.6",
"@babel/preset-env": "~7.9.6",
"@types/mocha": "^9.0.0",
"@types/node": "^16.9.6",
"babelify": "^10.0.0",
"benchmark": "^2.1.4",
"expect.js": "0.3.1",
"mocha": "^5.2.0",
"nyc": "~15.0.1",
"prettier": "^3.2.5",
"rimraf": "^3.0.2",
"socket.io-browsers": "^1.0.4",
"ts-node": "^10.2.1",
"tsify": "^5.0.4",
"typescript": "^4.4.3",
"zuul": "3.11.1",
"zuul-ngrok": "4.0.0"
"prettier": "^3.3.2"
},
"scripts": {
"compile": "rimraf ./build && tsc && tsc -p tsconfig.esm.json && ./postcompile.sh",
Expand Down
17 changes: 0 additions & 17 deletions packages/engine.io/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,23 +42,6 @@
"engine.io-parser": "~5.2.1",
"ws": "~8.17.1"
},
"devDependencies": {
"@fails-components/webtransport": "^0.1.7",
"babel-eslint": "^8.0.2",
"eiows": "^4.1.2",
"engine.io-client": "6.5.0",
"engine.io-client-v3": "npm:engine.io-client@3.5.2",
"expect.js": "^0.3.1",
"express-session": "^1.17.3",
"helmet": "^6.0.1",
"mocha": "^9.1.3",
"node-forge": "^1.3.1",
"prettier": "^2.8.2",
"rimraf": "^3.0.2",
"superagent": "^3.8.1",
"typescript": "^4.4.3",
"uWebSockets.js": "github:uNetworking/uWebSockets.js#v20.30.0"
},
"scripts": {
"compile": "rimraf ./build && tsc",
"test": "npm run compile && npm run format:check && npm run test:default && npm run test:compat-v3",
Expand Down
5 changes: 5 additions & 0 deletions packages/engine.io/test/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ const { Socket } =
? require("engine.io-client-v3")
: require("engine.io-client");

if (process.env.EIO_CLIENT !== "3") {
Socket.prototype.sendPacket = Socket.prototype._sendPacket;
Socket.prototype.onError = Socket.prototype._onError;
}

/**
* Listen shortcut that fires a callback on an ephemeral port.
*/
Expand Down
37 changes: 27 additions & 10 deletions packages/engine.io/test/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ const request = require("superagent");
const cookieMod = require("cookie");
const { WebSocket } = require("ws");

const IS_CLIENT_V3 = process.env.EIO_CLIENT === "3";

/**
* Tests.
*/
Expand Down Expand Up @@ -833,8 +835,8 @@ describe("server", () => {
expect(conn.writeBuffer.length).to.be(1);
setTimeout(() => {
expect(conn.writeBuffer.length).to.be(0); // writeBuffer has been cleared
done();
}, 10);
done();
});
conn.writeBuffer.push({ type: "message", data: "foo" });
conn.onError("");
Expand All @@ -851,8 +853,8 @@ describe("server", () => {
expect(socket.writeBuffer.length).to.be(1);
setTimeout(() => {
expect(socket.writeBuffer.length).to.be(0);
done();
}, 10);
done();
});
socket.writeBuffer.push({ type: "message", data: "foo" });
socket.onError("");
Expand All @@ -864,7 +866,11 @@ describe("server", () => {
const opts = { allowUpgrades: false, pingInterval: 5, pingTimeout: 5 };
const engine = listen(opts, (port) => {
const socket = new ClientSocket(`http://localhost:${port}`);
socket.sendPacket = () => {};
if (IS_CLIENT_V3) {
socket.sendPacket = () => {};
} else {
socket._sendPacket = () => {};
}
engine.on("connection", (conn) => {
conn.on("close", (reason) => {
expect(reason).to.be("ping timeout");
Expand Down Expand Up @@ -1166,7 +1172,10 @@ describe("server", () => {
expect(serverSocket).to.be.an("object");

// OPENED readyState is expected - we are actually polling
expect(socket.transport.pollXhr.xhr.readyState).to.be(1);
expect(
socket.transport.pollXhr[IS_CLIENT_V3 ? "xhr" : "_xhr"]
.readyState
).to.be(1);

// 2 requests sent to the server over an unique port means
// we should have been assigned 2 sockets
Expand Down Expand Up @@ -1325,7 +1334,7 @@ describe("server", () => {
}
);

if (process.env.EIO_CLIENT === "3") {
if (IS_CLIENT_V3) {
it(
"should trigger with connection `ping timeout` " +
"after `pingInterval + pingTimeout`",
Expand Down Expand Up @@ -1511,7 +1520,11 @@ describe("server", () => {
transports: ["websocket"],
});
// override to simulate an inactive client
socket.sendPacket = socket.onHeartbeat = () => {};
if (IS_CLIENT_V3) {
socket.sendPacket = socket.onHeartbeat = () => {};
} else {
socket._sendPacket = socket._onHeartbeat = () => {};
}
});
});

Expand All @@ -1530,7 +1543,11 @@ describe("server", () => {
transports: ["polling"],
});
// override to simulate an inactive client
socket.sendPacket = socket.onHeartbeat = () => {};
if (IS_CLIENT_V3) {
socket.sendPacket = socket.onHeartbeat = () => {};
} else {
socket._sendPacket = socket._onHeartbeat = () => {};
}
});
});

Expand Down Expand Up @@ -2082,7 +2099,7 @@ describe("server", () => {
method: "POST",
});

req.write(process.env.EIO_CLIENT === "3" ? "4:41" : "41");
req.write(IS_CLIENT_V3 ? "4:41" : "41");
req.write("2");
req.write("3");
req.end();
Expand Down Expand Up @@ -2986,7 +3003,7 @@ describe("server", () => {
engine.on("connection", (conn) => {
conn.on("packet", (packet) => {
conn.close();
if (process.env.EIO_CLIENT === "3") {
if (IS_CLIENT_V3) {
expect(packet.type).to.be("ping");
} else {
expect(packet.type).to.be("pong");
Expand Down Expand Up @@ -3022,7 +3039,7 @@ describe("server", () => {
engine.on("connection", (conn) => {
conn.on("packetCreate", (packet) => {
conn.close();
if (process.env.EIO_CLIENT === "3") {
if (IS_CLIENT_V3) {
expect(packet.type).to.be("pong");
} else {
expect(packet.type).to.be("ping");
Expand Down
2 changes: 2 additions & 0 deletions packages/socket.io-adapter/lib/in-memory-adapter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { EventEmitter } from "events";
import { yeast } from "./contrib/yeast";
import WebSocket = require("ws");

// @ts-ignore
const canPreComputeFrame = typeof WebSocket?.Sender?.frame === "function";

/**
Expand Down Expand Up @@ -241,6 +242,7 @@ export class Adapter extends EventEmitter {
// "4" being the "message" packet type in the Engine.IO protocol
const data = Buffer.from("4" + encodedPackets[0]);
// see https://github.com/websockets/ws/issues/617#issuecomment-283002469
// @ts-ignore
packetOpts.wsPreEncodedFrame = WebSocket.Sender.frame(data, {
readOnly: false,
mask: false,
Expand Down
13 changes: 0 additions & 13 deletions packages/socket.io-adapter/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,19 +20,6 @@
"debug": "~4.3.4",
"ws": "~8.17.1"
},
"devDependencies": {
"@types/debug": "^4.1.12",
"@types/expect.js": "^0.3.32",
"@types/mocha": "^10.0.1",
"expect.js": "^0.3.1",
"mocha": "^10.2.0",
"nyc": "^15.1.0",
"prettier": "^2.8.1",
"socket.io": "^4.7.4",
"socket.io-client": "^4.7.4",
"ts-node": "^10.9.1",
"typescript": "^4.9.4"
},
"scripts": {
"compile": "tsc",
"test": "npm run format:check && npm run compile && nyc mocha --require ts-node/register test/*.ts",
Expand Down
39 changes: 0 additions & 39 deletions packages/socket.io-client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,42 +50,6 @@
"engine.io-client": "~6.5.2",
"socket.io-parser": "~4.2.4"
},
"devDependencies": {
"@babel/core": "^7.15.0",
"@babel/plugin-transform-object-assign": "^7.14.5",
"@babel/preset-env": "^7.15.0",
"@babel/register": "^7.18.9",
"@rollup/plugin-alias": "^3.1.5",
"@rollup/plugin-babel": "^5.3.0",
"@rollup/plugin-commonjs": "^21.0.0",
"@rollup/plugin-node-resolve": "^13.0.5",
"@sinonjs/fake-timers": "^7.1.2",
"@types/mocha": "^9.0.0",
"@types/sinonjs__fake-timers": "^6.0.3",
"@wdio/cli": "^7.26.0",
"@wdio/local-runner": "^7.26.0",
"@wdio/mocha-framework": "^7.26.0",
"@wdio/sauce-service": "^7.26.0",
"@wdio/spec-reporter": "^7.26.0",
"babel-eslint": "^10.1.0",
"babel-loader": "^8.1.0",
"babel-preset-es2015": "6.24.1",
"base64-arraybuffer": "^0.1.5",
"expect.js": "0.3.1",
"has-cors": "^1.1.0",
"mocha": "^10.1.0",
"prettier": "^2.3.2",
"rimraf": "^3.0.2",
"rollup": "^2.58.0",
"rollup-plugin-terser": "^7.0.2",
"socket.io": "^4.6.0-alpha1",
"socket.io-msgpack-parser": "^3.0.0",
"text-blob-builder": "0.0.1",
"ts-loader": "^8.3.0",
"ts-node": "^10.2.1",
"tsd": "^0.27.0",
"typescript": "^4.4.2"
},
"scripts": {
"compile": "rimraf ./build && tsc && tsc -p tsconfig.esm.json && ./postcompile.sh",
"test": "npm run format:check && npm run compile && if test \"$BROWSERS\" = \"1\" ; then npm run test:browser; else npm run test:node; fi",
Expand Down Expand Up @@ -132,8 +96,5 @@
},
"browser": {
"./test/node.ts": false
},
"overrides": {
"@types/estree": "0.0.52"
}
}
2 changes: 1 addition & 1 deletion packages/socket.io-client/test/browser-runner.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import Launcher from "@wdio/cli";
import { Launcher } from "@wdio/cli";
import { createServer } from "./support/server";

const launcher = new Launcher("./wdio.conf.js");
Expand Down
4 changes: 0 additions & 4 deletions packages/socket.io-component-emitter/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,6 @@
"description": "Event emitter",
"version": "3.1.2",
"license": "MIT",
"devDependencies": {
"mocha": "*",
"should": "*"
},
"component": {
"scripts": {
"emitter/index.js": "index.js"
Expand Down
Loading

0 comments on commit 0b4259c

Please sign in to comment.