nwolverson / purescript-language-server

MIT License
183 stars 41 forks source link

Node 14+ is required engine #162

Closed toastal closed 2 years ago

toastal commented 2 years ago

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Optional_chaining

Optional chaining is not supported by Node 12. 14 is current LTS so no big issue.

nwolverson commented 2 years ago

What is the relevance of optional chaining? I guess this has been added in some dependency, but I cannot see which one - none of those that declare engines have a requirement > 10, and the only ones I can see ?. appear are pre-transpiled

toastal commented 2 years ago

Hmm... that would make sense.

https://github.com/justinwoo/easy-purescript-nix/pull/172

This merge request was opened to upgrade easy-purescirpt-nix to the latest version and it (currently) uses node2nix and not the compiled JS blob. The version had to be bumped from 12 to 14 because of some dependency down the line was using optional chaining. Bumping to 14 fixed it for the build for easy-purescript-nix. Maybe this isn't relevant, but it was done there so it seemed like the right thing to bump here too.

nwolverson commented 2 years ago

Oddly that's failing on a module vscode-jsonrpc which states

  "engines": {
    "node": ">=8.0.0 || >=10.0.0"
  },

But contains the problematic feature.

nwolverson commented 2 years ago

Thanks for the report, I'll bring it up on that module's repo.