Scoped packages should be displayed using `/` separator, regardless of OS
nelson6e65 opened this issue ยท 7 comments
On Windows, qnm
displays scoped packages using \
separator instead of the name of the package on npm register. It should use @scope/name
instead of @scope\name
regardless of directory separator used by the operating system.
Example:
$ qnm doctor
size count module
------ ----- ----------
107.7mb 2 ๐ typescript
59.42mb 1 โ @firebase\firestore
49.97mb 1 โ cordova-plugin-ionic
41.68mb 55 ๐ source-map
20.78mb 1 โ @angular\core
20.31mb 2 ๐ @schematics\angular
18.74mb 1 โ @angular\compiler
18.57mb 37 ๐ postcss
18.16mb 1 โ firebase
16.83mb 1 โ prettier
15.65mb 1 โ @ionic\core
15.47mb 1 โ @stencil\core
13.46mb 3 ๐ rxjs
12.86mb 1 โ @firebase\database
12.44mb 1 โ @angular\common
12.16mb 1 โ @ionic\angular-toolkit
11.71mb 13 ๐ก ajv
9.36mb 1 โ @angular\compiler-cli
8.79mb 1 โ esbuild-wasm
8.54mb 1 โ npm
Hey @nelson6e65, thanks for opening this issue!
It seems that the logic on this line is wrong, instead of using the path
module, we should just join the directory name and the module name with /
regardless of the environment (windows/linux/mac).
I believe this will solve both this issue and #97
@nelson6e65 would you be interested in contributing a PR that fixes this?
Sure.
I don't know if you want I complete all Windows compatibility or merge #99 as a pre-fix (some tests are able to run, but others are still failing on Windows). ๐
@nelson6e65 yeah, it seems that I don't have a windows CI setup here, I'll try to add one soon (similar to this setup here).
Nice. I moved to GitHub Actions some time ago. ๐
In the meantime, I will continue on this issue later this night.