@elastic/ems-client
Advanced tools
Comparing version 7.7.1 to 7.8.0
@@ -7,2 +7,7 @@ # Changelog | ||
## [7.8.0] - 2020-03-31 | ||
### Changed | ||
- Moved `node-fetch` to dev dependency for testing instead of client dependency. It's not | ||
always needed and in fact breaks some client-side use of this lib | ||
## [7.7.1] - 2020-03-24 | ||
@@ -9,0 +14,0 @@ ### Changed |
{ | ||
"name": "@elastic/ems-client", | ||
"version": "7.7.1", | ||
"version": "7.8.0", | ||
"description": "JavaScript client library for the Elastic Maps Service", | ||
@@ -30,6 +30,6 @@ "main": "target/node/index.js", | ||
"lodash": "^4.17.15", | ||
"node-fetch": "^1.7.3", | ||
"semver": "^6.3.0" | ||
}, | ||
"devDependencies": { | ||
"node-fetch": "^1.7.3", | ||
"@babel/cli": "^7.6.4", | ||
@@ -36,0 +36,0 @@ "@babel/core": "^7.5.5", |
@@ -23,7 +23,6 @@ /* | ||
import { FileLayer } from './file_layer'; | ||
import fetch from 'node-fetch'; | ||
import semver from 'semver'; | ||
import { format as formatUrl, parse as parseUrl } from 'url'; | ||
const DEFAULT_EMS_VERSION = '7.7'; | ||
const DEFAULT_EMS_VERSION = '7.8'; | ||
@@ -115,2 +114,6 @@ const extendUrl = (url, props) => modifyUrlLocal(url, parsed => _.merge(parsed, props)); | ||
} | ||
if (!fetchFunction || typeof fetchFunction !== 'function') { | ||
throw('No `fetchFunction` provided. This argument is required.'); | ||
} | ||
@@ -133,3 +136,3 @@ this._queryParams = { | ||
this._fetchFunction = typeof fetchFunction === 'function' ? fetchFunction : fetch; | ||
this._fetchFunction = fetchFunction; | ||
this._proxyPath = typeof proxyPath === 'string' ? proxyPath : ''; | ||
@@ -136,0 +139,0 @@ |
@@ -14,4 +14,2 @@ "use strict"; | ||
var _nodeFetch = _interopRequireDefault(require("node-fetch")); | ||
var _semver = _interopRequireDefault(require("semver")); | ||
@@ -25,3 +23,3 @@ | ||
const DEFAULT_EMS_VERSION = '7.7'; | ||
const DEFAULT_EMS_VERSION = '7.8'; | ||
@@ -108,2 +106,6 @@ const extendUrl = (url, props) => modifyUrlLocal(url, parsed => _lodash.default.merge(parsed, props)); | ||
if (!fetchFunction || typeof fetchFunction !== 'function') { | ||
throw 'No `fetchFunction` provided. This argument is required.'; | ||
} | ||
this._queryParams = { | ||
@@ -123,3 +125,3 @@ elastic_tile_service_tos: 'agree', | ||
this._language = typeof language === 'string' ? language : DEFAULT_LANGUAGE; | ||
this._fetchFunction = typeof fetchFunction === 'function' ? fetchFunction : _nodeFetch.default; | ||
this._fetchFunction = fetchFunction; | ||
this._proxyPath = typeof proxyPath === 'string' ? proxyPath : ''; | ||
@@ -126,0 +128,0 @@ |
@@ -34,6 +34,5 @@ function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } } | ||
import { FileLayer } from './file_layer'; | ||
import fetch from 'node-fetch'; | ||
import semver from 'semver'; | ||
import { format as formatUrl, parse as parseUrl } from 'url'; | ||
var DEFAULT_EMS_VERSION = '7.7'; | ||
var DEFAULT_EMS_VERSION = '7.8'; | ||
@@ -127,2 +126,6 @@ var extendUrl = function extendUrl(url, props) { | ||
if (!fetchFunction || typeof fetchFunction !== 'function') { | ||
throw 'No `fetchFunction` provided. This argument is required.'; | ||
} | ||
this._queryParams = { | ||
@@ -144,3 +147,3 @@ elastic_tile_service_tos: 'agree', | ||
this._language = typeof language === 'string' ? language : DEFAULT_LANGUAGE; | ||
this._fetchFunction = typeof fetchFunction === 'function' ? fetchFunction : fetch; | ||
this._fetchFunction = fetchFunction; | ||
this._proxyPath = typeof proxyPath === 'string' ? proxyPath : ''; | ||
@@ -147,0 +150,0 @@ |
@@ -22,2 +22,3 @@ /* | ||
import { EMSClient } from '../src'; | ||
import fetch from 'node-fetch'; | ||
@@ -47,2 +48,3 @@ import EMS_CATALOGUE from './ems_mocks/sample_manifest.json'; | ||
landingPageUrl: 'https://landing.foobar', | ||
fetchFunction: fetch, | ||
...options | ||
@@ -49,0 +51,0 @@ }); |
606709
2
21268
1
7
- Removednode-fetch@^1.7.3
- Removedencoding@0.1.13(transitive)
- Removediconv-lite@0.6.3(transitive)
- Removedis-stream@1.1.0(transitive)
- Removednode-fetch@1.7.3(transitive)
- Removedsafer-buffer@2.1.2(transitive)