1
0
mirror of https://github.com/go-gitea/gitea.git synced 2024-12-04 14:46:57 -05:00
gitea/routers
Wayne Starr 995ae06a6e
Allow for resolution of NPM registry paths that match upstream (#21568) (#21723)
Backport (#21568)

This PR fixes issue #21567 allowing for package tarball URLs to match
the upstream registry (and GitLab/JFrog Artifactory URLs). It uses a
regex to parse the filename (which contains the NPM version) and does a
fuzzy search to pull it out. The regex was built/expanded from
http://json.schemastore.org/package,
https://github.com/Masterminds/semver, and
https://docs.npmjs.com/cli/v6/using-npm/semver and is testable here:
https://regex101.com/r/OydBJq/5

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
2022-11-09 14:00:09 +08:00
..
api Allow for resolution of NPM registry paths that match upstream (#21568) (#21723) 2022-11-09 14:00:09 +08:00
common Rework raw file http header logic (#20484) (#20542) 2022-07-30 18:37:02 +02:00
install Add Cache-Control header to html and api responses, add no-transform (#20432) (#20459) 2022-07-23 11:58:58 +01:00
private Add migrate repo archiver and packages storage support on command line (#20757) (#20806) 2022-08-18 09:27:56 +08:00
utils A better go code formatter, and now make fmt can run in Windows (#17684) 2021-11-17 20:34:35 +08:00
web Added check for disabled Packages (#21540) (#21614) 2022-10-27 12:34:32 +08:00
init.go Sync git hooks when config file path changed (#21619) (#21625) 2022-10-30 11:16:09 +08:00