Skip to content

Conversation

bjohansebas
Copy link
Member

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

Signed-off-by: Sebastian Beltran <[email protected]>
Copy link

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

@LinusU
Copy link
Member

LinusU commented May 15, 2025

@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: #1042 (comment)

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 🙏

const Busboy = require('@fastify/busboy')
const { createWriteStream } = require('fs-temp')
const _onFinished = require('on-finished')
const FileType = require('stream-file-type')
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(I believe that this will fail on Node.js versions that cannot require ESM modules)

@bjohansebas
Copy link
Member Author

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.

@UlisesGascon UlisesGascon added this to the 3.0.0 milestone May 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants