source: trip-planner-front/node_modules/pacote/lib/util/tar-create-options.js@ fa375fe

Last change on this file since fa375fe was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago

initial commit

  • Property mode set to 100644
File size: 905 bytes
Line 
1const isPackageBin = require('./is-package-bin.js')
2
3const tarCreateOptions = manifest => ({
4 cwd: manifest._resolved,
5 prefix: 'package/',
6 portable: true,
7 gzip: {
8 // forcing the level to 9 seems to avoid some
9 // platform specific optimizations that cause
10 // integrity mismatch errors due to differing
11 // end results after compression
12 level: 9
13 },
14
15 // ensure that package bins are always executable
16 // Note that npm-packlist is already filtering out
17 // anything that is not a regular file, ignored by
18 // .npmignore or package.json "files", etc.
19 filter: (path, stat) => {
20 if (isPackageBin(manifest, path))
21 stat.mode |= 0o111
22 return true
23 },
24
25 // Provide a specific date in the 1980s for the benefit of zip,
26 // which is confounded by files dated at the Unix epoch 0.
27 mtime: new Date('1985-10-26T08:15:00.000Z'),
28})
29
30module.exports = tarCreateOptions
Note: See TracBrowser for help on using the repository browser.