1
1
mirror of https://github.com/go-gitea/gitea synced 2025-01-18 13:44:27 +00:00
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.
2023-08-20 15:06:42 +00:00
..
2023-02-05 18:12:31 +08:00
2023-02-06 09:49:21 +08:00
2023-07-30 23:54:22 +00:00
2023-05-22 10:57:49 +08:00
2023-05-14 23:38:40 +08:00
2023-07-04 18:36:08 +00:00
2023-07-30 23:54:22 +00:00
2023-03-13 15:28:39 -05:00