luxon
luxon copied to clipboard
Nullish-coalescing operator not supported in Node v12
According to the package.json Luxon supports Node v12+, but the nullish coalescing operator is used, which is not supported before Node v14.
While you are correct, I would argue that this an issue with our outdated support matrix. Node 12 is EOL since April 2022 (over a year ago) and I don't think we should be supporting it anymore.
Not disagreeing, just bumped into the use of the ??
due to webpack (though that is unrelated), then noticed the mismatch between the support matrix and the engine support for ??
and decided to file. Personally I totally agree with what you're suggesting.
Also, thanks for the swift response, much appreciated.
Agree. Let's bump up the support matrix
Hey, would you like me to close this issue or create a PR to update the support matrix? I guess this would also require bumping the engine
entry in the package.json, and maybe a change log entry, a major version bump, ... so not sure if & how you would like me to proceed?
@erwinw A PR altering the support matrix in that md file and changing the engine is package.json is the right thing to do.
I don't think we need a version bump:
- for one, as you point out, it doesn't work today, so bumping the version doesn't help.
- dropping support is more a social thing than a technical thing; old versions that work still work, new ones unambiguously won't, but the point is that we won't fix things that break in Node 12. That signal is true for both old and new versions, so I don't think the version number signifies anything, i.e. we're not going to fix Node 12 bugs in old versions either.