forked from jsnbuchanan/crowd-funder-for-time-pwa
- Remove deprecated $updateSettings method entirely - Migrate 21 components to use proper settings methods - Consolidate IPlatformServiceMixin and ComponentCustomProperties interfaces - Establish single source of truth for platform service methods - Update all components to use $saveMySettings, $saveUserSettings, $saveSettings - Remove interface duplication and deprecated method warnings - Ensure clean, maintainable codebase with proper separation of concerns Breaking Change: $updateSettings method removed - use $saveSettings variants instead
29 lines
1.0 KiB
Bash
Executable File
29 lines
1.0 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
# CI check script to ensure no new $updateSettings usage is introduced
|
|
# This script will fail CI if any $updateSettings calls are found
|
|
|
|
set -e
|
|
|
|
echo "🔍 Checking for deprecated \$updateSettings usage..."
|
|
|
|
# Search for $updateSettings usage in source files
|
|
USAGE_COUNT=$(grep -r "\$updateSettings" src/ --include="*.vue" --include="*.ts" --include="*.js" | wc -l)
|
|
|
|
if [ "$USAGE_COUNT" -gt 0 ]; then
|
|
echo "❌ Found $USAGE_COUNT usage(s) of deprecated \$updateSettings method:"
|
|
echo ""
|
|
grep -r "\$updateSettings" src/ --include="*.vue" --include="*.ts" --include="*.js" -n
|
|
echo ""
|
|
echo "⚠️ Migration required:"
|
|
echo " - For global settings: use \$saveSettings(changes)"
|
|
echo " - For user-specific settings: use \$saveUserSettings(did, changes)"
|
|
echo " - For current user settings: use \$saveMySettings(changes)"
|
|
echo ""
|
|
echo "Run 'node scripts/migrate-update-settings.js' for migration guidance."
|
|
exit 1
|
|
else
|
|
echo "✅ No \$updateSettings usage found!"
|
|
exit 0
|
|
fi
|