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

Fails on nodejs canary with Invalid version: "21.0.0-pre" #3388

Closed
reconbot opened this issue Sep 14, 2023 · 3 comments
Closed

Fails on nodejs canary with Invalid version: "21.0.0-pre" #3388

reconbot opened this issue Sep 14, 2023 · 3 comments

Comments

@reconbot
Copy link

Node Serialport is part of the nodejs CITGM project which ensures packages don't break on new versions of nodejs. We use esbuild as part of our build and test toolchain.

On this run on the CITGM test esbuild errors

 Error: Transform failed with 1 error:
 error: Invalid version: "21.0.0-pre"
     at failureErrorWithLog (/home/iojs/tmp/citgm_tmp/5cad9241-d27b-4657-8ce9-51dba97922c5/serialport/node_modules/esbuild/lib/main.js:1649:15)
     at /home/iojs/tmp/citgm_tmp/5cad9241-d27b-4657-8ce9-51dba97922c5/serialport/node_modules/esbuild/lib/main.js:847:29
     at responseCallbacks.<computed> (/home/iojs/tmp/citgm_tmp/5cad9241-d27b-4657-8ce9-51dba97922c5/serialport/node_modules/esbuild/lib/main.js:703:9)
     at handleIncomingPacket (/home/iojs/tmp/citgm_tmp/5cad9241-d27b-4657-8ce9-51dba97922c5/serialport/node_modules/esbuild/lib/main.js:762:9)
     at Socket.readFromStdout (/home/iojs/tmp/citgm_tmp/5cad9241-d27b-4657-8ce9-51dba97922c5/serialport/node_modules/esbuild/lib/main.js:679:7)
     at Socket.emit (node:events:514:28)
     at addChunk (node:internal/streams/readable:343:12)
     at readableAddChunk (node:internal/streams/readable:316:9)
     at Readable.push (node:internal/streams/readable:253:10)
     at Pipe.onStreamRead (node:internal/stream_base_commons:190:23)

Not a huge deal but if you would allow running when process.version is a canary it would help remove the noise in testing for nodejs releases. We're trying to clean it up nodejs/citgm#959 (comment) thanks!

@evanw
Copy link
Owner

evanw commented Sep 14, 2023

See #2760. The internal version database only has version triples, so there would be nothing to map it to even if esbuild did parse it. Are you proposing for esbuild to just silently ignore invalid input here?

@reconbot
Copy link
Author

I don't know what it's used for exactly but mapping to "close enough" behavior (with a warning perhaps?) in these undefined situations would be preferable to outright failing.

@evanw evanw closed this as completed in ea9c644 Sep 15, 2023
@reconbot
Copy link
Author

@evanw this will be very helpful, thank you

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

2 participants