mirror of
https://github.com/socketio/socket.io.git
synced 2026-04-30 03:00:39 -04:00
fix: add base64-arraybuffer as prod dependency
The dependency was previously only listed as dev dependency, so that it was not included when installing the server (the "engine.io" package, which does not require it) and was explicitly included by the client (the "engine.io-client" package, which needs it for the browser build). But it failed with yarn v2, due to its stricter package boundaries: > ERROR in ../../../.yarn/cache/engine.io-parser-npm-4.0.1-6bdb879e8a-3b71ef8b5a.zip/node_modules/engine.io-parser/lib/decodePacket.browser.js 7:18-47 > Module not found: Error: engine.io-parser tried to access base64-arraybuffer, but it isn't declared in its dependencies; this makes the require call ambiguous and unsound. > Required package: base64-arraybuffer (via "base64-arraybuffer") > Required by: engine.io-parser@npm:4.0.1 (via xxx/.yarn/cache/engine.io-parser-npm-4.0.1-6bdb879e8a-3b71ef8b5a.zip/node_modules/engine.io-parser/lib/) Related: - https://dev.to/arcanis/introducing-yarn-2-4eh1#strict-package-boundaries - https://github.com/socketio/engine.io-parser/issues/116
This commit is contained in:
7
package-lock.json
generated
7
package-lock.json
generated
@@ -1614,10 +1614,9 @@
|
||||
}
|
||||
},
|
||||
"base64-arraybuffer": {
|
||||
"version": "0.1.5",
|
||||
"resolved": "https://registry.npmjs.org/base64-arraybuffer/-/base64-arraybuffer-0.1.5.tgz",
|
||||
"integrity": "sha1-c5JncZI7Whl0etZmqlzUv5xunOg=",
|
||||
"dev": true
|
||||
"version": "0.1.4",
|
||||
"resolved": "https://registry.npmjs.org/base64-arraybuffer/-/base64-arraybuffer-0.1.4.tgz",
|
||||
"integrity": "sha1-mBjHngWbE1X5fgQooBfIOOkLqBI="
|
||||
},
|
||||
"base64-js": {
|
||||
"version": "1.3.1",
|
||||
|
||||
@@ -10,7 +10,6 @@
|
||||
"@babel/preset-env": "~7.9.6",
|
||||
"babel-eslint": "^10.0.3",
|
||||
"babelify": "^10.0.0",
|
||||
"base64-arraybuffer": "0.1.5",
|
||||
"benchmark": "^2.1.4",
|
||||
"eslint": "^6.8.0",
|
||||
"eslint-config-prettier": "^6.9.0",
|
||||
@@ -22,7 +21,9 @@
|
||||
"zuul": "3.11.1",
|
||||
"zuul-ngrok": "4.0.0"
|
||||
},
|
||||
"dependencies": {},
|
||||
"dependencies": {
|
||||
"base64-arraybuffer": "0.1.4"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "npm run lint && npm run format:check && if test \"$BROWSERS\" = \"1\" ; then npm run test:browser; else npm run test:node; fi",
|
||||
"test:node": "nyc mocha test/index.js",
|
||||
|
||||
Reference in New Issue
Block a user