Repository navigation
feat(vercel): auto-detect runtime version - #879
Conversation
436eeb1 to
5c6c601
Compare
|
@smaeda-ks any news on this PR? We really need this in a prod env. |
|
@smaeda-ks Can we split auto detection part to merge new configuration sooner? 🙏🏼 |
This PR adds a few new environment variables for project settings. This allows frameworks targeting the [Build Output API](https://vercel.com/docs/build-output-api/v3) to read data that is normally only available in through the `config` object when developing a [Builder/Runtime](https://github.com/vercel/vercel/blob/main/DEVELOPING_A_RUNTIME.md). This will also solve the problem of old Builders/Runtimes that never passed the `config` through to `getNodeVersion()`. - Related to nitrojs/nitro#879
49d2c3c to
5df76ca
Compare
5df76ca to
9eb9e29
Compare
|
Hi! Is there any updates on this? Today we are going to release Nitropack 2.1 / Nuxt 3.2 |
|
Do we have example code that reproduces this issue? How can we confirm this PR fixes the issue? |
34722b9 to
8e90828
Compare
Codecov Report
@@ Coverage Diff @@
## main #879 +/- ##
==========================================
+ Coverage 67.79% 67.81% +0.01%
==========================================
Files 59 59
Lines 6003 6005 +2
Branches 679 679
==========================================
+ Hits 4070 4072 +2
Misses 1924 1924
Partials 9 9
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
styfle
left a comment
There was a problem hiding this comment.
Looks good, thanks!
Lets try it out with a real deployment and try setting engines to see if that is respected.
|
Tested that the PR works as expected: smaeda-ks/nuxt3-vercel-nitropack-pr-879#1 |
|
Awesome! It works! :) Thank you guys so much! |
Currently, it's setting
nodejs16.xstatically, so any serverless functions are deployed with Node.js v16.x regardless of the project's Node version setting:https://vercel.com/docs/concepts/functions/serverless-functions/runtimes/node-js#node.js-version
This PR changes the behavior and starts producing the
.vc-config.jsonfile (for Vercel Build Output API) with the running OS's Node runtime version. This prevents Node version mismatch between build time and runtime.🔗 Linked issue
❓ Type of change
📚 Description
📝 Checklist