fstream-npm
fstream-npm copied to clipboard
Generating malformed package under single-character directory
trafficstars
When publishing npm packages under a single-character folder in root directory, fstream-npm generates malformed tarball package without the "package" directory in package.tgz.
Check out https://github.com/npm/fstream-npm/blob/master/fstream-npm.js#L355
When publishing a package under e:/t/foo, entry.path.substr(h.length + 1) evaluates to /foo and entry.path then becomes e:/foo, while it was expected to be e:/package/foo.