From 05ea469038e206f9272f47c6cc61b1594f51c663 Mon Sep 17 00:00:00 2001 From: Vicho <78003979+Vicente-G@users.noreply.github.com> Date: Sun, 8 Feb 2026 22:50:05 -0300 Subject: [PATCH] Add special check for npm modules --- .github/workflows/check-urls.yml | 10 ++++++++++ .lycheeignore | 3 +++ 2 files changed, 13 insertions(+) diff --git a/.github/workflows/check-urls.yml b/.github/workflows/check-urls.yml index e437506..9b286c0 100644 --- a/.github/workflows/check-urls.yml +++ b/.github/workflows/check-urls.yml @@ -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 diff --git a/.lycheeignore b/.lycheeignore index 3c5eca4..b329544 100644 --- a/.lycheeignore +++ b/.lycheeignore @@ -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@/._-]+