node-restify icon indicating copy to clipboard operation
node-restify copied to clipboard

Upgrade formidable dependency to resolve npm warning

Open sternam opened this issue 3 years ago • 1 comments

  • [x ] Used appropriate template for the issue type
  • [x ] Searched both open and closed issues for duplicates of this issue
  • [x ] Title adequately and concisely reflects the feature or the bug

Restify Version: 10.0.0 Node.js Version: v18.12.1

Expected behaviour

Should be able to install restify as a dependency without generating npm warnings about deprecated formidable dependency.

Actual behaviour

npm install emits: npm WARN deprecated [email protected]: Please upgrade to latest, formidable@v2 or formidable@v3! Check these notes: https://bit.ly/2ZEqIau

Repro case

Add restify as a dependency to your package.json and run npm install.

Cause

Need to upgrade formidable dependency to latest v2 or v3.

Are you willing and able to fix this?

Yes

sternam avatar Nov 23 '22 14:11 sternam

I've been trying to fix it myself, but upgrading formidable dependency to 2.0.1 is a breaking change, causing the following restify tests to fail:

  200 passing (25s)
  6 failing

  1) multipart parser
       body multipart ok:
     Error: Timeout of 2000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves. (/Users/astern/node-restify/test/plugins/multipart.test.js)
      at Runnable._timeoutError (/Users/astern/node-restify/node_modules/mocha/lib/runnable.js:442:10)
      at Timeout.<anonymous> (/Users/astern/node-restify/node_modules/mocha/lib/runnable.js:252:24)
      at listOnTimeout (node:internal/timers:564:17)
      at process.processTimers (node:internal/timers:507:7)

  2) multipart parser
       gh-847 body multipart no files ok:
     Error: Timeout of 2000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves. (/Users/astern/node-restify/test/plugins/multipart.test.js)
      at Runnable._timeoutError (/Users/astern/node-restify/node_modules/mocha/lib/runnable.js:442:10)
      at Timeout.<anonymous> (/Users/astern/node-restify/node_modules/mocha/lib/runnable.js:252:24)
      at listOnTimeout (node:internal/timers:564:17)
      at process.processTimers (node:internal/timers:507:7)

  3) multipart parser
       gh-847 body multipart files ok:
     Error: Timeout of 2000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves. (/Users/astern/node-restify/test/plugins/multipart.test.js)
      at Runnable._timeoutError (/Users/astern/node-restify/node_modules/mocha/lib/runnable.js:442:10)
      at Timeout.<anonymous> (/Users/astern/node-restify/node_modules/mocha/lib/runnable.js:252:24)
      at listOnTimeout (node:internal/timers:564:17)
      at process.processTimers (node:internal/timers:507:7)

  4) multipart parser
       body multipart ok custom handling:
     Error: Timeout of 2000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves. (/Users/astern/node-restify/test/plugins/multipart.test.js)
      at Runnable._timeoutError (/Users/astern/node-restify/node_modules/mocha/lib/runnable.js:442:10)
      at Timeout.<anonymous> (/Users/astern/node-restify/node_modules/mocha/lib/runnable.js:252:24)
      at listOnTimeout (node:internal/timers:564:17)
      at process.processTimers (node:internal/timers:507:7)

  5) multipart parser
       restify-GH-694 pass hash option through to Formidable:
     Error: Timeout of 2000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves. (/Users/astern/node-restify/test/plugins/multipart.test.js)
      at Runnable._timeoutError (/Users/astern/node-restify/node_modules/mocha/lib/runnable.js:442:10)
      at Timeout.<anonymous> (/Users/astern/node-restify/node_modules/mocha/lib/runnable.js:252:24)
      at listOnTimeout (node:internal/timers:564:17)
      at process.processTimers (node:internal/timers:507:7)

  6) multipart parser
       Ensure maxFileSize change is enforced:
     Error: Timeout of 2000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves. (/Users/astern/node-restify/test/plugins/multipart.test.js)
      at Runnable._timeoutError (/Users/astern/node-restify/node_modules/mocha/lib/runnable.js:442:10)
      at Timeout.<anonymous> (/Users/astern/node-restify/node_modules/mocha/lib/runnable.js:252:24)
      at listOnTimeout (node:internal/timers:564:17)
      at process.processTimers (node:internal/timers:507:7)



make: *** [test] Error 6

sternam avatar Dec 09 '22 17:12 sternam