Skip to content

Commit fa7efca

Browse files
luluhocrenovate[bot]lulu
authored
feat: twilio 4.0.0 (#49)
* chore(deps): update node.js to v18.13.0 * chore(deps): update dependency rimraf to v4 * chore(deps): update dependency ts-jest to v29.0.5 * chore(deps): update dependency prettier to v2.8.3 * chore(deps): update jest monorepo * refactor(): twilio 4.0.0 * undo commits from renovate * chore(deps): update jest monorepo * chore(deps): update dependency @types/jest to v29.4.0 * chore(deps): update dependency prettier to v2.8.3 * chore(deps): update dependency ts-jest to v29.0.5 * chore(deps): update dependency rimraf to v4 * Update README.md * Update README.md * Update README.md * Update README.md * Update package.json * Update package.json * Update twilio.interface.ts --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: lulu <lucjan.grzesik@gmail.com>
1 parent a85fa5b commit fa7efca

File tree

5 files changed

+439
-398
lines changed

5 files changed

+439
-398
lines changed

.nvmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
18.12.1
1+
18.13.0

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@
1616

1717
Implementing the `TwilioModule` from this package you gain access to Twilio client through dependency injection with minimal setup.
1818

19+
## Upgrade from 3.2.1 to 4.0.0
20+
21+
The Twilio SDK 4.0.0 introduces breaking changes to the SDK - Please refer to [here](https://github.com/twilio/twilio-node/blob/4.0.0-rc.5/UPGRADE.md) for upgrade guide.
22+
1923
## Instalation
2024

2125
```bash

lib/utils/twilio.interface.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
import { Twilio } from 'twilio';
1+
import Twilio from 'twilio/dist/lib/rest/Twilio';
2+
import type { ClientOpts } from 'twilio/dist/lib/base/BaseTwilio';
23

34
export type TwilioClient = Twilio;
45

@@ -8,5 +9,5 @@ export interface ExtraConfiguration {
89
export interface TwilioModuleOptions extends ExtraConfiguration {
910
accountSid: string | undefined;
1011
authToken: string | undefined;
11-
options?: Twilio.TwilioClientOptions | undefined;
12+
options?: ClientOpts | undefined;
1213
}

package.json

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "nestjs-twilio",
3-
"version": "3.2.1",
3+
"version": "4.0.0",
44
"description": "Injectable Twilio client for Nestjs",
55
"license": "MIT",
66
"author": {
@@ -42,8 +42,13 @@
4242
"prepublishOnly": "pinst --disable",
4343
"postpublish": "pinst --enable"
4444
},
45+
"engines": {
46+
"npm": "please-use-yarn",
47+
"yarn": ">=1.17.3",
48+
"node": ">=14.0.0"
49+
},
4550
"dependencies": {
46-
"twilio": "3.84.0"
51+
"twilio": "4.0.0"
4752
},
4853
"peerDependencies": {
4954
"@nestjs/common": ">=9.0.0",
@@ -53,7 +58,7 @@
5358
"@nestjs/common": "9.2.1",
5459
"@nestjs/core": "9.2.1",
5560
"@nestjs/testing": "9.2.1",
56-
"@types/jest": "29.2.4",
61+
"@types/jest": "29.4.0",
5762
"@types/node": "18.11.18",
5863
"@typescript-eslint/eslint-plugin": "^5.38.1",
5964
"@typescript-eslint/parser": "^5.38.1",
@@ -62,14 +67,14 @@
6267
"eslint-config-prettier": "^8.5.0",
6368
"eslint-plugin-prettier": "^4.2.1",
6469
"husky": "^8.0.2",
65-
"jest": "29.3.1",
70+
"jest": "29.4.0",
6671
"lint-staged": "^13.0.3",
6772
"pinst": "^3.0.0",
68-
"prettier": "2.8.1",
73+
"prettier": "2.8.3",
6974
"reflect-metadata": "^0.1.13",
70-
"rimraf": "^3.0.2",
75+
"rimraf": "^4.0.0",
7176
"rxjs": "7.8.0",
72-
"ts-jest": "29.0.3",
77+
"ts-jest": "29.0.5",
7378
"typescript": "4.9.4"
7479
}
7580
}

0 commit comments

Comments
 (0)