1
0
mirror of https://github.com/verdaccio/verdaccio.git synced 2024-12-24 21:15:51 +01:00

fix: specific version package detail page not showing (#3013)

This commit is contained in:
Juan Picado 2022-02-26 17:31:48 +01:00 committed by GitHub
parent 46db10fc4f
commit c908963132
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 4 deletions

@ -0,0 +1,5 @@
---
'@verdaccio/ui-theme': patch
---
fix: specific version package detail page not showing

@ -67,15 +67,18 @@ export const manifest = createModel<RootModel>()({
async getManifest({ packageName, packageVersion }, state) {
const basePath = state.configuration.config.base;
try {
if (!isPackageVersionValid(packageName, packageVersion)) {
throw new Error('not found');
}
const manifest: Package = await API.request(
`${basePath}-/verdaccio/data/sidebar/${packageName}${
packageVersion ? `?v=${packageVersion}` : ''
}`
);
// FIXME: update types accordingly
// @ts-ignore
if (!isPackageVersionValid(manifest, packageVersion)) {
throw new Error('not found');
}
const readme: string = await API.request<string>(
`${basePath}-/verdaccio/data/package/readme/${packageName}${
packageVersion ? `?v=${packageVersion}` : ''