0
Fork 0
mirror of https://github.com/verdaccio/verdaccio.git synced 2024-12-16 21:56:25 -05:00

fix: update fields for abbreviated manifest (#4674)

This commit is contained in:
Marc Bernard 2024-06-13 13:11:38 +02:00 committed by GitHub
parent b270f7a975
commit de6ff5cb0d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 25 additions and 3 deletions

View file

@ -0,0 +1,6 @@
---
'@verdaccio/types': patch
'@verdaccio/store': patch
---
fix: update fields for abbreviated manifest

View file

@ -124,6 +124,7 @@ export interface Version {
optionalDependencies?: Dependencies;
peerDependenciesMeta?: PeerDependenciesMeta;
bundleDependencies?: Dependencies;
acceptDependencies?: Dependencies;
keywords?: string | string[];
nodeVersion?: string;
_id: string;
@ -180,6 +181,7 @@ export interface FullRemoteManifest {
versions: Versions;
/** store owners of this package */
maintainers?: Author[];
contributors?: Author[];
/** store the latest readme **/
readme?: string;
/** store star assigned to this packages by users */
@ -224,7 +226,6 @@ export type AbbreviatedVersion = Pick<
Version,
| 'name'
| 'version'
| 'description'
| 'dependencies'
| 'devDependencies'
| 'bin'
@ -232,6 +233,15 @@ export type AbbreviatedVersion = Pick<
| 'engines'
| 'funding'
| 'peerDependencies'
| 'cpu'
| 'deprecated'
| 'directories'
| 'hasInstallScript'
| 'optionalDependencies'
| 'os'
| 'peerDependenciesMeta'
| 'acceptDependencies'
| '_hasShrinkwrap'
>;
export interface AbbreviatedVersions {

View file

@ -524,7 +524,6 @@ class Storage {
const _version_abbreviated = {
name: _version.name,
version: _version.version,
description: _version.description,
deprecated: _version.deprecated,
bin: _version.bin,
dist: _version.dist,
@ -536,6 +535,10 @@ class Storage {
peerDependencies: _version.peerDependencies,
optionalDependencies: _version.optionalDependencies,
bundleDependencies: _version.bundleDependencies,
cpu: _version.cpu,
os: _version.os,
peerDependenciesMeta: _version.peerDependenciesMeta,
acceptDependencies: _version.acceptDependencies,
// npm cli specifics
_hasShrinkwrap: _version._hasShrinkwrap,
hasInstallScript: _version.hasInstallScript,

View file

@ -1894,7 +1894,6 @@ describe('storage', () => {
expect(Object.keys(version)).toEqual([
'name',
'version',
'description',
'deprecated',
'bin',
'dist',
@ -1906,6 +1905,10 @@ describe('storage', () => {
'peerDependencies',
'optionalDependencies',
'bundleDependencies',
'cpu',
'os',
'peerDependenciesMeta',
'acceptDependencies',
'_hasShrinkwrap',
'hasInstallScript',
]);