-
-
Notifications
You must be signed in to change notification settings - Fork 142
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... |
| 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,})
}
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?