-
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: e69ef08 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: |
19debbd
to
43cb967
Compare
I forgot; peer dependency doesn't add complexity for the end user. It's actually simpler, with less to worry about. Via the recommended The next thing to update is the |
Updates the @twilio/test-dep (npm alias for `twilio`) development dependency to v5.6.0 in packages/twilio-run/package.json and in the root package.json. This change ensures consistent versions of the Twilio SDK are used during testing, aligning with the broader upgrade to Twilio SDK v5.6.0 across the toolkit. This supports efforts to stabilize the test environment following the core SDK update. feat: align @twilio/test-dep with twilio sdk v5.6 updated the @twilio/test-dep development dependency in package.json and packages/twilio-run/package.json to v5.6.0. this ensures consistent testing dependencies following the Twilio SDK upgrade.
43cb967
to
e69ef08
Compare
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