PHP 8.2.30
Preview: tar-create-options.js Size: 914 B
/proc/self/root/opt/alt/alt-nodejs19/root/lib/node_modules/npm/node_modules/pacote/lib/util/tar-create-options.js

const isPackageBin = require('./is-package-bin.js')

const tarCreateOptions = manifest => ({
  cwd: manifest._resolved,
  prefix: 'package/',
  portable: true,
  gzip: {
    // forcing the level to 9 seems to avoid some
    // platform specific optimizations that cause
    // integrity mismatch errors due to differing
    // end results after compression
    level: 9,
  },

  // ensure that package bins are always executable
  // Note that npm-packlist is already filtering out
  // anything that is not a regular file, ignored by
  // .npmignore or package.json "files", etc.
  filter: (path, stat) => {
    if (isPackageBin(manifest, path)) {
      stat.mode |= 0o111
    }
    return 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'),
})

module.exports = tarCreateOptions

Directory Contents

Dirs: 0 × Files: 6

Name Size Perms Modified Actions
427 B lrw-r--r-- 2023-12-06 18:07:51
Edit Download
515 B lrw-r--r-- 2023-12-06 18:07:51
Edit Download
824 B lrw-r--r-- 2023-12-06 18:07:51
Edit Download
567 B lrw-r--r-- 2023-12-06 18:07:51
Edit Download
914 B lrw-r--r-- 2023-12-06 18:07:51
Edit Download
238 B lrw-r--r-- 2023-12-06 18:07:51
Edit Download

If ZipArchive is unavailable, a .tar will be created (no compression).