Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions .github/workflows/unitTests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,14 @@ jobs:

strategy:
matrix:
node-version: [11.x, 12.x, 13.x, 14.x, 15.x, 16.x, 18.x, 20.x]
node-version: [11.x, 12.x, 13.x, 14.x, 15.x, 16.x, 18.x, 20.x, 22.x, 24.x, 25.x]

steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
- run: npm install request
- run: npm install
- run: npm test

Expand All @@ -37,7 +36,6 @@ jobs:
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
- run: npm install request
- run: npm install
- run: npm test
- name: Upload coverage to Codecov
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
# Change Log
## [v4.75.3](https://github.com/plivo/plivo-node/tree/v4.75.3) (2025-11-25)
**Vulnerabilities Fix**
- removed dependency on request
-
## [v4.75.2](https://github.com/plivo/plivo-node/tree/v4.75.2) (2025-10-15)
**Feature - Compliance application rejection reason**
- Added `rejectionReason` to compliance application responses (get, create)
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ start:

test:
@[ "${CONTAINER}" ] && \
(docker exec -it $$CONTAINER /bin/bash -c "npm install request --no-save && npm test") || \
(npm install request --no-save && npm test)
(docker exec -it $$CONTAINER /bin/bash -c "npm test") || \
(npm test)

run:
@[ "${CONTAINER}" ] && \
Expand Down
17 changes: 15 additions & 2 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,18 @@ var isparta = require('isparta');
const merge = require("merge-stream");
// Initialize the babel transpiler so ES2015 files gets compiled
// when they're loaded
require('babel-register');
require('babel-register')({
ignore: function(filePath) {
// Ignore all node_modules (including axios) - they're already transpiled or CommonJS
// axios is CommonJS and doesn't need transpilation
if (filePath.includes('node_modules')) {
return true;
}
return false;
},
presets: ['es2015', 'flow'],
extensions: ['.js', '.jsx', '.es6', '.es']
});

gulp.task('static', function () {
return gulp.src(['lib/**/*.js', '!lib/rest/request-test.js', '!lib/rest/client-test.js'])
Expand All @@ -35,7 +46,9 @@ gulp.task('pre-test', function () {
.pipe(excludeGitignore())
.pipe(istanbul({
includeUntested: false,
instrumenter: isparta.Instrumenter
instrumenter: isparta.Instrumenter,
// Exclude node_modules (including axios) from instrumentation
ignore: ['**/node_modules/**']
}))
.pipe(istanbul.hookRequire());
});
Expand Down
6 changes: 5 additions & 1 deletion lib/rest/axios.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
import * as Exceptions from '../utils/exceptions';
import * as _ from "lodash";

import axios from 'axios';
// Use require() for axios CommonJS build to ensure compatibility with Node.js v11+
// axios v1.x's main entry (index.js) uses ES modules which Node.js v11 doesn't support
// We need to use the CommonJS build directly: axios/dist/node/axios.cjs
// This file is pre-compiled CommonJS and works on all Node.js versions
const axios = require('axios/dist/node/axios.cjs');
import queryString from 'querystring';
import http from 'http';
import https from 'https';
Expand Down
1 change: 0 additions & 1 deletion lib/rest/request-test.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import queryString from 'querystring';
import request from 'request';

export function Request(config) {
let auth = 'Basic ' + new Buffer(config.authId + ':' + config.authToken)
Expand Down
223 changes: 0 additions & 223 deletions lib/rest/request.js

This file was deleted.

3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "plivo",
"version": "4.75.2",
"version": "4.75.3",
"description": "A Node.js SDK to make voice calls and send SMS using Plivo and to generate Plivo XML",
"homepage": "https://github.com/plivo/plivo-node",
"files": [
Expand Down Expand Up @@ -67,7 +67,6 @@
"jsonwebtoken": "^9.0.0",
"lodash": "^4.17.4",
"querystring": "^0.2.0",
"request": "^2.88.2",
"uri-parser": "^1.0.0",
"utf8": "^2.1.2",
"xml2js": "^0.5.0",
Expand Down