[Pkg-javascript-devel] Bug#1139656: node-chartjs-adapter-date-fns: please make the build reproducible

Chris Lamb lamby at debian.org
Wed Jun 10 17:52:53 BST 2026


Source: node-chartjs-adapter-date-fns
Version: 3.0.0-1
Severity: wishlist
Tags: patch
User: reproducible-builds at lists.alioth.debian.org
Usertags: timestamps
X-Debbugs-Cc: reproducible-bugs at lists.alioth.debian.org

Hi,

Whilst working on the Reproducible Builds effort [0], we noticed that
node-chartjs-adapter-date-fns could not be built reproducibly.

Patch attached.

 [0] https://reproducible-builds.org/


Regards,

-- 
      ,''`.
     : :'  :     Chris Lamb
     `. `'`      lamby at debian.org / chris-lamb.co.uk
       `-
-------------- next part --------------
--- a/debian/patches/reproducible-build.patch	1969-12-31 16:00:00.000000000 -0800
--- b/debian/patches/reproducible-build.patch	2026-06-10 09:30:30.458211182 -0700
@@ -0,0 +1,20 @@
+Description: Make the build reproducible
+Author: Chris Lamb <lamby at debian.org>
+Last-Update: 2026-06-10
+
+--- node-chartjs-adapter-date-fns-3.0.0.orig/rollup.config.js
++++ node-chartjs-adapter-date-fns-3.0.0/rollup.config.js
+@@ -4,10 +4,12 @@ const { readFileSync } = require('fs');
+ 
+ const {name, version, homepage, main, license} = JSON.parse(readFileSync('./package.json'));
+ 
++const epoch = Number(process.env["SOURCE_DATE_EPOCH"]);
++const timestamp = Number.isInteger(epoch) ? new Date(epoch * 1000) : new Date();
+ const banner = `/*!
+  * ${name} v${version}
+  * ${homepage}
+- * (c) ${new Date().getFullYear()} chartjs-adapter-date-fns Contributors
++ * (c) ${new Date().getUTCFullYear()} chartjs-adapter-date-fns Contributors
+  * Released under the ${license} license
+  */`;
+ 
--- a/debian/patches/series	2026-06-10 09:28:26.152013217 -0700
--- b/debian/patches/series	2026-06-10 09:30:29.060307825 -0700
@@ -1 +1,2 @@
 fix-for-rollup-3.patch
+reproducible-build.patch


More information about the Pkg-javascript-devel mailing list