Skip to content
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

CLEN-1406/Fix proxy agent dependency upgrade #331

Merged
merged 11 commits into from
Jul 26, 2023
1 change: 1 addition & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,6 @@ module.exports = {
'class-methods-use-this': 0,
'no-prototype-builtins': 1,
'prefer-destructuring': 0,
'@typescript-eslint/explicit-module-boundary-types': 'off',
},
};
2 changes: 1 addition & 1 deletion .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
strategy:
fail-fast: true
matrix:
node: [12, 14, 16]
node: [14, 16]
env: ["ci:node"]
include:
- node: 16
Expand Down
11 changes: 8 additions & 3 deletions .pubnub.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
---
changelog:
- date: 2023-07-25
version: v7.3.0
changes:
- type: bug
text: "Fixes issue of severe vulnerability warnings for vm2 usage."
- date: 2023-06-19
version: v7.2.3
changes:
Expand Down Expand Up @@ -875,7 +880,7 @@ supported-platforms:
- 'Ubuntu 14.04 and up'
- 'Windows 7 and up'
version: 'Pubnub Javascript for Node'
version: '7.2.3'
version: '7.3.0'
sdks:
- full-name: PubNub Javascript SDK
short-name: Javascript
Expand All @@ -891,7 +896,7 @@ sdks:
- distribution-type: source
distribution-repository: GitHub release
package-name: pubnub.js
location: https://github.com/pubnub/javascript/archive/refs/tags/v7.2.3.zip
location: https://github.com/pubnub/javascript/archive/refs/tags/v7.3.0.zip
requires:
- name: 'agentkeepalive'
min-version: '3.5.2'
Expand Down Expand Up @@ -1562,7 +1567,7 @@ sdks:
- distribution-type: library
distribution-repository: GitHub release
package-name: pubnub.js
location: https://github.com/pubnub/javascript/releases/download/v7.2.3/pubnub.7.2.3.js
location: https://github.com/pubnub/javascript/releases/download/v7.3.0/pubnub.7.3.0.js
requires:
- name: 'agentkeepalive'
min-version: '3.5.2'
Expand Down
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
## v7.3.0
July 25 2023

#### Fixed
- Fixes issue of severe vulnerability warnings for vm2 usage.

## v7.2.3
June 19 2023

Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ You will need the publish and subscribe keys to authenticate your app. Get your
npm install pubnub
```
* or download one of our builds from our CDN:
* https://cdn.pubnub.com/sdk/javascript/pubnub.7.2.3.js
* https://cdn.pubnub.com/sdk/javascript/pubnub.7.2.3.min.js
* https://cdn.pubnub.com/sdk/javascript/pubnub.7.3.0.js
* https://cdn.pubnub.com/sdk/javascript/pubnub.7.3.0.min.js

2. Configure your keys:

Expand Down
1,411 changes: 705 additions & 706 deletions dist/web/pubnub.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/web/pubnub.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion lib/core/components/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ var default_1 = /** @class */ (function () {
return this;
};
default_1.prototype.getVersion = function () {
return '7.2.3';
return '7.3.0';
};
default_1.prototype._addPnsdkSuffix = function (name, suffix) {
this._PNSDKSuffix[name] = suffix;
Expand Down
3 changes: 1 addition & 2 deletions lib/core/endpoints/history/message_counts.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
"use strict";
/* */
var __read = (this && this.__read) || function (o, n) {
var m = typeof Symbol === "function" && o[Symbol.iterator];
if (!m) return o;
Expand Down Expand Up @@ -34,7 +33,7 @@ function validateParams(modules, incomingParams) {
return 'Missing channel';
if (timetoken && channelTimetokens)
return 'timetoken and channelTimetokens are incompatible together';
if (timetoken && channelTimetokens && channelTimetokens.length > 1 && channels.length !== channelTimetokens.length) {
if (channelTimetokens && channelTimetokens.length > 1 && channels.length !== channelTimetokens.length) {
return 'Length of channelTimetokens and channels do not match';
}
if (!config.subscribeKey)
Expand Down
4 changes: 2 additions & 2 deletions lib/networking/modules/node.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
Object.defineProperty(exports, "__esModule", { value: true });
exports.keepAlive = exports.proxy = void 0;
var superagent_1 = __importDefault(require("superagent"));
var superagent_proxy_1 = __importDefault(require("superagent-proxy"));
var agentkeepalive_1 = __importDefault(require("agentkeepalive"));
var proxyAgent_1 = __importDefault(require("../proxyAgent"));
var keepAliveAgent = null;
var keepAliveSecureAgent = null;
(0, superagent_proxy_1.default)(superagent_1.default);
(0, proxyAgent_1.default)(superagent_1.default);
function proxy(superagentConstruct) {
return superagentConstruct.proxy(this._config.proxy);
}
Expand Down
15 changes: 15 additions & 0 deletions lib/networking/proxyAgent.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var proxy_agent_1 = require("proxy-agent");
function default_1(superagent) {
var Request = superagent.Request;
Request.prototype.proxy = proxy;
return superagent;
}
exports.default = default_1;
function proxy(proxyConfiguration) {
var agent = new proxy_agent_1.ProxyAgent(proxyConfiguration);
if (agent)
this.agent(agent);
return this;
}
Loading