Subject: [javascript-team 2/2] gnu: node-lts: Update to 22.14.0 [security fixes].

From: Jelle Licht <[email-masked]>
Date: Fri, 7 Feb 2025 11:27:38 +0100

* gnu/packages/node.scm (node-lts): Update to 22.14.0.
[#:phases]<patch-problematic-tests>: New phase. Patch tests that fail when
trying to connect to the wrong address when using IPv6.

Change-Id: Icd93e2954d84824ff8b74ff58a24666c3de27e76
---
 gnu/packages/node.scm | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/node.scm b/gnu/packages/node.scm
index 6d6768e590..3e64d6ceb3 100644
--- a/gnu/packages/node.scm
+++ b/gnu/packages/node.scm
@@ -756,14 +756,14 @@ (define-public llhttp-bootstrap
 (define-public node-lts
   (package
     (inherit node-bootstrap)
-    (version "22.12.0")
+    (version "22.14.0")
     (source (origin
               (method url-fetch)
               (uri (string-append "https://nodejs.org/dist/v" version
                                   "/node-v" version ".tar.gz"))
               (sha256
                (base32
-                "1qrcn9hm85bmh81ircaa0vmxrqmiip1iwczvpsyn9sdn0b0ffmri"))
+                "12msprh604s6qdsgwymxw4kl8ivaldbaydf4v37lbp02aznk2kkc"))
               (modules '((guix build utils)))
               (snippet
                '(begin
@@ -902,6 +902,14 @@ (define-public node-lts
                            "test/parallel/test-process-initgroups.js"
                            "test/parallel/test-process-setgroups.js"
                            "test/parallel/test-process-uid-gid.js"))))
+           (add-after 'delete-problematic-tests 'patch-problematic-tests
+             (lambda _
+               ;; XXX: These tests seem to not work by default
+               (substitute*
+                   '("test/parallel/test-http2-premature-close.js"
+                     "test/parallel/test-http2-invalid-last-stream-id.js")
+                 (("client\\.connect\\(address\\)")
+                  "client.connect(address.port)"))))
            (add-after 'delete-problematic-tests 'replace-llhttp-sources
              (lambda* (#:key inputs #:allow-other-keys)
                ;; Replace pre-generated llhttp sources
-- 
2.48.1