Skip to content

Automate PR creation for dependency updates #671

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

humanagent
Copy link
Collaborator

Implement automated updates for @xmtp/node-sdk to keep dependencies current and manage version aliases.

Copy link

macroscopeapp bot commented Jun 30, 2025

Automate PR creation for dependency updates by adding GitHub Actions workflow and update scripts for XMTP Node SDK

  • Adds GitHub Actions workflow .github/workflows/update-xmtp-sdk.yml that runs daily at 9 AM UTC to check for new XMTP Node SDK versions, creates update branches with versioned aliases, updates corresponding node-bindings dependencies, and generates pull requests
  • Creates Node.js update script scripts/update-xmtp-sdk.js that checks for SDK updates, determines corresponding node-bindings versions, updates package.json with versioned aliases, and runs compatibility tests
  • Adds npm scripts check-updates:xmtp and update:xmtp to package.json for manual update operations
  • Includes documentation files README-XMTP-Updates.md and docs/xmtp-sdk-updates.md explaining the automated update system and usage instructions

📍Where to Start

Start with the GitHub Actions workflow in .github/workflows/update-xmtp-sdk.yml to understand the automated update process, then review the update script in scripts/update-xmtp-sdk.js.


Macroscope summarized 1e9e549.


function updatePackageJson(newVersion, bindingsVersion) {
const pkg = JSON.parse(readFileSync(packageJsonPath, 'utf8'));
const versionAlias = createVersionAlias(newVersion);
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In both updatePackageJson and the inline Node.js script in file:.github/workflows/update-xmtp-sdk.yml:113, accessing pkg.packageExtensions without ensuring it’s defined can throw a TypeError when it’s missing from package.json. Consider initializing it right after parsing, e.g.: pkg.packageExtensions = pkg.packageExtensions || {};.

+  pkg.packageExtensions = pkg.packageExtensions || {};

🚀 Reply to ask Macroscope to explain or update this suggestion.

👍 Helpful? React to give us feedback.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants