File tree Expand file tree Collapse file tree 3 files changed +41
-6
lines changed
app/pages/package/[[org]]/[name]
server/api/registry/dependents Expand file tree Collapse file tree 3 files changed +41
-6
lines changed Original file line number Diff line number Diff line change @@ -19,12 +19,14 @@ const resolvedVersion = computed(() => {
1919 return latest
2020})
2121
22- const displayVersion = computed (() => {
23- if (! pkg .value || ! resolvedVersion .value ) return null
24- return pkg .value .versions [resolvedVersion .value ] ?? null
25- })
22+ const displayVersion = computed (() => pkg .value ?.requestedVersion ?? null )
2623
27- const latestVersion = computed (() => displayVersion .value ?? null )
24+ const latestVersion = computed (() => {
25+ if (! pkg .value ) return null
26+ const latestTag = pkg .value [' dist-tags' ]?.latest
27+ if (! latestTag ) return null
28+ return pkg .value .versions [latestTag ] ?? null
29+ })
2830
2931const versionUrlPattern = computed (() => {
3032 const split = packageName .value .split (' /' )
Original file line number Diff line number Diff line change 625625 "scroll_to_top" : {
626626 "type" : " string"
627627 },
628+ "previous" : {
629+ "type" : " string"
630+ },
631+ "next" : {
632+ "type" : " string"
633+ },
628634 "cancel" : {
629635 "type" : " string"
630636 },
960966 },
961967 "compare_this_package" : {
962968 "type" : " string"
969+ },
970+ "dependents" : {
971+ "type" : " string"
963972 }
964973 },
965974 "additionalProperties" : false
14021411 },
14031412 "additionalProperties" : false
14041413 },
1414+ "dependents" : {
1415+ "type" : " object" ,
1416+ "properties" : {
1417+ "title" : {
1418+ "type" : " string"
1419+ },
1420+ "subtitle" : {
1421+ "type" : " string"
1422+ },
1423+ "count" : {
1424+ "type" : " string"
1425+ },
1426+ "error" : {
1427+ "type" : " string"
1428+ },
1429+ "none" : {
1430+ "type" : " string"
1431+ }
1432+ },
1433+ "additionalProperties" : false
1434+ },
14051435 "maintainers" : {
14061436 "type" : " object" ,
14071437 "properties" : {
24942524 "back_to_package" : {
24952525 "type" : " string"
24962526 },
2527+ "toggle_word_wrap" : {
2528+ "type" : " string"
2529+ },
24972530 "table" : {
24982531 "type" : " object" ,
24992532 "properties" : {
Original file line number Diff line number Diff line change 1- import { CACHE_MAX_AGE_FIVE_MINUTES , NPM_REGISTRY } from '#shared/utils/constants'
1+ import { CACHE_MAX_AGE_FIVE_MINUTES } from '#shared/utils/constants'
22
33const NPM_SEARCH_BASE = 'https://registry.npmjs.org/-/v1/search'
44
You can’t perform that action at this time.
0 commit comments