summaryrefslogtreecommitdiff
path: root/user/node/zlib-version-regex.patch
diff options
context:
space:
mode:
Diffstat (limited to 'user/node/zlib-version-regex.patch')
-rw-r--r--user/node/zlib-version-regex.patch31
1 files changed, 31 insertions, 0 deletions
diff --git a/user/node/zlib-version-regex.patch b/user/node/zlib-version-regex.patch
new file mode 100644
index 000000000..c06c4a938
--- /dev/null
+++ b/user/node/zlib-version-regex.patch
@@ -0,0 +1,31 @@
+This patch differs from upstream in the following:
+
+ * The regex is modified to support X.Y{,.Z} (upstream)
+ as opposed to custom subrevision X.Y.Z{,.n} (nodejs)
+
+From 43c332fd40293ecc621e74cae90c2565cecbcbd9 Mon Sep 17 00:00:00 2001
+From: Luigi Pinca <luigipinca@gmail.com>
+Date: Sun, 28 May 2023 07:57:21 +0200
+Subject: [PATCH] test: fix zlib version regex
+
+Add support for subrevision in the regular expression for the zlib
+version.
+
+Refs: https://github.com/madler/zlib/blob/48c3741002ac/zlib.h#L40
+---
+ test/parallel/test-process-versions.js | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/test/parallel/test-process-versions.js b/test/parallel/test-process-versions.js
+index f706bd060b45f..31886093df8cc 100644
+--- a/test/parallel/test-process-versions.js
++++ b/test/parallel/test-process-versions.js
+@@ -61,7 +61,7 @@ assert.match(process.versions.brotli, commonTemplate);
+ assert.match(process.versions.llhttp, commonTemplate);
+ assert.match(process.versions.node, commonTemplate);
+ assert.match(process.versions.uv, commonTemplate);
+-assert.match(process.versions.zlib, commonTemplate);
++assert.match(process.versions.zlib, /^\d+(\.\d+){1,2}(?:-.*)?$/);
+
+ if (hasUndici) {
+ assert.match(process.versions.undici, commonTemplate);