next.js icon indicating copy to clipboard operation
next.js copied to clipboard

Correct parseNodeArgs and formatNodeOptions processing of NODE_OPTIONS

Open martinjlowm opened this issue 4 months ago • 1 comments

This doesn't fix any reported issue - a reproducible link was not applicable for this case hence why I didn't create an issue (sounded like a hard requirement).

What?

--r= is an invalid value if passed to NODE_OPTIONS which could've been the outcome previously from -r file.js, because all options were forcefully prefixed with -- that could lead to such invalid options.

Why?

parseNodeArgs and formatNodeOptions currently does not account for short options that also may have values and not simply be a boolean.

How?

The implementations now uses the token "rawName" to include single or double dashes and accounts for there being repeated options by storing values in an array.

martinjlowm avatar Oct 23 '24 21:10 martinjlowm