You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
forgejo/modules/packages
TimberBro 84d05516dc
Fix NPM packages name validation (#26595)
- Added new tests to cover corner cases
- Replace existing regex with new one
Closes #26551 

---
As @silverwind suggested, I started from
[validate-npm-package-name](https://github.com/npm/validate-npm-package-name),
but found this solution too complicated.
Then I tried to fix existing regex myself, but thought, that exclude all
restricted symbols is harder, than set only allowed symbols.
Then I search a bit more and found
[package-name-regex](https://github.com/dword-design/package-name-regex)
and regex from it works for all new test cases.

Let me know, if more information or help with this PR is needed.
11 months ago
..
alpine Add Alpine package registry (#23714) 1 year ago
cargo Add Cargo package registry (#21888) 1 year ago
chef Add Chef package registry (#22554) 1 year ago
composer Replace `interface{}` with `any` (#25686) 1 year ago
conan Use ErrInvalidArgument in packages (#22268) 2 years ago
conda Fix typo in metadata (#26207) 12 months ago
container Use more specific test methods (#24265) 1 year ago
cran Add CRAN package registry (#22331) 1 year ago
debian Prevent newline errors with Debian packages (#26332) 12 months ago
goproxy Add Go package registry (#24687) 1 year ago
helm Replace `interface{}` with `any` (#25686) 1 year ago
maven Add support for different Maven POM encoding (#25873) 1 year ago
npm Fix NPM packages name validation (#26595) 11 months ago
nuget Add Debian package registry (#24426) 1 year ago
pub Replace `interface{}` with `any` (#25686) 1 year ago
pypi Implement FSFE REUSE for golang files (#21840) 2 years ago
rpm Fix typo in metadata (#26207) 12 months ago
rubygems Replace `interface{}` with `any` (#25686) 1 year ago
swift Add Swift package registry (#22404) 1 year ago
vagrant Implement FSFE REUSE for golang files (#21840) 2 years ago
content_store.go Add direct serving of package content (#25543) 1 year ago
hashed_buffer.go Add Debian package registry (#24426) 1 year ago
hashed_buffer_test.go Add Debian package registry (#24426) 1 year ago
multi_hasher.go Implement FSFE REUSE for golang files (#21840) 2 years ago
multi_hasher_test.go Replace fmt.Sprintf with hex.EncodeToString (#21960) 2 years ago