diff options
author | Wayne Starr <Racer159@users.noreply.github.com> | 2022-11-09 00:00:09 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-09 14:00:09 +0800 |
commit | 995ae06a6e02b7fb1938bb7ac2a1d5fe10be55b1 (patch) | |
tree | 51d47174e0c0948f4fd69f685bee7872ba88b283 /modules/templates | |
parent | 14342047add0292efba985c19fdc6da998a2e27c (diff) | |
download | gitea-995ae06a6e02b7fb1938bb7ac2a1d5fe10be55b1.tar.gz gitea-995ae06a6e02b7fb1938bb7ac2a1d5fe10be55b1.zip |
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>
Diffstat (limited to 'modules/templates')
0 files changed, 0 insertions, 0 deletions