Source: node-chartjs-adapter-date-fns
Version: 3.0.0-1
Severity: wishlist
Tags: patch
User: [email protected]
Usertags: timestamps
X-Debbugs-Cc: [email protected]

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
     `. `'`      [email protected] / chris-lamb.co.uk
       `-
--- 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 <[email protected]>
+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
-- 
Pkg-javascript-devel mailing list
[email protected]
https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/pkg-javascript-devel

Reply via email to