-
-
Notifications
You must be signed in to change notification settings - Fork 186
feat: unifying npm registry requests with caching #641
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
base: main
Are you sure you want to change the base?
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
2 Skipped Deployments
|
…ests # Conflicts: # app/composables/useNpmRegistry.ts # app/utils/package-name.ts
This reverts commit fe1fd2d.
|
this looks good! would you investigate why the browser tests might be failing? |
Working on it. Maybe you know what the issue is. e.g. the org page is broken. https://npmxdev-git-fork-orbisk-feat-concept-npm-requests-poetry.vercel.app/@nuxt
|
|
I think the problem is that I think I have a fix. |
|
I am super confused. Are |
|
Okay. The request returns the data and 200 but cors is still blocking it 🤔 |
|
$npmRegistry should be idempotent, yes. (it should be safe to call in either case) if there's stale data (or missing data) from the server, then it will refetch on the client |
|
Progress: I have fixed it locally. But i am not sure how... |
app/composables/useNpmRegistry.ts
Outdated
| const { $npmApi } = useNuxtApp() | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@danielroe this line seems to be the problem.
replacing it by a simple mock "fixes" the issue. Any ideas 😅
const $npmApi = ()=>{
return Promise.resolve({data: null,})
}
Welcome to Codecov 🎉Once you merge this PR into your default branch, you're all set! Codecov will compare coverage reports and display results in all future pull requests. ℹ️ You can also turn on project coverage checks and project coverage reporting on Pull Request comment Thanks for integrating Codecov - We've got you covered ☂️ |
📝 WalkthroughWalkthroughThis pull request replaces direct NPM registry/API usage with Nuxt-injected runtime helpers ( Possibly related PRs
Suggested reviewers
🚥 Pre-merge checks | ✅ 1✅ Passed checks (1 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
Comment |
|
caught it up from main for you @OrbisK (lots of conflicts) code has moved around a fair bit so can you have a read through again to be sure its all good? |
looks good. 👍🏽 Not sure how to fix the Nuxt instance issue though. I think this might be a Nuxt bug. |

I think it is not an easy change to refactor all npm requests to
useNpmRegistry(yet). As a first step, we could migrate all npm requests to$npmRegistryand$npmApi. Wdyt?