svelte-adapter-azure-swa
svelte-adapter-azure-swa copied to clipboard
Move to latest Node version
Docs and demo app are still using Node 18.
20 is in preview at the moment https://learn.microsoft.com/en-us/azure/static-web-apps/languages-runtimes#api Would say not a high prio.
Node 18 will be EoS on May 31 2025 and Node 20 is not in preview anymore
@geoffrich I did the migration in my fork here: https://github.com/kt-public/svelte-adapter-azure-swa. I have not tested it with my project yet, demo-app works fine. But it's a massive update with a lot of automation (retry for azure, dependabot & generation of release notes, codeql, etc.). So maybe this should go not to main, but to a separate branch first, which you could review when you get the time and take over, what suits you. So let me know, if I should create a PR and to which branch.
@fuji97 If you under pressure, I published this experimental here: https://www.npmjs.com/package/svelte-adapter-azure-swa-next, but you may want to fix the exact version, cause I'm updating that one as I'm gonna proceed with my app.
Cheers, Konstantin
@ktarmyshov Thank you for the release, but I'm not under pressure until Azure doesn't completely remove node 18 from the available runtimes. I just want to be sure that eventually the adapter will be ported to node 20.
For my reference, this is the commit from the fork that moves to node 20: https://github.com/kt-public/svelte-adapter-azure-swa/commit/1281d72f4ced5a1a88f7e6ebece05eeaed6671e6
Hoping to test & release the change this week, but it's a busy week for me and could slip to next week.
If anyone needs the change sooner, you should be able to override the function's api runtime with the customStaticWebAppConfig option, e.g.
export default {
kit: {
...
adapter: azure({
customStaticWebAppConfig: {
platform: {
apiRuntime: 'node:20'
}
}
})
}
};
v0.22 generates a Node 20 Azure function for server rendering by default.