-
-
Notifications
You must be signed in to change notification settings - Fork 4k
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
fix(website): doc links to other packages #9994
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 2 Ignored Deployments
|
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #9994 +/- ##
==========================================
- Coverage 58.89% 58.79% -0.11%
==========================================
Files 240 240
Lines 17003 17033 +30
Branches 1240 1240
==========================================
Hits 10014 10014
- Misses 6944 6974 +30
Partials 45 45
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
version={ | ||
resolved?.package | ||
? // eslint-disable-next-line unicorn/better-regex | ||
item.getAssociatedPackage()?.dependencies?.[resolved.package]?.replace(/[~^]/, '') |
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.
item.getAssociatedPackage()
is called 3 times in this block, do you think it is necessary to cache the result of this?
Example
let associatedPackage: ApiPackage | null | undefined = null;
// eslint-disable-next-line no-inner-declarations
function getAssociatedPackage() {
if (associatedPackage !== null) return associatedPackage;
return (associatedPackage = item.getAssociatedPackage());
}
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.
Might be a good idea. But if we talk about caching stuff it would be way better to cache the ApiModel/ApiPackage in a more central place, because currently the website rebuilds the Model a lot...
Co-authored-by: Almeida <almeidx@pm.me>
Please describe the changes this PR makes and why it should be merged:
Assures links to other packages of the monorepo link to the appropriate version used by the currently viewed version.
Also removes inherited methods from the api.json, as they get correctly parsed from inheritance tree and caused issues by being duplicated in the api.json causing wrong type links and missing inheritance information.
Status and versioning classification: