Skip to content

Exception for Multer to release v2 with ESM #381

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
bjohansebas opened this issue May 15, 2025 · 5 comments
Open

Exception for Multer to release v2 with ESM #381

bjohansebas opened this issue May 15, 2025 · 5 comments

Comments

@bjohansebas
Copy link
Member

bjohansebas commented May 15, 2025

Hi, I would like to request an exception for the ESM/CommonJS ADR (#323) to release Multer version 2, since one of its dependencies is ESM (https://www.npmjs.com/package/file-type), which makes this module unable to be CommonJS.

The other option is to fork file-type and convert it to CommonJS, but do we really want that? Or look for an alternative to that package, or move the support of v2 to Node >= 22.12 (which would go against the LTS plan).

Ref:

cc: @expressjs/express-tc @expressjs/multer-collaborators @UlisesGascon @LinusU

@ljharb
Copy link
Contributor

ljharb commented May 15, 2025

why not just use a pre-ESM major? That's what most of the ecosystem does with ESM-only packages.

@ctcpip
Copy link
Member

ctcpip commented May 15, 2025

must be outdated comments because we don't use that dependency so this is a non-issue

@ctcpip
Copy link
Member

ctcpip commented May 15, 2025

also, please note that multer v2 is going to be a security release using the v1 API due to breaking changes. the new API, which was slated for v2, is going to need to go into v3 (or later)

@bjohansebas
Copy link
Member Author

@ctcpip It is used, behind (https://www.npmjs.com/package/stream-file-type), which depends on the new version (https://github.com/expressjs/multer/blob/d983eb219979ec41936fd29d9db24e51fad9d0f3/package.json#L30)

@ctcpip
Copy link
Member

ctcpip commented May 15, 2025

ah, ok

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants