google / wireit

Wireit upgrades your npm/pnpm/yarn scripts to make them smarter and more efficient.
Apache License 2.0
6.05k stars 107 forks source link

Node 14.x Support (Vercel) #154

Closed mihar-22 closed 2 years ago

mihar-22 commented 2 years ago

I know it's wild but Vercel is still on 14.x. Currently deploys fail because of newer syntax such as logical nullish assignment being included in the distribution.

image

brendankenny commented 2 years ago

FWIW we were just taking a look at wireit for our increasingly hard-to-manage npm script ordering over in lighthouse. Our policy has settled over the years to supporting the Active and one Maintenance LTS (back to Node 14, currently), so this is a blocker for us.

The tsconfig switch to es2020 would be trivial, but it looks like there are a few Node 15+ features that might be annoying/not worth it to unwind (AggregateError and str.replaceAll especially). If you did want to expand support, maybe the easiest path would be to not remove Node 16 when it switches to maintenance in October and ease into supporting a maintenance release that way?

aomarks commented 2 years ago

Very fair, happy to expand support to cover 14. It is still a supported LTS after all.

You identified all the issues, yeah. All pretty trivial. Just need a ponyfill for AggregateError. Let's just write an inline one instead of adding a dep, since it's so simple.

aomarks commented 2 years ago

Just published 0.3.0 which supports Node 14.14.0 and above.

brendankenny commented 2 years ago

Awesome, thank you @aomarks!