mirror of
https://github.com/verdaccio/verdaccio.git
synced 2024-11-08 23:25: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) {
|
async getManifest({ packageName, packageVersion }, state) {
|
||||||
const basePath = state.configuration.config.base;
|
const basePath = state.configuration.config.base;
|
||||||
try {
|
try {
|
||||||
if (!isPackageVersionValid(packageName, packageVersion)) {
|
|
||||||
throw new Error('not found');
|
|
||||||
}
|
|
||||||
|
|
||||||
const manifest: Package = await API.request(
|
const manifest: Package = await API.request(
|
||||||
`${basePath}-/verdaccio/data/sidebar/${packageName}${
|
`${basePath}-/verdaccio/data/sidebar/${packageName}${
|
||||||
packageVersion ? `?v=${packageVersion}` : ''
|
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>(
|
const readme: string = await API.request<string>(
|
||||||
`${basePath}-/verdaccio/data/package/readme/${packageName}${
|
`${basePath}-/verdaccio/data/package/readme/${packageName}${
|
||||||
packageVersion ? `?v=${packageVersion}` : ''
|
packageVersion ? `?v=${packageVersion}` : ''
|
||||||
|
Loading…
Reference in New Issue
Block a user