-
Notifications
You must be signed in to change notification settings - Fork 57
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: set node version for astro #5269
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks Ed! 🚢
@@ -27,13 +27,18 @@ export class Astro extends BaseFramework implements Framework { | |||
dark: '/logos/astro/dark.svg', | |||
} | |||
|
|||
env = { | |||
NODE_VERSION: '18', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mhm I think we should check if a node version is already set in the environment variables. What if a user wants to use node 20?
So we should first check if a node version is set that is larger than 18 and if an environment variable is set.
There are basically 2 ways to set a node version through the UI (should be available through the this.project.getCurrentNodeVersion
and this.project.getEnv('NODE_VERSION')
if the user set's the env variable we should not set it regardless of if it is greater or not
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah thats a great point, just looked at how the other frameworks did it and went with that. I vaguely remember being told the user's will always be respected, but hey
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Based on that comment: https://github.com/netlify/build/pull/5269/files#r1331442277
https://docs.astro.build/en/guides/upgrade-to/v3/#removed-support-for-node-16