Conversation
This adds a couple of minor fixes for reducing errors we're seeing in
production:
- Sessions can be `{}`, in which case, our types are incorrect
- When a module imports a built-in, the docs resolver tries to load it
from `esm.sh`
- Use `URL.parse` instead of a try/catch
|
The latest updates on your projects. Learn more about Vercel for GitHub.
2 Skipped Deployments
|
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
📝 WalkthroughWalkthroughThe pull request contains three related changes to OAuth session handling and module resolution. In 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 |
|
|
||
| const currentSession = serverSession.data | ||
| if (!currentSession) return { oauthSession: undefined, serverSession } | ||
| // TODO (jg): why can a session be `{}`? |
There was a problem hiding this comment.
Remove the TODO or track it outside the code.
This comment doesn’t explain complex logic and should be moved to an issue tracker or removed.
As per coding guidelines, "Add comments only to explain complex logic or non-obvious implementations".
| pds: string | ||
| avatar?: string | ||
| } | ||
| | undefined |
This adds a couple of minor fixes for reducing errors we're seeing in
production:
{}, in which case, our types are incorrectfrom
esm.shURL.parseinstead of a try/catch