-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
npm package registry support for bin
#21372
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 provied by the package Signed-off-by: eleith <[email protected]>
silverwind
reviewed
Oct 7, 2022
GiteaBot
added
the
lgtm/need 2
This PR needs two approvals by maintainers to be considered for merging.
label
Oct 7, 2022
Co-authored-by: silverwind <[email protected]>
silverwind
approved these changes
Oct 7, 2022
GiteaBot
added
lgtm/need 1
This PR needs approval from one additional maintainer to be merged.
and removed
lgtm/need 2
This PR needs two approvals by maintainers to be considered for merging.
labels
Oct 7, 2022
wxiaoguang
approved these changes
Oct 8, 2022
GiteaBot
added
lgtm/done
This PR has enough approvals to get merged. There are no important open reservations anymore.
and removed
lgtm/need 1
This PR needs approval from one additional maintainer to be merged.
labels
Oct 8, 2022
zjjhot
added a commit
to zjjhot/gitea
that referenced
this pull request
Oct 11, 2022
* upstream/main: Add user/organization code search (go-gitea#19977) Stop logging CheckPath returns error: context canceled (go-gitea#21064) Hook go-licenses into tidy again (go-gitea#21353) Fix missing left and right carets in TRANSLATORS (go-gitea#21397) Fix calls to i18n in templates (go-gitea#21394) Update JS dependencies and eslint config (go-gitea#21388) Allow creation of OAuth2 applications for orgs (go-gitea#18084) Fix typos in PullRequestMergeForm.vue header comment (go-gitea#21378) Use weighted algorithm for string matching when finding files in repo (go-gitea#21370) Bump playwright to 1.26.1 (go-gitea#21357) npm package registry support for `bin` (go-gitea#21372) Removed one extra whitespace in footer after "Template" (go-gitea#21364)
Please send backport |
@lunny sent PR adding these changes to v1.17.3 |
lunny
added a commit
that referenced
this pull request
Oct 25, 2022
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 #21303 Co-authored-by: eleith <[email protected]> Co-authored-by: Lunny Xiao <[email protected]>
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
backport/done
All backports for this PR have been created
lgtm/done
This PR has enough approvals to get merged. There are no important open reservations anymore.
topic/packages
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 packagei 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 #21303