░▒▓████████████████████████████████▓▒░ ░▒▓█ ▓▒░ ░▒▓█ ~ S W A M P ~ ▓▒░ ░▒▓█ ▓▒░ ░▒▓████████████████████████████████▓▒░
pplmvsvm
LOCATION:
/usr/lib/node_modules/npm/node_modules/libnpmdiff/lib
☗ ROOT
↻ REFRESH
✎ CARVE FLESH
EDITING: tarball.js
const { relative } = require('path') const Arborist = require('@npmcli/arborist') const npa = require('npm-package-arg') const pkgContents = require('@npmcli/installed-package-contents') const pacote = require('pacote') const { tarCreateOptions } = pacote.DirFetcher const tar = require('tar') // returns a simplified tarball when reading files from node_modules folder, // thus avoiding running the prepare scripts and the extra logic from packlist const nodeModulesTarball = (manifest, opts) => pkgContents({ path: manifest._resolved, depth: 1 }) .then(files => files.map(file => relative(manifest._resolved, file)) ) .then(files => tar.c(tarCreateOptions(manifest), files).concat() ) const tarball = (manifest, opts) => { const resolved = manifest._resolved const where = opts.where || process.cwd() const fromNodeModules = npa(resolved).type === 'directory' && /node_modules[\\/](@[^\\/]+\/)?[^\\/]+[\\/]?$/.test(relative(where, resolved)) if (fromNodeModules) { return nodeModulesTarball(manifest, opts) } return pacote.tarball(manifest._resolved, { ...opts, Arborist, }) } module.exports = tarball
CANCEL
Name
Type
Size
Modified
Actions
↩ ..
DIR
—
—
📄 format-diff.js
JS
2.5 KB
2023-09-24 03:45
EDIT
📄 index.js
JS
1.2 KB
2023-09-24 03:45
EDIT
📄 should-print-patch.js
JS
516 B
2023-09-24 03:45
EDIT
📄 tarball.js
JS
1.1 KB
2023-09-24 03:45
EDIT
📄 untar.js
JS
2.3 KB
2023-09-24 03:45
EDIT