Skip to content

blerf does not work with scoped packages #2

@neumaennl

Description

@neumaennl

If you pack a scoped package using npm pack, the name of the tarball will be <scope>-<name>-<version>.tgz, e.g. npm pack @xmldom/xmldom results in the file xmldom-xmldom-0.8.6.tgz. npm pack also prints the filename to stdout.
Source: the npm documentation
When blerf tries to determine the path to a package tarball, it does not consider this. It simply does path.join(packagePath, packageJson.name + "-" + packageJson.version + ".tgz"), which results in path/to/@<scope>/<name>-<version>.tgz instead of path/to/<scope>-<name>-<version>.tgz.
For the above @xmldom/xmldom example that would be path/to/@xmldom/xmldom-0.8.6.tgz instead of path/to/xmldom-xmldom-0.8.6.tgz.
This of course results in all kinds of errors - mostly not finding files where it expects them.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions