Add special check for npm modules

This commit is contained in:
Vicho
2026-02-08 22:50:05 -03:00
committed by Hugo Locurcio
parent dcc7188707
commit 05ea469038
2 changed files with 13 additions and 0 deletions

View File

@@ -20,3 +20,13 @@ jobs:
- name: Fail if there were link errors
run: exit ${{ steps.lc.outputs.exit_code }}
- name: Check npm packages manually
run: |
grep -oE 'https://www\.npmjs\.com/package/[a-zA-Z0-9@/._-]+' README.md | sort -u | while read -r url; do \
registry=$(echo "$url" | sed 's#https://www\.npmjs\.com/package/#https://registry.npmjs.org/#g')
status=$(curl -w "%{http_code}" -o /dev/null -s -L "$registry"); echo -n "Checking $url... "
if [[ "$status" -eq 404 ]]; then
echo "Status code: $status"; exit 1; \
fi; echo "Found!"
done

View File

@@ -30,3 +30,6 @@ tcp:\/\/.*
# Class reference mentions `example.com/index.php` in an example, which is 404.
.*example\.com.*
# Ignore npm packages as their Cloudflare config blocks normal CI pinging
https://www\.npmjs\.com/package/[a-zA-Z0-9@/._-]+