Skip to content

Commit

Permalink
feat: avoid deps vm2
Browse files Browse the repository at this point in the history
move proxy-agent to peerDependencies and make it optional

closes eggjs/egg#5239
  • Loading branch information
fengmk2 committed Jul 23, 2023
1 parent 126a938 commit f3d2714
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 9 deletions.
17 changes: 10 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,11 @@
},
"scripts": {
"tsd": "node test/tsd.js",
"test-local": "mocha -t 30000 -r intelli-espower-loader test/*.test.js",
"test-local": "mocha -t 30000 test/*.test.js",
"test": "npm run lint && npm run test-local",
"test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- -t 30000 -r intelli-espower-loader test/*.test.js",
"test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- -t 30000 test/*.test.js",
"ci": "npm run lint && npm run tsd && npm run test-cov",
"lint": "jshint .",
"autod": "autod -w --prefix '^' -t test -e examples",
"contributor": "git-contributor"
},
"dependencies": {
Expand All @@ -46,17 +45,23 @@
"humanize-ms": "^1.2.0",
"iconv-lite": "^0.4.15",
"ip": "^1.1.5",
"proxy-agent": "^5.0.0",
"pump": "^3.0.0",
"qs": "^6.4.0",
"statuses": "^1.3.1",
"utility": "^1.16.1"
},
"peerDependencies": {
"proxy-agent": "^5.0.0"
},
"peerDependenciesMeta": {
"proxy-agent": {
"optional": true
}
},
"devDependencies": {
"@types/mocha": "^5.2.5",
"@types/node": "^10.12.18",
"agentkeepalive": "^4.0.0",
"autod": "*",
"benchmark": "^2.1.4",
"bluebird": "*",
"busboy": "^0.2.14",
Expand All @@ -65,14 +70,12 @@
"egg-ci": "^1.15.0",
"git-contributor": "^1.0.10",
"http-proxy": "^1.16.2",
"intelli-espower-loader": "^1.0.1",
"istanbul": "*",
"jshint": "*",
"mkdirp": "^0.5.1",
"mocha": "3",
"muk": "^0.5.3",
"pedding": "^1.1.0",
"power-assert": "^1.4.2",
"semver": "5",
"spy": "^1.0.0",
"tar": "^4.4.8",
Expand Down
2 changes: 1 addition & 1 deletion test/non-ascii-request-header.test.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use strict';

var assert = require('power-assert');
var assert = require('assert');
var urllib = require('..');

// https://github.com/node-modules/urllib/issues/198
Expand Down
2 changes: 1 addition & 1 deletion test/timing.test.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use strict';

var dns = require('dns');
var assert = require('power-assert');
var assert = require('assert');
var pedding = require('pedding');
var HttpsAgent = require('agentkeepalive').HttpsAgent;
var httpsAgent = new HttpsAgent({ keepAlive: true });
Expand Down

0 comments on commit f3d2714

Please sign in to comment.