You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: upgrade Twilio SDK to v5 and require as peer dependency
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
```
feat: Upgrade Twilio SDK to v5 and use peer dependency
9
+
10
+
**WHAT:**
11
+
- Upgraded the core `twilio` Node.js helper library to v5.5.2 across the toolkit.
12
+
- Changed `@twilio-labs/serverless-runtime-types` and `@twilio-labs/twilio-run` to require `twilio` as a `peerDependency` instead of a direct dependency.
13
+
- Updated type definitions (`ClientOpts`) for compatibility with `[email protected]`.
14
+
- Updated default dependencies (`twilio`, `typescript`, `serverlessRuntimeTypes`) used by `@twilio-labs/create-twilio-function`.
15
+
16
+
**WHY:**
17
+
- Aligns the toolkit with the latest Twilio SDK features, improvements, and security updates.
18
+
- Resolves potential type conflicts (e.g., `TS2322`/`TS2352`) by ensuring a single `twilio` instance, managed by the user's project.
19
+
20
+
**HOW:**
21
+
**BREAKING CHANGE:** Users of `@twilio-labs/twilio-run` or projects importing types from `@twilio-labs/serverless-runtime-types`**must** now add `twilio` as a direct dependency to their project:
22
+
```bash
23
+
npm install twilio@^5.5.2
24
+
# or
25
+
yarn add twilio@^5.5.2
26
+
```
27
+
After updating toolkit packages and adding `twilio`, perform a clean install (delete `node_modules` and lock file, then run `npm install` or `yarn install`).
Copy file name to clipboardExpand all lines: packages/serverless-runtime-types/README.md
+11Lines changed: 11 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -22,6 +22,17 @@
22
22
npm install @twilio-labs/serverless-runtime-types
23
23
```
24
24
25
+
**Peer Dependency Requirement:**
26
+
27
+
This package requires the core `twilio` Node.js library as a **peer dependency** (version `^5.5.2` or compatible). This is necessary to ensure type consistency and prevent version conflicts within your project.
28
+
29
+
**You MUST explicitly install both `@twilio-labs/serverless-runtime-types` and a compatible version of `twilio` in your project.**
0 commit comments