From c2a3fce35efee9ef34431d0d1539805569a023b1 Mon Sep 17 00:00:00 2001 From: Alan Agius <17563226+alan-agius4@users.noreply.github.com> Date: Wed, 6 May 2026 13:23:14 +0000 Subject: [PATCH] fix(@angular/cli): update odd-numbered Node.js version warning condition for future releases Updates the condition in `ng.js` to only print the odd-numbered version warning for Node.js versions below v26 (e.g., v25). This aligns with changes to the LTS status policy starting from Node.js 27, ensuring future odd-numbered releases do not trigger this specific warning. --- packages/angular/cli/bin/ng.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/angular/cli/bin/ng.js b/packages/angular/cli/bin/ng.js index 7303a5c05632..9668d5917d73 100755 --- a/packages/angular/cli/bin/ng.js +++ b/packages/angular/cli/bin/ng.js @@ -45,13 +45,13 @@ if (rawCommandName === '--get-yargs-completions' || rawCommandName === 'completi // These would then crash with a hard to diagnose error message. const [major] = process.versions.node.split('.', 1).map((part) => Number(part)); -if (major % 2 === 1) { +if (major === 23 || major === 25) { // Allow new odd numbered releases with a warning. console.warn( 'Node.js version ' + process.version + ' detected.\n' + - 'Odd numbered Node.js versions will not enter LTS status and should not be used for production.' + + 'Prior to version 27, odd numbered Node.js versions will not enter LTS status and should not be used for production.' + ' For more information, please see https://nodejs.org/en/about/previous-releases/.', );