-
Notifications
You must be signed in to change notification settings - Fork 63
feat: upgrade twilio v5, use peer deps, enhance tooling #541
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
base: main
Are you sure you want to change the base?
feat: upgrade twilio v5, use peer deps, enhance tooling #541
Conversation
🦋 Changeset detectedLatest commit: 7b904fb The changes in this PR will be included in the next version bump. This PR includes changesets to release 5 packages
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 |
On my project I have a conflict between twilio-labs/serverless-runtime-types and twilio:5 |
6c26ece
to
26353ae
Compare
WHAT: - Upgraded the core `twilio` Node.js helper library to v5.5.2 across relevant packages (`runtime-handler`, `create-twilio-function` defaults, test dependencies). - Changed `@twilio-labs/serverless-runtime-types` and `@twilio-labs/twilio-run` to declare `twilio` as a `peerDependency` (^5.5.2) instead of a direct dependency. - Updated internal type definitions (`ClientOpts`) for compatibility with `[email protected]`. - Updated Twilio Console URL generation logic in `twilio-run`. - Updated default dependencies (`typescript`, `serverlessRuntimeTypes`) used by `create-twilio-function`. WHY: - Aligns the toolkit with the latest Twilio SDK features, improvements, and security updates available in v5. - Resolves potential version conflicts and type mismatches (e.g., TS2322/TS2352) by ensuring a single `twilio` instance is used, managed explicitly by the consuming project. This promotes a more stable and predictable dependency graph. BREAKING CHANGE: Consumers of `@twilio-labs/twilio-run` or projects directly importing types from `@twilio-labs/serverless-runtime-types` MUST now explicitly install `twilio` as a direct dependency in their own project. Add the `twilio` dependency: ```bash npm install twilio@^5.5.2 --save-dev yarn add twilio@^5.5.2 --dev ```
26353ae
to
7b904fb
Compare
That will fix this issue: |
@@ -26,7 +26,7 @@ | |||
"@changesets/cli": "^2.26.0", | |||
"@commitlint/cli": "^19.1.0", | |||
"@commitlint/config-conventional": "^19.1.0", | |||
"@twilio/test-dep": "npm:twilio@4.22.0", | |||
"@twilio/test-dep": "npm:twilio@5.2.2", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should it be 5.5.2?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oups, you're right. I go update that !
Upgrades core Twilio dependencies to v5.5.2 across the workspace. Resolves associated type conflicts using peer dependencies. Includes enhancements for create-twilio-function and twilio-run.
Dependency & Type Alignment:
twilio
dependency to5.5.2
inruntime-handler
.twilio
from a direct dependency to apeerDependency (^5.5.2)
inserverless-runtime-types
andtwilio-run
.twilio
instance, resolving type identity conflicts (TS2322/TS2352).serverless-runtime-types
(types.d.ts
) to align with [email protected], primarily usingClientOpts
.ClientOpts as TwilioClientOptions
.@twilio/test-dep
alias tonpm:[email protected]
.peerDependency
fortwilio
for workspace checks.Package Enhancements:
create-twilio-function
: Bumped to v3.5.0, updated default dependencies (twilio
,typescript
,serverlessRuntimeTypes
), fixed TS template (fix(create-twilio-function): fix hello-world template #531).twilio-run
: fixedrequire
->import
conversion.Requires a clean install (removing node_modules and lockfile) after merging.
Contributing to Twilio