Skip to content

Commit 9bc4395

Browse files
author
Perki
committed
Updated superagent and other deps
1 parent a4d5be3 commit 9bc4395

File tree

6 files changed

+368
-483
lines changed

6 files changed

+368
-483
lines changed

components/pryv-monitor/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@pryv/monitor",
3-
"version": "2.3.9",
3+
"version": "2.4.0",
44
"description": "Extends `pryv` with event-driven notifications for changes on a Pryv.io account",
55
"keywords": [
66
"Pryv",

components/pryv-socket.io/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@pryv/socket.io",
3-
"version": "2.3.9",
3+
"version": "2.4.0",
44
"description": "Extends `pryv` with Socket.IO transport",
55
"keywords": [
66
"Pryv",

components/pryv/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "pryv",
3-
"version": "2.3.9",
3+
"version": "2.4.0",
44
"description": "Pryv JavaScript library",
55
"keywords": [
66
"Pryv",
@@ -15,7 +15,7 @@
1515
"url": "git://github.com/pryv/lib-js"
1616
},
1717
"dependencies": {
18-
"superagent": "^8.0.6"
18+
"superagent": "^9.0.0"
1919
},
2020
"license": "BSD-3-Clause",
2121
"author": "Pryv S.A. <info@pryv.com> (https://pryv.com)",

components/pryv/test/Connection.test.js

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -369,6 +369,11 @@ describe('Connection', () => {
369369

370370
if (typeof window === 'undefined') {
371371
describe('Browser mock', function () {
372+
const isNotAvailable = {
373+
URL: global.URL == null,
374+
URLSearchParams: global.URLSearchParams == null,
375+
fetch: global.fetch == null
376+
};
372377
beforeEach(function () {
373378
const browser = new Browser();
374379
browser.visit('./');
@@ -378,18 +383,18 @@ describe('Connection', () => {
378383
function fetch (...args) {
379384
return browser.fetch(...args);
380385
}
381-
global.fetch = fetch;
382-
global.URL = URL;
383-
global.URLSearchParams = URLSearchParams;
386+
if (isNotAvailable.fetch) global.fetch = fetch;
387+
if (isNotAvailable.URL) global.URL = URL;
388+
if (isNotAvailable.URLSearchParams) global.URLSearchParams = URLSearchParams;
384389
});
385390

386391
afterEach(function () {
387392
delete global.document;
388393
delete global.window;
389394
delete global.location;
390-
delete global.fetch;
391-
delete global.URL;
392-
delete global.URLSearchParams;
395+
if (isNotAvailable.fetch) delete global.fetch;
396+
if (isNotAvailable.URL) delete global.URL;
397+
if (isNotAvailable.URLSearchParams) delete global.URLSearchParams;
393398
});
394399

395400
it(' without fetch', async () => {

0 commit comments

Comments
 (0)