Skip to content
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

What were the major breaking changes between 2.0.0-alpha.x and 2.0.0-rc.x? #1160

Closed
titanism opened this issue Nov 22, 2022 · 6 comments
Closed

Comments

@titanism
Copy link

When we run the tests for our project parse-request - it appears that the tests work fine with multer@2.0.0-alpha.7, however when we install multer@2.0.0-rc.2 (or the latest) it appears that they are breaking.

We are testing with Node v16.x and we could not gather from the changelog/release log what the major breaking changes were or why this would be caused. Basically the route middleware hang when you install 2.0.0-rc.2 vs. alpha 7.

@titanism
Copy link
Author

It appears that there are also issues with 2.0.0-alpha.7. We're investigating and will follow up once we figure out what's actually happening.

TypeError [ERR_INVALID_ARG_TYPE]: The &quot;path&quot; argument must be of type string or an instance of Buffer or URL. Received null<br> &nbsp; &nbsp;at __node_internal_captureLargerStackTrace (node:internal/errors:465:5)<br> &nbsp; &nbsp;at new NodeError (node:internal/errors:372:5)<br> &nbsp; &nbsp;at __node_internal_ (node:internal/fs/utils:671:11)<br> &nbsp; &nbsp;at TempWriteStream.WriteStream (node:internal/fs/streams:325:5)<br> &nbsp; &nbsp;at new TempWriteStream (/Users/user/Projects/parse-request/node_modules/.pnpm/fs-temp@1.2.1/node_modules/fs-temp/lib/write-stream.js:6:15)<br> &nbsp; &nbsp;at Object.createWriteStream (/Users/user/Projects/parse-request/node_modules/.pnpm/fs-temp@1.2.1/node_modules/fs-temp/lib/temp.js:121:10)<br> &nbsp; &nbsp;at /Users/user/Projects/parse-request/node_modules/.pnpm/multer@2.0.0-alpha.7/node_modules/multer/lib/read-body.js:71:31<br> &nbsp; &nbsp;at processTicksAndRejections (node:internal/process/task_queues:96:5)

@titanism
Copy link
Author

Ah, it appears #995 is directly related to the previous comment.

@titanism
Copy link
Author

And the fix is now published under ESM only, so this is completely breaking...

@titanism
Copy link
Author

Reference 08d0c24#r90667041

@titanism
Copy link
Author

We started to rewrite and backport to CJS, however after publishing https://github.com/ladjs/node-append-field/releases/tag/v3.0.0 we see that there's also fs-temp and random-path, plus possible others, that are all now ESM only. This is disastrous for the community and for projects who don't have the resources to do complete ESM rewrites.

@titanism
Copy link
Author

Closing as we're using fix-esm instead.

https://gist.github.com/joepie91/bca2fda868c1e8b2c2caf76af7dfcad3

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

No branches or pull requests

1 participant