Closed antongolub closed 5 months ago
The current directories.man handler allows to reach assets outside the package scope.
directories.man
// expand directories.man if (steps.includes('mans') && !data.man && data.directories?.man) { const manDir = data.directories.man const cwd = path.resolve(pkg.path, manDir) const files = await lazyLoadGlob()('**/*.[0-9]', { cwd }) data.man = files.map(man => path.relative(pkg.path, path.join(cwd, man)).split(path.sep).join('/') )
path.resolve(process.cwd(), '/') → '/' system root
Tests would normally be required but this use case is covered in https://github.com/npm/package-json/pull/100 which we'll be landing next.
What / Why
The current
directories.man
handler allows to reach assets outside the package scope.References