Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
| {@const runtimes = new Map(response.runtimes.map((r) => [r.$id, r]))} | ||
| {@const templates = quickStart.runtimes.filter((_template) => | ||
| runtimes.has(_template.name) | ||
| )} | ||
| {@const templates = quickStart.runtimes.filter((_template) => { | ||
| return response.runtimes.some((runtime) => | ||
| runtime.$id.includes(_template.name) | ||
| ); | ||
| })} |
There was a problem hiding this comment.
This looks like it reverted a previous change. We should make sure to use better data types when available to avoid doing n^2 operations (iterating over an array in an array).
There was a problem hiding this comment.
But now the template name is only going to include the language used not the version so has will not work anymore 🤔
There was a problem hiding this comment.
Then, maybe use the language as the map key. In general, we should try to avoid doing these nested iterations.
Also, we're back to discussing whether we should ignore the runtime version.
|
I think we can close this PR in favour of: #546 We came to conclusion we need to keep it version-aware. |
|
I've split the SMTP change out of this PR and moved it over #548 |
What does this PR do?
Fix function templates runtimes
Test Plan
Manual
Related Issues
Have you read the Contributing Guidelines on issues?
Yes