Add Dev, Peer and Optional dependencies to npm PackageMetadataVersion (#21017) (#21044)

Backport #21017

Set DevDependencies, PeerDependencies & OptionalDependencies in npm package metadatas

Fix https://github.com/go-gitea/gitea/issues/21013
tokarchuk/v1.17
José Carlos 2 years ago committed by GitHub
parent 3973ce36d9
commit bd1412c3af
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      routers/api/packages/npm/api.go

@ -63,6 +63,9 @@ func createPackageMetadataVersion(registryURL string, pd *packages_model.Package
Homepage: metadata.ProjectURL, Homepage: metadata.ProjectURL,
License: metadata.License, License: metadata.License,
Dependencies: metadata.Dependencies, Dependencies: metadata.Dependencies,
DevDependencies: metadata.DevelopmentDependencies,
PeerDependencies: metadata.PeerDependencies,
OptionalDependencies: metadata.OptionalDependencies,
Readme: metadata.Readme, Readme: metadata.Readme,
Dist: npm_module.PackageDistribution{ Dist: npm_module.PackageDistribution{
Shasum: pd.Files[0].Blob.HashSHA1, Shasum: pd.Files[0].Blob.HashSHA1,

Loading…
Cancel
Save