Skip to content

Commit

Permalink
Merge branch 'master' into CLEN-1127
Browse files Browse the repository at this point in the history
  • Loading branch information
mohitpubnub authored Aug 10, 2023
2 parents 85af6b4 + 9584344 commit 3d6a321
Show file tree
Hide file tree
Showing 20 changed files with 509 additions and 547 deletions.
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',
},
};
4 changes: 3 additions & 1 deletion .github/workflows/commands-handler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ jobs:
process:
name: Process command
if: github.event.issue.pull_request && endsWith(github.repository, '-private') != true
runs-on: ubuntu-latest
runs-on:
group: Default Larger Runners
labels: ubuntu-latest-m
steps:
- name: Check referred user
id: user-check
Expand Down
17 changes: 9 additions & 8 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ on:
jobs:
check-release:
name: Check release required
runs-on: ubuntu-latest
runs-on:
group: Default Larger Runners
labels: ubuntu-latest-m
if: github.event.pull_request.merged && endsWith(github.repository, '-private') != true
outputs:
release: ${{ steps.check.outputs.ready }}
Expand All @@ -27,7 +29,9 @@ jobs:
token: ${{ secrets.GH_TOKEN }}
publish:
name: Publish package
runs-on: ubuntu-latest
runs-on:
group: Default Larger Runners
labels: ubuntu-latest-m
needs: check-release
if: needs.check-release.outputs.release == 'true'
steps:
Expand All @@ -43,16 +47,13 @@ jobs:
ref: v1
token: ${{ secrets.GH_TOKEN }}
path: .github/.release/actions
- name: configure aws credentials
uses: aws-actions/configure-aws-credentials@v2
with:
role-to-assume: ${{ secrets.AWS_ROLE_ARN }}
role-session-name: javascript-sdk-s3-upload
aws-region: us-east-1
- name: Publish to S3
uses: ./.github/.release/actions/actions/services/aws
with:
token: ${{ secrets.GH_TOKEN }}
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
auth-method: access-key
content-type: application/javascript
content-encoding: gzip
acl: public-read
Expand Down
10 changes: 7 additions & 3 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,13 @@ env:
jobs:
tests:
name: Integration and Unit tests
runs-on: ubuntu-latest
runs-on:
group: Default Larger Runners
labels: ubuntu-latest-m
strategy:
fail-fast: true
matrix:
node: [12, 14, 16]
node: [14, 16]
env: ["ci:node"]
include:
- node: 16
Expand Down Expand Up @@ -49,7 +51,9 @@ jobs:
uses: ./.github/.release/actions/actions/utils/fast-jobs-failure
all-tests:
name: Tests
runs-on: ubuntu-latest
runs-on:
group: Default Larger Runners
labels: ubuntu-latest-m
needs: [tests]
steps:
- name: Tests summary
Expand Down
8 changes: 6 additions & 2 deletions .github/workflows/run-validations.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@ defaults:
jobs:
pubnub-yml:
name: "Validate .pubnub.yml"
runs-on: ubuntu-latest
runs-on:
group: Default Larger Runners
labels: ubuntu-latest-m
steps:
- name: Checkout project
uses: actions/checkout@v3
Expand All @@ -33,7 +35,9 @@ jobs:
uses: ./.github/.release/actions/actions/utils/fast-jobs-failure
all-validations:
name: Validations
runs-on: ubuntu-latest
runs-on:
group: Default Larger Runners
labels: ubuntu-latest-m
needs: [pubnub-yml]
steps:
- name: Validations summary
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-26
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
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
## v7.3.0
July 26 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
5 changes: 2 additions & 3 deletions dist/web/pubnub.js
Original file line number Diff line number Diff line change
Expand Up @@ -768,7 +768,7 @@
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 Expand Up @@ -6266,7 +6266,6 @@
handleResponse: handleResponse$4
});

/* */
function getOperation$3() {
return OPERATIONS.PNMessageCounts;
}
Expand All @@ -6277,7 +6276,7 @@
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
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

0 comments on commit 3d6a321

Please sign in to comment.