forgejo/modules
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
..
activitypub
analyze Simplify IsVendor (#19626) 2022-05-06 10:12:30 +01:00
appstate
auth Remove legacy +build: constraint (#19582) 2022-05-02 23:22:45 +08:00
avatar Use Go 1.19 fmt for Gitea 1.17, sync emoji data (#21239) 2022-09-22 21:58:31 +08:00
base Prettify number of issues (#17760) 2022-06-12 20:08:23 +08:00
cache Update go-chi/cache to utilize Ping() (#19719) 2022-05-15 20:43:27 +02:00
charset Detect truncated utf-8 characters at the end of content as still representing utf-8 (#19773) 2022-05-21 14:06:24 +01:00
container
context Tag list should include draft releases with existing tags (#21263) (#21365) 2022-10-07 18:59:42 +08:00
convert Fix 500 on time in timeline API (#21052) (#21057) 2022-09-04 16:12:37 +01:00
csv Use Go 1.19 fmt for Gitea 1.17, sync emoji data (#21239) 2022-09-22 21:58:31 +08:00
doctor Fix git.Init for doctor sub-command (#20782) (#20783) 2022-08-14 00:32:44 +08:00
emoji Use Go 1.19 fmt for Gitea 1.17, sync emoji data (#21239) 2022-09-22 21:58:31 +08:00
eventsource Stop spurious APIFormat stopwatches logs (#20008) 2022-06-17 22:47:15 +01:00
generate
git improve code quality (#21464) (#21463) 2022-10-15 14:24:39 +02:00
gitgraph improve code quality (#21464) (#21463) 2022-10-15 14:24:39 +02:00
graceful Ensure that graceful start-up is informed of unused SSH listener (#20877) 2022-08-21 20:18:22 +08:00
hcaptcha
highlight Adjust line detection in highlight.go (#20612) 2022-08-03 01:37:28 +08:00
hostmatcher fix merge (#20819) 2022-08-17 11:33:26 -04:00
httpcache Add Cache-Control header to html and api responses, add no-transform (#20432) (#20459) 2022-07-23 11:58:58 +01:00
httplib
indexer Fix dump-repo git init, fix wrong error type for NullDownloader (#20182) (#20186) 2022-07-01 18:01:05 +02:00
json
lfs Move some code into models/git (#19879) 2022-06-12 23:51:54 +08:00
log Use Go 1.19 fmt for Gitea 1.17, sync emoji data (#21239) 2022-09-22 21:58:31 +08:00
markup Fix missing m.Run() in TestMain (#21341) 2022-10-05 12:17:16 +08:00
metrics
migration Add more checks in migration code (#21011) (#21050) 2022-09-04 08:41:21 -05:00
nosql fix broken insecureskipverify handling in rediss connection uris (#20967) (#21053) 2022-09-04 14:59:20 +01:00
notification Display total commit count in hook message (#21400) (#21481) 2022-10-17 10:37:44 -04:00
options Remove legacy +build: constraint (#19582) 2022-05-02 23:22:45 +08:00
packages support binary deploy in npm packages (#21589) 2022-10-25 14:13:27 +08:00
paginator
password
pprof Use Go 1.19 fmt for Gitea 1.17, sync emoji data (#21239) 2022-09-22 21:58:31 +08:00
private
process Set Setpgid on child git processes (#19865) 2022-06-03 15:36:18 +01:00
proxy
public Remove legacy +build: constraint (#19582) 2022-05-02 23:22:45 +08:00
queue Fix 64-bit atomic operations on 32-bit machines (#19531) 2022-04-27 10:32:04 -05:00
recaptcha
references Custom regexp external issues (#17624) 2022-06-10 13:39:53 +08:00
regexplru Custom regexp external issues (#17624) 2022-06-10 13:39:53 +08:00
repository Use Go 1.19 fmt for Gitea 1.17, sync emoji data (#21239) 2022-09-22 21:58:31 +08:00
secret
session
setting Enable contenthash in filename for dynamic assets (#20813) (#20932) 2022-08-25 07:16:20 +01:00
ssh Ensure that graceful start-up is informed of unused SSH listener (#20877) 2022-08-21 20:18:22 +08:00
storage
structs Display total commit count in hook message (#21400) (#21481) 2022-10-17 10:37:44 -04:00
svg Remove legacy +build: constraint (#19582) 2022-05-02 23:22:45 +08:00
sync
templates Fix generating compare link (#21519) (#21530) 2022-10-21 20:59:27 +08:00
test Move access and repo permission to models/perm/access (#19350) 2022-05-11 12:09:36 +02:00
timeutil Fix hard-coded timeout and error panic in API archive download endpoint (#20925) (#21051) 2022-09-06 07:54:47 +01:00
translation Use en-US as fallback when using other default language (#21200) (#21256) 2022-09-25 22:14:57 +08:00
typesniffer Rework raw file http header logic (#20484) (#20542) 2022-07-30 18:37:02 +02:00
updatechecker
upload
uri
user
util Use Go 1.19 fmt for Gitea 1.17, sync emoji data (#21239) 2022-09-22 21:58:31 +08:00
validation Add more checks in migration code (#21011) (#21050) 2022-09-04 08:41:21 -05:00
web Unify repo settings & show better error (#19828) 2022-06-12 13:43:27 +08:00