multer icon indicating copy to clipboard operation
multer copied to clipboard

convert package to commonjs

Open bjohansebas opened this issue 8 months ago • 3 comments

The package is being switched back to CommonJS since the new API is currently in ESM. For more information, see https://github.com/expressjs/discussions/pull/323

bjohansebas avatar May 11 '25 02:05 bjohansebas

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Updatedappend-field@​2.0.0 ⏵ 1.0.0100 +110079 -176 +1100

View full report

socket-security[bot] avatar May 11 '25 02:05 socket-security[bot]

@bjohansebas the reason I switched to ESM initially was in order to consume the file-type package (via stream-file-type)

Here is some more thoughts on it: https://github.com/expressjs/multer/issues/1042#issuecomment-973902270

Sorry for having been so slow to respond to things! Unfortunately I have had a very hectic time lately, and I no longer use Multer professionally so can't spend company time on it 😞

If you need any updates to stream-file-type I'd be happy to assist (could also lift it into appropriate org), or anything else you need here! Thank you for spending time on this 🙏

LinusU avatar May 15 '25 20:05 LinusU

Hey, thanks @LinusU for the historical reason, i hadn’t found it before.

Given that it’s really complicated to do, the options I see are:

  • Stick with ESM, we’d need to request an exception for this ADR
  • Move support to Node >=22.12, which would go against the LTS plan

I think the best option will be to stay with ESM.

bjohansebas avatar May 15 '25 21:05 bjohansebas