nuxt / cli

⚡️ Nuxt Generation CLI Experience.
https://github.com/nuxt/cli/discussions/3
MIT License
271 stars 66 forks source link

fix(#518): Find auth token associated to the registry #536

Closed tkjaergaard closed 1 month ago

tkjaergaard commented 1 month ago

🔗 Linked issue

518

❓ Type of change

📚 Description

This PR adresses a bug where the fetch request dosen't take the authToken of the found registry into account. This fix will use the .npmrc(s) to first find the registry and then search for an associated authToken.

Unfortunately npm.pkg.github.com dosen't support fetching a specific version like the NPM registry like: /<pkgName>/latest. So i we-wrote to use the /<pkgName> endpoint and then find the desired version meta data.

codecov-commenter commented 1 month ago

Codecov Report

Attention: Patch coverage is 0% with 48 lines in your changes missing coverage. Please review.

Please upload report for BASE (main@d032c67). Learn more about missing BASE report.

Files with missing lines Patch % Lines
src/commands/module/add.ts 0.00% 48 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #536 +/- ## ====================================== Coverage ? 1.29% ====================================== Files ? 44 Lines ? 2850 Branches ? 44 ====================================== Hits ? 37 Misses ? 2771 Partials ? 42 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.