Files
socket.io/package.json
Damien Arrachequesne 2ccdeb2779 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
2020-12-07 09:53:28 +01:00

50 lines
1.4 KiB
JSON

{
"name": "engine.io-parser",
"description": "Parser for the client for the realtime Engine",
"license": "MIT",
"version": "4.0.1",
"main": "lib/index.js",
"homepage": "https://github.com/socketio/engine.io-parser",
"devDependencies": {
"@babel/core": "~7.9.6",
"@babel/preset-env": "~7.9.6",
"babel-eslint": "^10.0.3",
"babelify": "^10.0.0",
"benchmark": "^2.1.4",
"eslint": "^6.8.0",
"eslint-config-prettier": "^6.9.0",
"expect.js": "0.3.1",
"mocha": "^5.2.0",
"nyc": "~15.0.1",
"prettier": "^1.19.1",
"socket.io-browsers": "^1.0.4",
"zuul": "3.11.1",
"zuul-ngrok": "4.0.0"
},
"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",
"test:browser": "zuul test/index.js --no-coverage",
"format:check": "prettier --check 'lib/**/*.js' 'test/**/*.js'",
"format:fix": "prettier --write 'lib/**/*.js' 'test/**/*.js'",
"lint": "eslint 'lib/**/*.js' 'test/**/*.js'"
},
"repository": {
"type": "git",
"url": "git@github.com:socketio/engine.io-parser.git"
},
"files": [
"lib/"
],
"browser": {
"./lib/encodePacket.js": "./lib/encodePacket.browser.js",
"./lib/decodePacket.js": "./lib/decodePacket.browser.js"
},
"engines": {
"node": ">=8.0.0"
}
}