Replies: 2 comments
-
|
Thank you for the detailed report. Both items have been addressed and shipped in 2.8.1; the second point accounted for the larger share of the footprint. Measured impact (clean
1. MCP footprint — addressed via an optional peer dependency rather than a separate package. Extracting
MCP users install the SDK once with 2. Declaring A full write-up is available in the 2.8.1 changelog. |
Beta Was this translation helpful? Give feedback.
-
|
Follow-up: a further reduction shipped in 2.8.2. The published package was still including Cumulative impact of the three changes, measured with a clean
Breakdown of the ~88 MB removed:
The remaining footprint is effectively the floor: two runtime dependencies ( Thank you again for raising this — both items from the report shipped, and the package is now substantially leaner for every consumer. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi! First of all, thank you for creating
bunqueue. It's an amazing, lightweight alternative for background jobs in Bun.However, I noticed a significant bundle bloat after installing the package. The size of
node_modulesexpands drastically from 75.8 MB to 223.1 MB upon addingbunqueue.After looking into the package structure and
package.json, I found two areas where we can significantly optimize this.1. Separate MCP into a standalone package (e.g.,
@bunqueue/mcporbunqueue-mcp)Right now, the core
bunqueuepackage includes Model Context Protocol (MCP) support out of the box. While this is great for AI agent workflows, it forces all standard users to install heavy dependencies that they don't actually need for basic queue functionality.Specifically, it brings in:
@modelcontextprotocol/sdkzodProposed Solution:
Extract the MCP server/features into a separate package, for instance,
bunqueue-mcpor@bunqueue/mcp.bunqueue(keeping it extremely lightweight).bunqueueandbunqueue-mcp.2. Move
bunfrompeerDependenciestoenginesCurrently,
package.jsonspecifies:Using
peerDependenciesfor a runtime likebunis generally considered an anti-pattern in the modern JS ecosystem. It forces package managers (especially npm/pnpm/yarn when used in mixed or transition environments) to perform unnecessary dependency resolution checks or throw warnings/errors during installation.Proposed Solution:
The correct way to restrict or enforce the runtime environment is to use the
enginesfield:Benefits
Beta Was this translation helpful? Give feedback.
All reactions