[Pkg-javascript-devel] Bug#1068932: bookworm-pu: package node-v8-compile-cache/2.3.0-3+deb12u1

Jérémy Lal kapouer at melix.org
Sat Apr 13 17:01:37 BST 2024


Package: release.debian.org
Severity: normal
Tags: bookworm
X-Debbugs-Cc: node-v8-compile-cache at packages.debian.org, Debian Javascript Maintainers <pkg-javascript-devel at lists.alioth.debian.org>
Control: affects -1 + src:node-v8-compile-cache
User: release.debian.org at packages.debian.org
Usertags: pu

[ Reason ]
FTBFS because of test failures, see #1068921
These are regressions caused by nodejs 18.19.0+dfsg-6~deb12u1

[ Impact ]
Only FTBFS

[ Tests ]
The tests are fixed, not skipped, so they will pass with
nodejs 18.19.0+dfsg-6~deb12u1 and node-undici 5.15.0+dfsg1+~cs20.10.9.3-1+deb12u4

[ Risks ]
Close to none

[ Checklist ]
  [x] *all* changes are documented in the d/changelog
  [x] I reviewed all changes and I approve them
  [x] attach debdiff against the package in (old)stable
  [x] the issue is verified as fixed in unstable

[ Changes ]
One patch that fixes the tests, consists of two commits cherr-picked,
and a small rewrite to allow the test to pass with nodejs 18.13 and 18.19.
-------------- next part --------------
diff -Nru node-v8-compile-cache-2.3.0/debian/changelog node-v8-compile-cache-2.3.0/debian/changelog
--- node-v8-compile-cache-2.3.0/debian/changelog	2022-11-22 13:06:02.000000000 +0100
+++ node-v8-compile-cache-2.3.0/debian/changelog	2024-04-13 17:52:45.000000000 +0200
@@ -1,3 +1,11 @@
+node-v8-compile-cache (2.3.0-3+deb12u1) UNRELEASED; urgency=medium
+
+  * Upload to bookworm-p-u
+  * patch: NativeCompileCache-test for Node 18.13 and 18.19
+    and fix test mock. Closes: #1068921
+
+ -- J?r?my Lal <kapouer at melix.org>  Sat, 13 Apr 2024 17:52:45 +0200
+
 node-v8-compile-cache (2.3.0-3) unstable; urgency=medium
 
   [ Debian Janitor ]
diff -Nru node-v8-compile-cache-2.3.0/debian/gbp.conf node-v8-compile-cache-2.3.0/debian/gbp.conf
--- node-v8-compile-cache-2.3.0/debian/gbp.conf	2022-11-22 13:06:02.000000000 +0100
+++ node-v8-compile-cache-2.3.0/debian/gbp.conf	2024-04-13 15:00:41.000000000 +0200
@@ -1,4 +1,5 @@
 [DEFAULT]
+debian-branch = debian/bookworm
 pristine-tar = True
 
 [import-orig]
diff -Nru node-v8-compile-cache-2.3.0/debian/patches/native-compile-cache-test.patch node-v8-compile-cache-2.3.0/debian/patches/native-compile-cache-test.patch
--- node-v8-compile-cache-2.3.0/debian/patches/native-compile-cache-test.patch	1970-01-01 01:00:00.000000000 +0100
+++ node-v8-compile-cache-2.3.0/debian/patches/native-compile-cache-test.patch	2024-04-13 17:51:42.000000000 +0200
@@ -0,0 +1,42 @@
+Description: fix this test to pass on nodejs 18.13 and 18.19
+Author: J?r?my Lal <kapouer at melix.org>
+Last-Update: 2024-04-13
+Forwarded: https://github.com/zertosh/v8-compile-cache/pull/49
+Origin: https://github.com/zertosh/v8-compile-cache/commit/de822a607c9dbe7cfc826a44c67fc5f82b03c9ca
+--- a/test/NativeCompileCache-test.js
++++ b/test/NativeCompileCache-test.js
+@@ -85,12 +85,14 @@
+ tap.test('deletes previously cached code when the cache is an invalid file', t => {
+   fakeCacheStore.has = () => true;
+   fakeCacheStore.get = () => Buffer.from('an invalid cache');
+-  let deleteWasCalledWith = null;
+-  fakeCacheStore.delete = arg => { deleteWasCalledWith = arg; };
++  let wasCalledWith = null;
++  fakeCacheStore.set = arg => { wasCalledWith = arg; };
++  // older v8 still calls delete, though
++  fakeCacheStore.delete = arg => { wasCalledWith = arg; };
+ 
+   const fn3 = require('./fixtures/file-3');
+ 
+-  t.equal(deleteWasCalledWith, require.resolve('./fixtures/file-3'));
++  t.equal(wasCalledWith, require.resolve('./fixtures/file-3'));
+   t.equal(fn3(), 3);
+ 
+   t.end();
+--- a/test/FileSystemBlobStore-mock.js
++++ b/test/FileSystemBlobStore-mock.js
+@@ -20,7 +20,14 @@
+   }
+ 
+   set(key, invalidationKey, buffer) {
++    const entry = this._cachedFiles.find(
++      file => file.key === key && file.invalidationKey === invalidationKey
++    );
++    if (entry == null) {
+     this._cachedFiles.push({key, invalidationKey, buffer});
++    } else {
++      entry.buffer = buffer;
++    }
+     return buffer;
+   }
+ 
diff -Nru node-v8-compile-cache-2.3.0/debian/patches/series node-v8-compile-cache-2.3.0/debian/patches/series
--- node-v8-compile-cache-2.3.0/debian/patches/series	2022-11-22 13:06:02.000000000 +0100
+++ node-v8-compile-cache-2.3.0/debian/patches/series	2024-04-13 15:00:41.000000000 +0200
@@ -1 +1,2 @@
 latest-tap.patch
+native-compile-cache-test.patch


More information about the Pkg-javascript-devel mailing list