From 7302686bcc5798ed73f8d26883d65f63a85acfe7 Mon Sep 17 00:00:00 2001 From: isaacs Date: Mon, 12 Mar 2018 09:59:17 -0700 Subject: [PATCH] pack: use a specific mtime when packing > 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 }