0
0
Fork 0
mirror of https://github.com/go-gitea/gitea synced 2024-12-25 17:14:30 +01:00
gitea/routers
Wayne Starr 49a4464160
Allow for resolution of NPM registry paths that match upstream (#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-10-24 21:50:22 +08:00
..
api Allow for resolution of NPM registry paths that match upstream (#21568) 2022-10-24 21:50:22 +08:00
common
install
private Refactor git command arguments and make all arguments to be safe to be used (#21535) 2022-10-23 22:44:45 +08:00
utils
web Record OAuth client type at registration (#21316) 2022-10-24 15:59:24 +08:00
init.go