fix: declare eventemitter3 as SDK runtime dependency#32
Conversation
|
Warning Review limit reached
More reviews will be available in 46 minutes and 30 seconds. Learn how PR review limits work. Your organization has run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe SDK package declares ChangesDependency Management
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
packages/sdk-js/package.json (1)
32-32: Use a caret range for safer semver on eventemitter3
"eventemitter3": ">=5"would allow future breaking major updates (e.g., 6.x+). Since the latest published version is currently 5.0.4 and no GitHub security advisories were reported foreventemitter3, constraining to v5 is the safer pattern.📦 Suggested semver range
"dependencies": { - "eventemitter3": ">=5" + "eventemitter3": "^5.0.0" },🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@packages/sdk-js/package.json` at line 32, Update the dependency declaration for eventemitter3 in package.json to use a caret range that locks to major version 5 (e.g., change "eventemitter3": ">=5" to "eventemitter3": "^5.0.0" or "eventemitter3": "^5"); locate the "eventemitter3" entry in package.json and replace the version string so you get compatible patch/minor updates within v5 but avoid automatically accepting a potential v6 breaking change.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@packages/sdk-js/package.json`:
- Line 32: Update the dependency declaration for eventemitter3 in package.json
to use a caret range that locks to major version 5 (e.g., change
"eventemitter3": ">=5" to "eventemitter3": "^5.0.0" or "eventemitter3": "^5");
locate the "eventemitter3" entry in package.json and replace the version string
so you get compatible patch/minor updates within v5 but avoid automatically
accepting a potential v6 breaking change.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 4c47bc60-3d69-44d5-90f9-fad99fa57a16
⛔ Files ignored due to path filters (1)
bun.lockis excluded by!**/*.lock
📒 Files selected for processing (1)
packages/sdk-js/package.json
|
Addressed the CodeRabbit dependency-range nit in commit a56e33e by changing Validation repeated after the change:
Note: the build still emits the repo's existing neutral-platform warnings for dynamic |
Summary
eventemitter3from peer dependencies to runtime dependencies for the published@gladiaio/sdkpackagewsandundicias optional peersFixes #30.
Reproduction
A clean Yarn 1 install of the published package currently warns about the unmet peer and then fails at SDK import time because
dist/v2/live/session.jsimportseventemitter3internally:Observed before this patch:
Validation
npm run build --workspaces=falsefrompackages/sdk-jspassednpm pack --ignore-scripts --json --workspaces=falsefrompackages/sdk-jspassed@gladiaio/sdkdependencies.eventemitter3 = >=5git diff --checkpassednode -e "JSON.parse(require('fs').readFileSync('packages/sdk-js/package.json','utf8'))"passedNote:
./node_modules/.bin/nx run sdk-js:test --skipNxCachecurrently runs but fails two unrelatedsrc/client.test.tsassertions because those tests instantiate a Gladia API host withoutapiKeyor proxyapiUrl. The dependency change is covered by the packed clean-install smoke above.Summary by CodeRabbit
eventemitter3as a direct dependency, removing the requirement for consumers to supply it separately.