mirror of
https://github.com/LukeHagar/vercel.git
synced 2025-12-06 04:22:01 +00:00
[build-utils] Fix warn for ignored project settings node version (#11550)
There were scenarios where the warning "Node.js Version defined in your Project Settings ("18.x") will not apply" would not be triggered. For example:
1. Project Setting is 18.x
2. package.json has "engines.node": ">=18.x"
3. semver.intersects('18.x', '>=18.x') // => true (In this [code path](8ea93839cc/packages/build-utils/src/fs/run-user-scripts.ts (L258))) -> No warning message that Node.js Version was changed
4. After the error message we evaluate the latest node Version to use (20.x) in getSupportedNodeVersion()(this [code path](8ea93839cc/packages/build-utils/src/fs/run-user-scripts.ts (L274)))
5. User doesn't get notified that we changed the node version to something different than their project setting
This fixes that scenario by getting the supported node version first.
This commit is contained in:
5
.changeset/clean-ears-agree.md
Normal file
5
.changeset/clean-ears-agree.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@vercel/build-utils': patch
|
||||
---
|
||||
|
||||
Fix triggering of ignored project settings node version warning
|
||||
Reference in New Issue
Block a user