fix: use pnpm instead of npm in updatePlugins.sh (#7468)

* fix: use pnpm instead of npm in updatePlugins.sh

The script used npm outdated which doesn't work with pnpm workspaces,
and pnpm install which doesn't update existing packages. Changed to
pnpm outdated and pnpm update respectively.

Fixes #6670

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* fix: scope plugin updates to ep_etherpad-lite and exclude core package

- Use --filter ep_etherpad-lite so pnpm operates on the right workspace
- Exclude ep_etherpad-lite from the plugin list
- Handle pnpm outdated exit codes correctly (returns 1 when outdated)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
John McLear 2026-04-06 11:21:21 +01:00 committed by GitHub
parent ad214095ac
commit 220ae82086
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -2,10 +2,12 @@
set -e
mydir=$(cd "${0%/*}" && pwd -P) || exit 1
cd "${mydir}"/..
OUTDATED=$(npm outdated --depth=0 | awk '{print $1}' | grep '^ep_') || {
outdated_raw=$(pnpm --filter ep_etherpad-lite outdated --depth=0 2>&1) || true
OUTDATED=$(printf '%s\n' "$outdated_raw" | awk '{print $1}' | grep '^ep_' | grep -v '^ep_etherpad-lite$') || true
if [ -z "$OUTDATED" ]; then
echo "All plugins are up-to-date"
exit 0
}
fi
set -- ${OUTDATED}
echo "Updating plugins: $*"
exec pnpm install "$@"
exec pnpm --filter ep_etherpad-lite update "$@"