node_runtime: Update to Node 20 (#27912)

Require a newer Node version to make Copilot work

Closes #27908

Release Notes:

- Breaking Change: If using system node Zed now requires Node >= v20.
Previously Node >= v18 was required. (Node v18 EOL date is 2025-04-30;
Node v19 EOL since 2023-06-01). Note: This does not change the Zed
bundled Node runtime version (still v23).
This commit is contained in:
Thorben Kröger 2025-04-07 21:47:04 +02:00 committed by GitHub
parent b6ee367ee0
commit 5996c58452
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -473,7 +473,7 @@ pub struct SystemNodeRuntime {
}
impl SystemNodeRuntime {
const MIN_VERSION: semver::Version = Version::new(18, 0, 0);
const MIN_VERSION: semver::Version = Version::new(20, 0, 0);
async fn new(node: PathBuf, npm: PathBuf) -> Result<Box<dyn NodeRuntimeTrait>> {
let output = util::command::new_smol_command(&node)
.arg("--version")