[TikiWiki-commits] [Git][tikiwiki/tiki][master] [ENH] CI: Add check for platform-specific binaries in package-lock.json

Benoit Grégoire (@benoitg) via TikiWiki-cvs <[email protected]>
Newsgroups gmane.comp.cms.tiki.cvs
Message-ID <68f70afaf29ed_2cc3a57843272@gitlab-sidekiq-low-urgency-cpu-bound-v2-5f86fd7786-5ff8h.mail>

Benoit Grégoire pushed to branch master at Tiki Wiki CMS Groupware / Tiki


Commits:
8a482eb5 by MAGENE Sem Joel at 2025-10-21T04:16:35+00:00
[ENH] CI: Add check for platform-specific binaries in package-lock.json
---
* [ENH] CI: Add check for platform-specific binaries in package-lock.json

See merge request tikiwiki/tiki!8792

- - - - -


2 changed files:

- .gitlab-ci.yml
- + doc/devtools/check_platform_binaries.sh


Changes:

=====================================
.gitlab-ci.yml
=====================================
@@ -262,6 +262,13 @@ unix-ending-line:
 # Check Tikiwiki development specific check (related also with release)
 #
 
+check-platform-binaries:
+  stage: tiki-check
+  needs: []
+  image: ${DEPENDENCY_PROXY_PREFIX}${BASE_QA_IMAGE}
+  script:
+    - sh doc/devtools/check_platform_binaries.sh
+
 sql-engine:
   stage: tiki-check
   needs: []


=====================================
doc/devtools/check_platform_binaries.sh
=====================================
@@ -0,0 +1,21 @@
+#!/bin/sh
+set -e
+
+# This script performs a spot check for an unlikely platform-specific binary
+# in package--lock.json. When the npm bug occurs, only the host platform's
+# binaries are present, so checking for one that is never the host
+# is a reliable way to detect the issue.
+
+echo "Checking that package-lock.json contains non-host platform binaries..."
+
+PACKAGE_TO_CHECK='"@parcel/watcher-android-arm64":'
+
+if ! grep -q "$PACKAGE_TO_CHECK" package-lock.json; then
+  echo
+  echo "ERROR: The required platform-specific binary '$PACKAGE_TO_CHECK' is missing from package-lock.json." >&2
+  echo "This indicates the lockfile may be incomplete." >&2
+  echo "To fix this, please try regenerating the 'package-lock.json' file by deleting it and running 'npm install' again." >&2
+  exit 1
+else
+  echo "Success: The package-lock.json file appears to be complete."
+fi
\ No newline at end of file



View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/8a482eb5db211933561041406c6729daa8957d5d

-- 
View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/8a482eb5db211933561041406c6729daa8957d5d
You're receiving this email because of your account on gitlab.com.

_______________________________________________
TikiWiki-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tikiwiki-cvs
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.