moment / luxon

⏱ A library for working with dates and times in JS
https://moment.github.io/luxon
MIT License
15.33k stars 730 forks source link

Nullish-coalescing operator not supported in Node v12 #1510

Open erwinw opened 1 year ago

erwinw commented 1 year ago

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

diesieben07 commented 1 year ago

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.

erwinw commented 1 year ago

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.

icambron commented 1 year ago

Agree. Let's bump up the support matrix

erwinw commented 8 months ago

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?

icambron commented 8 months ago

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