Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

blerf does not work with scoped packages #2

Open
neumaennl opened this issue Nov 17, 2022 · 0 comments · May be fixed by #3
Open

blerf does not work with scoped packages #2

neumaennl opened this issue Nov 17, 2022 · 0 comments · May be fixed by #3

Comments

@neumaennl
Copy link

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.

@neumaennl neumaennl linked a pull request Nov 17, 2022 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant