Comparing version 0.8.1 to 0.9.0
@@ -6,2 +6,8 @@ All notable changes to this project will be documented in this file. | ||
## [0.9.0] - 2020-09-13 | ||
### Added | ||
- possibility to pass array as an url, it will be url joined | ||
### Dev | ||
- dep upgrade | ||
## [0.8.1] - 2020-04-14 | ||
@@ -8,0 +14,0 @@ ### Fixed |
@@ -78,2 +78,10 @@ "use strict"; | ||
const getJoinedUrl = url => { | ||
if (Array.isArray(url)) { | ||
return (0, _urlJoin.default)(...url); | ||
} | ||
return url; | ||
}; | ||
const globalOptions = { | ||
@@ -111,6 +119,6 @@ // eslint-disable-line object-shorthand | ||
if (useTimeoutError) { | ||
return new _errors.TimeoutHttpError(`Request aborted because of timeout`, lastError, errorDetails); | ||
return new _errors.TimeoutHttpError("Request aborted because of timeout", lastError, errorDetails); | ||
} | ||
return new _errors.AbortedHttpError(`Request aborted`, lastError, errorDetails); | ||
return new _errors.AbortedHttpError("Request aborted", lastError, errorDetails); | ||
}; | ||
@@ -186,6 +194,6 @@ | ||
// @todo throw an Error ? | ||
return url; | ||
return getJoinedUrl(url); | ||
} | ||
const parsedUrl = safeUrlParse(url); | ||
const parsedUrl = safeUrlParse(getJoinedUrl(url)); | ||
@@ -197,3 +205,3 @@ if (parsedUrl && parsedUrl.base) { | ||
return (0, _urlJoin.default)(base, url); | ||
return (0, _urlJoin.default)(base, getJoinedUrl(url)); | ||
} | ||
@@ -200,0 +208,0 @@ |
{ | ||
"name": "api-reach", | ||
"version": "0.8.1", | ||
"version": "0.9.0", | ||
"repository": "https://github.com/dzek69/api-reach.git", | ||
@@ -28,3 +28,3 @@ "author": "Jacek Nowacki @dzek69 <git-public@dzek.eu>", | ||
"@babel/polyfill": "^7.8.7", | ||
"@babel/preset-env": "^7.8.7", | ||
"@babel/preset-env": "^7.11.5", | ||
"@babel/register": "^7.8.6", | ||
@@ -31,0 +31,0 @@ "@dzek69/eslint-config-base": "^1.0.1", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1407176
2276