1
0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo.git synced 2024-12-28 13:49:13 -05:00
forgejo/routers/api/packages
eleith 169c08e20a
support binary deploy in npm packages (#21589)
backport of #21372 for v1.17.4

-------------------

npm package.json supports binary packaging:
https://docs.npmjs.com/cli/v8/configuring-npm/package-json#bin

the npm registry documents that the binary references will be attached
to the abbreviated version object:

https://github.com/npm/registry/blob/master/docs/responses/package-metadata.md#abbreviated-version-object

unfortunately their api documentation leaves this out:
https://github.com/npm/registry/blob/master/docs/responses/package-metadata.md#abbreviated-version-objectdoc

which is likely to be the reason this was left out in gitea's initial
implementation

this response is critical for npm to install the binary in the .bin
folder so as to be included on the users default bin path, resulting in
immediate access to any binaries provided by the package

i have tested upload and installing through npm and can confirm the npm
registry now responds with bin in the version metadata and results in
the binary being available after install.

this fixes https://github.com/go-gitea/gitea/issues/21303

Co-authored-by: eleith <online-github@eleith.com>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
2022-10-25 14:13:27 +08:00
..
composer Add Docker /v2/_catalog endpoint (#20469) (#20556) 2022-07-30 17:52:04 +02:00
conan Set SemverCompatible to false for Conan packages (#21275) (#21366) 2022-10-10 20:46:09 +08:00
container Keep download count on Container tag overwrite (#20728) (#20735) 2022-08-09 17:33:45 +02:00
generic packages/generic: Do not restrict package versions to SemVer (#20414) (#20531) 2022-07-29 01:17:56 +02:00
helm Add Helm Chart registry (#19406) 2022-04-19 12:55:35 -04:00
helper Add Package Registry (#16510) 2022-03-30 16:42:47 +08:00
maven Allow multiple metadata files for Maven packages (#20674) (#20916) 2022-08-23 10:00:58 +08:00
npm support binary deploy in npm packages (#21589) 2022-10-25 14:13:27 +08:00
nuget Case-insensitive NuGet symbol file GUID (#21409) (#21575) 2022-10-24 19:57:19 +08:00
pypi Allow uppercase ASCII alphabet in PyPI package names (#21095) (#21217) 2022-09-20 17:37:24 +08:00
rubygems Package registry changes (#19305) 2022-04-06 03:32:09 +02:00
api.go Case-insensitive NuGet symbol file GUID (#21409) (#21575) 2022-10-24 19:57:19 +08:00