package.json 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149
  1. {
  2. "name": "undici",
  3. "version": "7.12.0",
  4. "description": "An HTTP/1.1 client, written from scratch for Node.js",
  5. "homepage": "https://undici.nodejs.org",
  6. "bugs": {
  7. "url": "https://github.com/nodejs/undici/issues"
  8. },
  9. "repository": {
  10. "type": "git",
  11. "url": "git+https://github.com/nodejs/undici.git"
  12. },
  13. "license": "MIT",
  14. "contributors": [
  15. {
  16. "name": "Daniele Belardi",
  17. "url": "https://github.com/dnlup",
  18. "author": true
  19. },
  20. {
  21. "name": "Ethan Arrowood",
  22. "url": "https://github.com/ethan-arrowood",
  23. "author": true
  24. },
  25. {
  26. "name": "Matteo Collina",
  27. "url": "https://github.com/mcollina",
  28. "author": true
  29. },
  30. {
  31. "name": "Matthew Aitken",
  32. "url": "https://github.com/KhafraDev",
  33. "author": true
  34. },
  35. {
  36. "name": "Robert Nagy",
  37. "url": "https://github.com/ronag",
  38. "author": true
  39. },
  40. {
  41. "name": "Szymon Marczak",
  42. "url": "https://github.com/szmarczak",
  43. "author": true
  44. },
  45. {
  46. "name": "Tomas Della Vedova",
  47. "url": "https://github.com/delvedor",
  48. "author": true
  49. }
  50. ],
  51. "keywords": [
  52. "fetch",
  53. "http",
  54. "https",
  55. "promise",
  56. "request",
  57. "curl",
  58. "wget",
  59. "xhr",
  60. "whatwg"
  61. ],
  62. "main": "index.js",
  63. "types": "index.d.ts",
  64. "scripts": {
  65. "build:node": "esbuild index-fetch.js --bundle --platform=node --outfile=undici-fetch.js --define:esbuildDetection=1 --keep-names && node scripts/strip-comments.js",
  66. "build:wasm": "node build/wasm.js --docker",
  67. "generate-pem": "node scripts/generate-pem.js",
  68. "lint": "eslint --cache",
  69. "lint:fix": "eslint --fix --cache",
  70. "test": "npm run test:javascript && cross-env NODE_V8_COVERAGE= npm run test:typescript",
  71. "test:javascript": "npm run test:javascript:no-jest && npm run test:jest",
  72. "test:javascript:no-jest": "npm run generate-pem && npm run test:unit && npm run test:node-fetch && npm run test:cache && npm run test:cache-interceptor && npm run test:interceptors && npm run test:fetch && npm run test:cookies && npm run test:eventsource && npm run test:wpt && npm run test:websocket && npm run test:node-test && npm run test:cache-tests",
  73. "test:javascript:without-intl": "npm run test:javascript:no-jest",
  74. "test:busboy": "borp -p \"test/busboy/*.js\"",
  75. "test:cache": "borp -p \"test/cache/*.js\"",
  76. "test:sqlite": "NODE_OPTIONS=--experimental-sqlite borp -p \"test/cache-interceptor/*.js\"",
  77. "test:cache-interceptor": "borp -p \"test/cache-interceptor/*.js\"",
  78. "test:cookies": "borp -p \"test/cookie/*.js\"",
  79. "test:eventsource": "npm run build:node && borp --expose-gc -p \"test/eventsource/*.js\"",
  80. "test:fuzzing": "node test/fuzzing/fuzzing.test.js",
  81. "test:fetch": "npm run build:node && borp --timeout 180000 --expose-gc --concurrency 1 -p \"test/fetch/*.js\" && npm run test:webidl && npm run test:busboy",
  82. "test:h2": "npm run test:h2:core && npm run test:h2:fetch",
  83. "test:h2:core": "borp -p \"test/+(http2|h2)*.js\"",
  84. "test:h2:fetch": "npm run build:node && borp -p \"test/fetch/http2*.js\"",
  85. "test:interceptors": "borp -p \"test/interceptors/*.js\"",
  86. "test:jest": "cross-env NODE_V8_COVERAGE= jest",
  87. "test:unit": "borp --expose-gc -p \"test/*.js\"",
  88. "test:node-fetch": "borp -p \"test/node-fetch/**/*.js\"",
  89. "test:node-test": "borp -p \"test/node-test/**/*.js\"",
  90. "test:tdd": "borp --expose-gc -p \"test/*.js\"",
  91. "test:tdd:node-test": "borp -p \"test/node-test/**/*.js\" -w",
  92. "test:typescript": "tsd && tsc test/imports/undici-import.ts --typeRoots ./types --noEmit && tsc ./types/*.d.ts --noEmit --typeRoots ./types",
  93. "test:webidl": "borp -p \"test/webidl/*.js\"",
  94. "test:websocket": "borp -p \"test/websocket/**/*.js\"",
  95. "test:websocket:autobahn": "node test/autobahn/client.js",
  96. "test:websocket:autobahn:report": "node test/autobahn/report.js",
  97. "test:wpt": "node test/wpt/start-fetch.mjs && node test/wpt/start-mimesniff.mjs && node test/wpt/start-xhr.mjs && node test/wpt/start-websockets.mjs && node test/wpt/start-cacheStorage.mjs && node test/wpt/start-eventsource.mjs",
  98. "test:wpt:withoutintl": "node test/wpt/start-fetch.mjs && node test/wpt/start-mimesniff.mjs && node test/wpt/start-xhr.mjs && node test/wpt/start-cacheStorage.mjs && node test/wpt/start-eventsource.mjs",
  99. "test:cache-tests": "node test/cache-interceptor/cache-tests.mjs --ci",
  100. "coverage": "npm run coverage:clean && cross-env NODE_V8_COVERAGE=./coverage/tmp npm run test:javascript && npm run coverage:report",
  101. "coverage:ci": "npm run coverage:clean && cross-env NODE_V8_COVERAGE=./coverage/tmp npm run test:javascript && npm run coverage:report:ci",
  102. "coverage:clean": "node ./scripts/clean-coverage.js",
  103. "coverage:report": "cross-env NODE_V8_COVERAGE= c8 report",
  104. "coverage:report:ci": "c8 report",
  105. "bench": "echo \"Error: Benchmarks have been moved to '/benchmarks'\" && exit 1",
  106. "serve:website": "echo \"Error: Documentation has been moved to '/docs'\" && exit 1",
  107. "prepare": "husky && node ./scripts/platform-shell.js"
  108. },
  109. "devDependencies": {
  110. "@fastify/busboy": "3.1.1",
  111. "@matteo.collina/tspl": "^0.2.0",
  112. "@sinonjs/fake-timers": "^12.0.0",
  113. "@types/node": "^18.19.50",
  114. "abort-controller": "^3.0.0",
  115. "borp": "^0.20.0",
  116. "c8": "^10.0.0",
  117. "cross-env": "^7.0.3",
  118. "dns-packet": "^5.4.0",
  119. "esbuild": "^0.25.2",
  120. "eslint": "^9.9.0",
  121. "fast-check": "^4.1.1",
  122. "https-pem": "^3.0.0",
  123. "husky": "^9.0.7",
  124. "jest": "^29.0.2",
  125. "neostandard": "^0.12.0",
  126. "node-forge": "^1.3.1",
  127. "proxy": "^2.1.1",
  128. "tsd": "^0.32.0",
  129. "typescript": "^5.6.2",
  130. "ws": "^8.11.0"
  131. },
  132. "engines": {
  133. "node": ">=20.18.1"
  134. },
  135. "tsd": {
  136. "directory": "test/types",
  137. "compilerOptions": {
  138. "esModuleInterop": true,
  139. "lib": [
  140. "esnext"
  141. ]
  142. }
  143. },
  144. "jest": {
  145. "testMatch": [
  146. "<rootDir>/test/jest/**"
  147. ]
  148. }
  149. }