ladjs / superagent

Ajax for Node.js and browsers (JS HTTP client). Maintained for @forwardemail, @ladjs, @spamscanner, @breejs, @cabinjs, and @lassjs.
https://ladjs.github.io/superagent/
MIT License
16.58k stars 1.33k forks source link

build: update formidable to 2.0.1 #1651

Closed wopian closed 2 years ago

wopian commented 2 years ago

The Make file doesn't run tests correctly for me (with fresh clone with yarn install && yarn test or after changes with yarn install && yarn test) so unable to test locally - almost all of the tests fail with "Error: Forbidden" when I checkout the master branch

Edit: CI tests via Travis aren't running either as Travis shut down travis-ci.org back in June this year, so the project needs to move to travis-ci.com with limited open source credits (though they have dubious security practises of late) or switch to GitHub Actions.

Closes #1650 #1609

purejgleason commented 2 years ago

Can we get a move on this?

purejgleason commented 2 years ago

Also why not just go all the way to 3?

wopian commented 2 years ago

Also why not just go all the way to 3?

2.x is the @latest tag on NPM.

3.x is re-written as an ES Module (not a dual ESM/CJS package), a breaking change for superagent users in an environment that does not support, or can't parse, ESM.

purejgleason commented 2 years ago

Also why not just go all the way to 3?

2.x is the @latest tag on NPM.

3.x is re-written as an ES Module (not a dual ESM/CJS package), a breaking change for superagent users in an environment that does not support, or can't parse, ESM.

If you will entertain 1 more question what is the reason supertest can't go full ESM stack? What still relies on CommonJS

niftylettuce commented 2 years ago

I don't support ESM (nor TypeScript) right now

niftylettuce commented 2 years ago

Tests seem to be broken right now, possible due to this PR or 3c9c0f7feef61328131ae43b06e628bce1c20c17 (related to #1267).

If someone can fix and submit a PR, then I can publish a new release of this package to npm.

You can reproduce by cloning this repo, running yarn, and then yarn test or just make test works.

jimmywarting commented 2 years ago

I don't support ESM (nor TypeScript) right now

fyi, esm packages can be lazy imported from cjs using import('formidable').then(...)

lowest nodejs support for dynamic import is v12.17 (12.20 cuz formidable includes node: prefixes)