1
0
mirror of https://github.com/go-gitea/gitea.git synced 2024-09-01 14:56:30 +00:00
gitea/routers/api/packages/npm
Wayne Starr 49a4464160
Allow for resolution of NPM registry paths that match upstream ()
This PR fixes issue  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.go npm package registry support for bin () 2022-10-08 13:24:44 +08:00
npm.go Allow for resolution of NPM registry paths that match upstream () 2022-10-24 21:50:22 +08:00