summaryrefslogtreecommitdiff
path: root/user/node/zlib-version-regex.patch
diff options
context:
space:
mode:
authorZach van Rijn <me@zv.io>2023-09-14 15:06:17 -0500
committerZach van Rijn <me@zv.io>2023-09-14 22:17:30 -0500
commit4d290403fcae001bca45154271f4b344e503e57e (patch)
tree09e220328d560b4c54530f3d47fe9cc6727999d3 /user/node/zlib-version-regex.patch
parent747046784c07d8e5aee181ed0e0b4a04e15467e8 (diff)
downloadpackages-4d290403fcae001bca45154271f4b344e503e57e.tar.gz
packages-4d290403fcae001bca45154271f4b344e503e57e.tar.bz2
packages-4d290403fcae001bca45154271f4b344e503e57e.tar.xz
packages-4d290403fcae001bca45154271f4b344e503e57e.zip
user/node: add patch for zlib version check. fixes #1055.
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);