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:
parent
46db10fc4f
commit
c908963132
5
.changeset/spicy-snakes-sip.md
Normal file
5
.changeset/spicy-snakes-sip.md
Normal file
@ -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}` : ''
|
||||
|
Loading…
Reference in New Issue
Block a user