-
Notifications
You must be signed in to change notification settings - Fork 120
Update package dependencies, change makepot script path, and add back… #550
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Update package dependencies, change makepot script path, and add back… #550
Conversation
…up file pattern to .gitignore
WalkthroughThis update introduces a new shell script for generating POT files, modifies the Changes
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI ⛔ Files ignored due to path filters (2)
📒 Files selected for processing (2)
✅ Files skipped from review due to trivial changes (1)
🚧 Files skipped from review as they are similar to previous changes (1)
✨ Finishing Touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 3
🧹 Nitpick comments (2)
.gitignore (1)
21-21: Pattern may miss nested backup files
/languages/*.backup.*only matches files directly inside/languages/.
If any tooling creates backups inside sub-directories (e.g./languages/fr_FR/foo.backup.po) they’ll still be committed.-/languages/*.backup.* +/languages/**/*.backup.*Not blocking, but worth tightening now to avoid future noise.
scripts/makepot.sh (1)
9-21: Allow the script to be executed from any directoryCurrent prerequisite checks require running the script from plugin root.
A tiny tweak lets callers execute it from any path while still validating against the root:-# Check for prerequisites -if [ ! -f "package.json" ]; then +# Resolve project root (= parent of this script) +ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)" +cd "$ROOT_DIR" + +# Check for prerequisites +if [ ! -f "package.json" ]; thenMakes automation & CI a bit more tolerant.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (2)
package-lock.jsonis excluded by!**/package-lock.jsonviews/assets/vendor/vue-fullscreen/vue-fullscreen.min.jsis excluded by!**/*.min.js
📒 Files selected for processing (3)
.gitignore(1 hunks)package.json(2 hunks)scripts/makepot.sh(1 hunks)
🔇 Additional comments (2)
scripts/makepot.sh (1)
5-8: Default values look goodUsing env-overrides for
MEMORY_LIMITandMAX_EXECUTION_TIMEis spot-on.package.json (1)
13-13: Ensurescripts/makepot.shis executable & cross-platform friendly
npm runwill fail on Windows if Git-Bash isn’t installed.
Consider adding a tiny Node wrapper (node scripts/makepot.js) or documenting that Windows users need a POSIX shell.Also double-check the file has
chmod +x.
… dependencies, and improve makepot script error handling.
🚀 Fix npm build issues and implement robust makepot script
📋 Summary
Resolved critical npm installation and build issues in the WP Project Manager plugin, and implemented a reliable solution for generating translation (.pot) files.
Issues Fixed
1. npm install failures
node-sassdependency was failing to build due to Python dependency issues on modern systemsnode-sass@^4.13.1withsass@^1.32.0and updatedsass-loaderto^10.0.02. PHP memory limit errors in makepot
npm run makepotwas failing with "Allowed memory size exhausted" errors3. Build and watch mode issues
npm run buildandnpm run startwere failing due to dependency conflicts🛠 Technical Changes
package.json updates
New script:
scripts/makepot.shUpdated .gitignore
+ /languages/*.backup.*Benefits
Environment Flexibility
PHP_MEMORY_LIMIT=1G npm run makepotNODE_ENV=production npm run makepotReliability
Maintainability
🧪 Testing
Verified Commands
📝 Usage Examples
Basic usage
Custom memory limit
Production environment
Files Changed
package.json- Updated dependencies and scriptsscripts/makepot.sh- New reliable script.gitignore- Added backup file exclusion🔧 Node.js Compatibility
Summary by CodeRabbit
.gitignorefile to exclude backup files in the/languages/directory.node-sasspackage withsassand updatedsass-loaderto a newer version for improved Sass compilation.makepotscript to use a new shell script for generating translation files.