chore(eio): revert cookie to version ~0.7.2

This reverts commit 7427109658.

The new version of the `cookie` package contains code with optional chaining (`?.`), which is not supported by older Node.js versions (< 14).

The types for cookie are now bundled, so that there is no conflict with the types coming from `cookie@1`:

> error TS2724: '"cookie"' has no exported member named 'CookieSerializeOptions'. Did you mean 'SerializeOptions'?
>
> import type { CookieSerializeOptions } from "cookie";
>               ~~~~~~~~~~~~~~~~~~~~~~

Related: https://github.com/socketio/socket.io/issues/5283
This commit is contained in:
Damien Arrachequesne
2025-01-28 09:13:39 +01:00
parent 62e4da125e
commit 5a31aaf917
5 changed files with 129 additions and 10 deletions

15
package-lock.json generated
View File

@@ -42,6 +42,7 @@
"base64-arraybuffer": "^1.0.2",
"benchmark": "^2.1.4",
"blob": "^0.1.0",
"cookie": "~0.7.2",
"eiows": "^7.1.0",
"engine.io-client-v3": "npm:engine.io-client@^3.5.2",
"expect.js": "^0.3.1",
@@ -5756,11 +5757,11 @@
"dev": true
},
"node_modules/cookie": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/cookie/-/cookie-1.0.2.tgz",
"integrity": "sha512-9Kr/j4O16ISv8zBBhJoi4bXOYNTkFLOqSL3UDB0njXxCXNezjeyVrJyGOWtgfs/q2km1gwBcfH8q1yEGoMYunA==",
"version": "0.7.2",
"resolved": "https://registry.npmjs.org/cookie/-/cookie-0.7.2.tgz",
"integrity": "sha512-yki5XnKuf750l50uGTllt6kKILY4nQ1eNIQatoXEByZ5dWgnKqbnqmTrBE5B4N7lrMJKQ2ytWMiTO2o0v6Ew/w==",
"engines": {
"node": ">=18"
"node": ">= 0.6"
}
},
"node_modules/cookie-signature": {
@@ -15506,14 +15507,14 @@
}
},
"packages/engine.io": {
"version": "6.6.2",
"version": "6.6.3",
"license": "MIT",
"dependencies": {
"@types/cors": "^2.8.12",
"@types/node": ">=10.0.0",
"accepts": "~1.3.4",
"base64id": "2.0.0",
"cookie": "~1.0.2",
"cookie": "~0.7.2",
"cors": "~2.8.5",
"debug": "~4.3.1",
"engine.io-parser": "~5.2.1",
@@ -15524,7 +15525,7 @@
}
},
"packages/engine.io-client": {
"version": "6.6.2",
"version": "6.6.3",
"license": "MIT",
"dependencies": {
"@socket.io/component-emitter": "~3.1.0",