Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix NPM packages name validation (go-gitea#26595)
- Added new tests to cover corner cases - Replace existing regex with new one Closes go-gitea#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.
- Loading branch information