netlify / zip-it-and-ship-it

Intelligently prepare Node.js Lambda functions for deployment

Home Page:https://www.npmjs.com/package/@netlify/zip-it-and-ship-it

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Node 16 not being used for esbuild target

hrishikesh-k opened this issue · comments

- Do you want to request a feature or report a bug?

A bug

- What is the current behavior?

Even if a user has configured Node 16 to be used in their site by:

  1. Setting their build's Node Version to 16 (irrelevant) OR
  2. Setting their Functions' Runtime version to nodejs16.x (variable in UI and TOML - TOML one being irrelevant)

We still set the target as Node 14. This results in failures like these.

- If the current behavior is a bug, please provide the steps to reproduce.

  1. Create a JS/TS file with content: await Promise.resolve('foo').
  2. Try bundling it with esbuild.

- What is the expected behavior?

The Function should use Node 16 if configured. Considering that's going to be the default version by next week, it's probably going to be used more.

- Please mention your node.js, and operating system version.

N/A

commented

@Skn0tt Happy to see that is merged :) Sorry to pester, but how long after merging until this is deployed to Netlify?

Hi Andy 👋 Normally it takes a couple of hours, but I speeded it up for you :D Deployed it a second ago. Please check if your bug is resolved, and ping back if there's anything else missing!

commented

Thanks!