- Created update-and-publish-prep.sh script that automates entire update process - Script now runs all 1,182 tests before allowing updates - Automatically bumps version and updates README badges - Integrates with npm publish preparation workflow - Added 'npm run update:all' command for one-step updates - Updated MEMORY_N8N_UPDATE.md with new comprehensive process The new workflow ensures: - All tests pass before version bump - README badges stay in sync - Consistent commit messages - Ready for npm publish after update 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
4.6 KiB
4.6 KiB
n8n Update Process - Quick Reference
Quick One-Command Update
For a complete update with tests and publish preparation:
npm run update:all
This single command will:
- ✅ Check for n8n updates and ask for confirmation
- ✅ Update all n8n dependencies to latest compatible versions
- ✅ Run all 1,182 tests (933 unit + 249 integration)
- ✅ Validate critical nodes
- ✅ Build the project
- ✅ Bump the version
- ✅ Update README badges
- ✅ Prepare everything for npm publish
- ✅ Create a comprehensive commit
Manual Steps (if needed)
Quick Steps to Update n8n
# 1. Update n8n dependencies automatically
npm run update:n8n
# 2. Run tests
npm test
# 3. Validate the update
npm run validate
# 4. Build
npm run build
# 5. Bump version
npm version patch
# 6. Update README badges manually
# - Update version badge
# - Update n8n version badge
# 7. Commit and push
git add -A
git commit -m "chore: update n8n to vX.X.X
- Updated n8n from X.X.X to X.X.X
- Updated n8n-core from X.X.X to X.X.X
- Updated n8n-workflow from X.X.X to X.X.X
- Updated @n8n/n8n-nodes-langchain from X.X.X to X.X.X
- Rebuilt node database with XXX nodes
- Sanitized XXX workflow templates (if present)
- All 1,182 tests passing (933 unit, 249 integration)
- All validation tests passing
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>"
git push origin main
What the Commands Do
npm run update:all
This comprehensive command:
- Checks current branch and git status
- Shows current versions and checks for updates
- Updates all n8n dependencies to compatible versions
- Runs the complete test suite (NEW!)
- Validates critical nodes
- Builds the project
- Bumps the patch version
- Updates version badges in README
- Creates a detailed commit with all changes
- Provides next steps for GitHub release and npm publish
npm run update:n8n
This command:
- Checks for the latest n8n version
- Updates n8n and all its required dependencies (n8n-core, n8n-workflow, @n8n/n8n-nodes-langchain)
- Runs
npm installto update package-lock.json - Automatically rebuilds the node database
- Sanitizes any workflow templates to remove API tokens
- Shows you exactly what versions were updated
npm run validate
- Validates critical nodes (httpRequest, code, slack, agent)
- Shows database statistics
- Confirms everything is working correctly
npm test
- Runs all 1,182 tests
- Unit tests: 933 tests across 30 files
- Integration tests: 249 tests across 14 files
- Must pass before publishing!
Important Notes
- Always run on main branch - Make sure you're on main and it's clean
- The update script is smart - It automatically syncs all n8n dependencies to compatible versions
- Tests are required - The publish script now runs tests automatically
- Database rebuild is automatic - The update script handles this for you
- Template sanitization is automatic - Any API tokens in workflow templates are replaced with placeholders
- Docker image builds automatically - Pushing to GitHub triggers the workflow
GitHub Push Protection
As of July 2025, GitHub's push protection may block database pushes if they contain API tokens in workflow templates. Our rebuild process now automatically sanitizes these tokens, but if you encounter push protection errors:
- Make sure you've run the latest rebuild with
npm run rebuild - Verify sanitization with
npm run sanitize:templates - If push is still blocked, use the GitHub web interface to review and allow the push
Time Estimate
- Total time: ~5-7 minutes
- Test suite: ~2.5 minutes
- npm install and database rebuild: ~2-3 minutes
- The rest: seconds
Troubleshooting
If tests fail:
- Check the test output for specific failures
- Run
npm run test:unitornpm run test:integrationseparately - Fix any issues before proceeding with the update
If validation fails:
- Check the error message - usually it's a node type reference issue
- The update script handles most compatibility issues automatically
- If needed, check the GitHub Actions logs for the dependency update workflow
Alternative: Check First
To see what would be updated without making changes:
npm run update:n8n:check
This shows you the available updates without modifying anything.
Publishing to npm
After updating:
# Prepare for publish (runs tests automatically)
npm run prepare:publish
# Follow the instructions to publish with OTP
cd npm-publish-temp
npm publish --otp=YOUR_OTP_CODE
Creating a GitHub Release
After pushing:
gh release create vX.X.X --title "vX.X.X" --notes "Updated n8n to vX.X.X"