diff --git a/.changeset/rich-shrimps-check.md b/.changeset/rich-shrimps-check.md new file mode 100644 index 000000000..27ee0c808 --- /dev/null +++ b/.changeset/rich-shrimps-check.md @@ -0,0 +1,6 @@ +--- +'@verdaccio/types': patch +'@verdaccio/store': patch +--- + +fix: update fields for abbreviated manifest diff --git a/packages/core/types/src/manifest.ts b/packages/core/types/src/manifest.ts index fe719762b..26ed5e310 100644 --- a/packages/core/types/src/manifest.ts +++ b/packages/core/types/src/manifest.ts @@ -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 { diff --git a/packages/store/src/storage.ts b/packages/store/src/storage.ts index 2c06fcbdc..3d9094efa 100644 --- a/packages/store/src/storage.ts +++ b/packages/store/src/storage.ts @@ -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, diff --git a/packages/store/test/storage.spec.ts b/packages/store/test/storage.spec.ts index 9292d044b..a1624c9a0 100644 --- a/packages/store/test/storage.spec.ts +++ b/packages/store/test/storage.spec.ts @@ -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', ]);