luxon icon indicating copy to clipboard operation
luxon copied to clipboard

Nullish-coalescing operator not supported in Node v12

Open erwinw opened this issue 1 year ago • 5 comments

According to the package.json Luxon supports Node v12+, but the nullish coalescing operator is used, which is not supported before Node v14.

erwinw avatar Sep 17 '23 15:09 erwinw

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.

diesieben07 avatar Sep 17 '23 15:09 diesieben07

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.

erwinw avatar Sep 17 '23 16:09 erwinw

Agree. Let's bump up the support matrix

icambron avatar Sep 19 '23 12:09 icambron

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 avatar Feb 06 '24 09:02 erwinw

@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:

  1. for one, as you point out, it doesn't work today, so bumping the version doesn't help.
  2. 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.

icambron avatar Feb 06 '24 19:02 icambron