Skip to content

Commit d88f6c0

Browse files
authored
chore: updating twilio & other deps (#55)
* chore: updating twilio & other deps * fix: update package json * fix: ISSUE-50 engines warrning during install
1 parent e2d91d0 commit d88f6c0

File tree

8 files changed

+527
-524
lines changed

8 files changed

+527
-524
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ on:
55
branches: ['**', '!master']
66
pull_request:
77
branches: ['release/*']
8+
workflow_dispatch:
89

910
jobs:
1011
build:

.github/workflows/create-release.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ jobs:
99
runs-on: ubuntu-latest
1010
steps:
1111
- uses: actions/checkout@v3
12-
- name: Set up Node.js 16.x
12+
- name: Set up Node.js 18.x
1313
uses: actions/setup-node@v3
1414
with:
15-
node-version: '16.x'
15+
node-version: '18.x'
1616
registry-url: 'https://registry.npmjs.org'
1717
# This step provides me the information about package (version) from package.json.
1818
- name: Grant access to bash scripts
@@ -26,6 +26,6 @@ jobs:
2626
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2727
with:
2828
tag_name: v${{steps.pkg-info.outputs.package-version}}
29-
release_name: Release ${{steps.pkg-info.outputs.package-version}}
29+
release_name: Release v${{steps.pkg-info.outputs.package-version}}
3030
draft: true
3131
prerelease: false

.github/workflows/publish.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ jobs:
1010
runs-on: ubuntu-latest
1111
steps:
1212
- uses: actions/checkout@v3
13-
- name: Set up Node.js 16.x
13+
- name: Set up Node.js 18.x
1414
uses: actions/setup-node@v3
1515
with:
16-
node-version: '16.x'
16+
node-version: '18.x'
1717
registry-url: 'https://registry.npmjs.org'
1818
- name: Installing dependecies with yarn
1919
run: yarn install

jest.config.js

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
11
module.exports = {
22
preset: 'ts-jest',
3-
globals: {
4-
'ts-jest': {
5-
tsconfig: './tsconfig.test.json',
6-
},
3+
transform: {
4+
'.test.ts$': [
5+
'ts-jest',
6+
{
7+
tsconfig: './tsconfig.test.json',
8+
},
9+
],
710
},
811
testRegex: '.test.ts$',
912
collectCoverageFrom: ['lib/**/*.*.ts'],

lib/utils/twilio.interface.ts

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

45
export type TwilioClient = Twilio;
56

lib/utils/twilio.utils.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
import { TwilioClient } from './twilio.interface';
22
import { OPTIONS_TYPE } from './twilio.module-definition';
33

4-
import * as Twilio from 'twilio';
4+
import { Twilio } from 'twilio';
55

6-
export function createTwilioClient(options: typeof OPTIONS_TYPE): TwilioClient {
7-
const client = Twilio.default(
8-
options.accountSid,
9-
options.authToken,
10-
options.options,
11-
);
6+
export function createTwilioClient({
7+
accountSid,
8+
authToken,
9+
options,
10+
}: typeof OPTIONS_TYPE): TwilioClient {
11+
const client = new Twilio(accountSid, authToken, options);
1212

1313
return client;
1414
}

package.json

Lines changed: 14 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "nestjs-twilio",
3-
"version": "4.1.0",
3+
"version": "4.1.1",
44
"description": "Injectable Twilio client for Nestjs",
55
"license": "MIT",
66
"author": {
@@ -42,35 +42,30 @@
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-
},
5045
"dependencies": {
51-
"twilio": "4.7.2"
46+
"twilio": "^4.7.2"
5247
},
5348
"peerDependencies": {
5449
"@nestjs/common": ">=9.0.0",
5550
"@nestjs/core": ">=9.0.0"
5651
},
5752
"devDependencies": {
58-
"@nestjs/common": "9.3.7",
59-
"@nestjs/core": "9.3.7",
60-
"@nestjs/testing": "9.3.7",
53+
"@nestjs/common": "9.3.9",
54+
"@nestjs/core": "9.3.9",
55+
"@nestjs/testing": "9.3.9",
6156
"@types/jest": "29.4.0",
62-
"@types/node": "18.13.0",
63-
"@typescript-eslint/eslint-plugin": "^5.38.1",
64-
"@typescript-eslint/parser": "^5.38.1",
57+
"@types/node": "18.14.0",
58+
"@typescript-eslint/eslint-plugin": "^5.52.0",
59+
"@typescript-eslint/parser": "^5.52.0",
6560
"dotenv": "^16.0.3",
66-
"eslint": "^8.24.0",
67-
"eslint-config-prettier": "^8.5.0",
61+
"eslint": "^8.34.0",
62+
"eslint-config-prettier": "^8.6.0",
6863
"eslint-plugin-prettier": "^4.2.1",
69-
"husky": "^8.0.2",
70-
"jest": "29.4.0",
71-
"lint-staged": "^13.0.3",
64+
"husky": "^8.0.3",
65+
"jest": "29.4.3",
66+
"lint-staged": "^13.1.2",
7267
"pinst": "^3.0.0",
73-
"prettier": "2.8.3",
68+
"prettier": "2.8.4",
7469
"reflect-metadata": "^0.1.13",
7570
"rimraf": "^4.0.0",
7671
"rxjs": "7.8.0",

0 commit comments

Comments
 (0)