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

Unable to filter npmGlobalPackages on Windows #225

Open
kbrandwijk opened this issue Apr 15, 2022 · 1 comment
Open

Unable to filter npmGlobalPackages on Windows #225

kbrandwijk opened this issue Apr 15, 2022 · 1 comment

Comments

@kbrandwijk
Copy link
Contributor

When trying to filter for a single or array of npmGlobalPackages on Windows, there are never any results.

PS C:\Users\kimbr\dev> npx envinfo --npmGlobalPackages
npx: installed 1 in 1.124s
trace ["getnpmGlobalPackages",true]
trace ["getPackageJsonByFullPath","C:/Users/kimbr/AppData/Roaming/npm/node_modules/eas-cli/package.json"]
trace ["getPackageJsonByFullPath","C:/Users/kimbr/AppData/Roaming/npm/node_modules/expo-cli/package.json"]
trace ["getPackageJsonByFullPath","C:/Users/kimbr/AppData/Roaming/npm/node_modules/yarn/package.json"]
trace ["formatToYaml",{"_":[],"npmGlobalPackages":true,"console":true}]
trace ["clean",{"System":{},"Binaries":{},"Managers":{},"Utilities":{},"Servers":{},"Virtualization":{},"SDKs":{},"IDEs":{},"Languages":{},"Databases":{},"Browsers":{},"Monorepos":{},"npmPackages":{},"npmGlobalPackages":{"eas-cli":"0.45.0","expo-cli":"5.0.3","yarn":"1.22.17"}}]
trace ["clean",{"eas-cli":"0.45.0","expo-cli":"5.0.3","yarn":"1.22.17"}]
trace ["formatPackages"]
trace ["serializeArrays"]
trace ["serializeVersionsAndPaths"]
trace ["formatHeaders"]

  npmGlobalPackages:
    eas-cli: 0.45.0
    expo-cli: 5.0.3
    yarn: 1.22.17

trace ["formatToYaml",{"_":[],"npmGlobalPackages":true,"console":false}]
trace ["clean",{"System":{},"Binaries":{},"Managers":{},"Utilities":{},"Servers":{},"Virtualization":{},"SDKs":{},"IDEs":{},"Languages":{},"Databases":{},"Browsers":{},"Monorepos":{},"npmPackages":{},"npmGlobalPackages":{"eas-cli":"0.45.0","expo-cli":"5.0.3","yarn":"1.22.17"}}]
trace ["clean",{"eas-cli":"0.45.0","expo-cli":"5.0.3","yarn":"1.22.17"}]
trace ["formatPackages"]
trace ["serializeArrays"]
trace ["serializeVersionsAndPaths"]
PS C:\Users\kimbr\dev> npx envinfo --npmGlobalPackages yarn
npx: installed 1 in 1.152s
trace ["getnpmGlobalPackages","yarn"]
trace ["formatToYaml",{"_":[],"npmGlobalPackages":"yarn","console":true}]
trace ["clean",{"System":{},"Binaries":{},"Managers":{},"Utilities":{},"Servers":{},"Virtualization":{},"SDKs":{},"IDEs":{},"Languages":{},"Databases":{},"Browsers":{},"Monorepos":{},"npmPackages":{},"npmGlobalPackages":{}}]
trace ["formatPackages"]
trace ["serializeArrays"]
trace ["serializeVersionsAndPaths"]
trace ["formatHeaders"]

trace ["formatToYaml",{"_":[],"npmGlobalPackages":"yarn","console":false}]
trace ["clean",{"System":{},"Binaries":{},"Managers":{},"Utilities":{},"Servers":{},"Virtualization":{},"SDKs":{},"IDEs":{},"Languages":{},"Databases":{},"Browsers":{},"Monorepos":{},"npmPackages":{},"npmGlobalPackages":{}}]
trace ["formatPackages"]
trace ["serializeArrays"]
trace ["serializeVersionsAndPaths"]

A wildcard works:

PS C:\Users\kimbr\dev> npx envinfo --npmGlobalPackages yarn*
npx: installed 1 in 1.142s
trace ["getnpmGlobalPackages","yarn*"]
trace ["getPackageJsonByFullPath","C:/Users/kimbr/AppData/Roaming/npm/node_modules/yarn/package.json"]
trace ["formatToYaml",{"_":[],"npmGlobalPackages":"yarn*","console":true}]
trace ["clean",{"System":{},"Binaries":{},"Managers":{},"Utilities":{},"Servers":{},"Virtualization":{},"SDKs":{},"IDEs":{},"Languages":{},"Databases":{},"Browsers":{},"Monorepos":{},"npmPackages":{},"npmGlobalPackages":{"yarn":"1.22.17"}}]
trace ["clean",{"yarn":"1.22.17"}]
trace ["formatPackages"]
trace ["serializeArrays"]
trace ["serializeVersionsAndPaths"]
trace ["formatHeaders"]

  npmGlobalPackages:
    yarn: 1.22.17

trace ["formatToYaml",{"_":[],"npmGlobalPackages":"yarn*","console":false}]
trace ["clean",{"System":{},"Binaries":{},"Managers":{},"Utilities":{},"Servers":{},"Virtualization":{},"SDKs":{},"IDEs":{},"Languages":{},"Databases":{},"Browsers":{},"Monorepos":{},"npmPackages":{},"npmGlobalPackages":{"yarn":"1.22.17"}}]
trace ["clean",{"yarn":"1.22.17"}]
trace ["formatPackages"]
trace ["serializeArrays"]
trace ["serializeVersionsAndPaths"]

Because a wildcard works, this leads me to believe that the issue happens somewhere here:
https://github.com/tabrindle/envinfo/blob/main/src/packages.js#L184

But it's hard for me to debug any further from the consuming app.

@kbrandwijk
Copy link
Contributor Author

Is there any interest to address 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

No branches or pull requests

1 participant