Skip to content

Turn off installDependencies for cloudflare deployer build #5903

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

Merged
merged 4 commits into from
Jul 15, 2025

Conversation

TheIsrael1
Copy link
Contributor

  • Turn off installDependencies for cloudflare deployer build
  • changeset

Description

Related Issue(s)

Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update
  • Code refactoring
  • Performance improvement
  • Test update

Checklist

  • I have made corresponding changes to the documentation (if applicable)
  • I have added tests that prove my fix is effective or that my feature works

Copy link

codesandbox bot commented Jul 14, 2025

Review or Edit in CodeSandbox

Open the branch in Web EditorVS CodeInsiders

Open Preview

Copy link

changeset-bot bot commented Jul 14, 2025

🦋 Changeset detected

Latest commit: da1e594

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 10 packages
Name Type
@mastra/deployer-cloudflare Patch
@mastra/deployer Patch
mastra Patch
@mastra/deployer-netlify Patch
@mastra/deployer-vercel Patch
@mastra/dane Patch
@mastra/core Patch
@mastra/server Patch
@mastra/client-js Patch
@mastra/playground-ui Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link

vercel bot commented Jul 14, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
assistant-ui ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 14, 2025 11:29am
mastra-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 14, 2025 11:29am
openapi-spec-writer ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 14, 2025 11:29am

@TheIsrael1 TheIsrael1 changed the title cloudflare deployer dont install deps Turn off installDependencies for cloudflare deployer build Jul 14, 2025
Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

Greptile Summary

This PR modifies the dependency installation behavior in the Mastra bundling process, specifically for the Cloudflare deployer. The changes make dependency installation optional during bundling by adding an installDependencies parameter (defaulting to true) in the _bundle method. The Cloudflare deployer now explicitly sets this to false, which is crucial since Cloudflare Workers require all dependencies to be bundled into a single file rather than installed separately.

These changes improve the deployment process for Cloudflare Workers by aligning with their architectural requirements and preventing unnecessary dependency installation steps that wouldn't work in their environment.

Confidence score: 5/5

  1. This PR is very safe to merge as it adds flexibility without changing existing behavior
  2. The changes are well-isolated, properly typed, and maintain backward compatibility while fixing a platform-specific requirement
  3. Key files to review:
    • packages/deployer/src/bundler/index.ts
    • deployers/cloudflare/src/index.ts

2 files reviewed, no comments
Edit PR Review Bot Settings | Greptile

@abhiaiyer91 abhiaiyer91 merged commit fe4bbd4 into main Jul 15, 2025
29 checks passed
@abhiaiyer91 abhiaiyer91 deleted the cloudflare-deployer-dont-install-deps branch July 15, 2025 15:35
TheIsrael1 added a commit that referenced this pull request Jul 17, 2025
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