From 58d2aa58d5f9c4db49f57a5f33952b3106778669 Mon Sep 17 00:00:00 2001 From: isaacs Date: Mon, 12 Mar 2018 14:31:37 -0700 Subject: [PATCH] pack: use a specific mtime when packing (#20027) > Thank god I found you. Listen, can you meet me at Twin Pines Mall > tonight at 1:15? I've made a major breakthrough, I'll need your > assistance. Fixes: #19933 Fixes: #19968 PR-URL: https://github.com/npm/npm/pull/20027 Credit: @isaacs Reviewed-By: @zkat --- lib/pack.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/pack.js b/lib/pack.js index 568345392c4..b6a08d86506 100644 --- a/lib/pack.js +++ b/lib/pack.js @@ -120,7 +120,9 @@ function packDirectory (mani, dir, target) { cwd: dir, prefix: 'package/', portable: true, - noMtime: true, + // Provide a specific date in the 1980s for the benefit of zip, + // which is confounded by files dated at the Unix epoch 0. + mtime: new Date('1985-10-26T08:15:00.000Z'), gzip: true }