lwc icon indicating copy to clipboard operation
lwc copied to clipboard

Specify the minimum supported version of Node in `engines`

Open nolanlawson opened this issue 4 months ago • 1 comments

Our engines is woefully out of date:

https://github.com/salesforce/lwc/blob/1dba7074b4963ade06e872ef6cbb74b955aca377/package.json#L82-L84

... and this is in our root package.json which isn't actually published to npm, so it doesn't do anything.

Instead, we should specify an engines like this across all our packages:

 "engines": { 
     "node": ">=18" 
 }, 

Arguably we should do this as a breaking change and just take this opportunity to bump our minimum supported Node version as well. Up to now, we have not really done a great job of communicating our minimum required version of Node, nor have we actually tested in multiple Node versions or bumped our major version when we dropped support for an older Node version. We should be more explicit about this.

See also: #4149

nolanlawson avatar Apr 15 '24 21:04 nolanlawson

Running npm install global-jsdom jsdom lwc && node -r global-jsdom/register -e 'import("lwc").then(()=>console.log("success"))' only succeeds for v16+.

wjhsf avatar Apr 18 '24 20:04 wjhsf