All notable changes to this project will be documented in this file automatically by Versionist. DO NOT EDIT THIS FILE MANUALLY! This project adheres to Semantic Versioning.
- Update balena-auth to 6.0.1 [Thodoris Greasidis]
- Increase TOKEN_REFRESH_INTERVAL from 1 hours to 1 day [Otávio Jacobi]
- fix: throw BalenaExpiredToken only when token is really expired [Otávio Jacobi]
- Include the response headers in BalenaRequestErrors [Thodoris Greasidis]
- Stop using require-npm4-to-publish [Thodoris Greasidis]
- Add multi part request support when File-like is present [Otávio Jacobi]
- Update @balena/lint to 7.2.0 Update @balena/lint from 5.4.1 to 7.2.0 [Otávio Jacobi]
- Update @balena/lint to 7.2.0 Update @balena/lint from 5.4.1 to 7.2.0 [Otávio Jacobi]
- Drop support for node 14 & 16 [Otávio Jacobi]
- Refactor the interceptors to stop using .reduce() [Thodoris Greasidis]
- Avoid deep imports from balena-auth [Thodoris Greasidis]
- Update balena-auth to 5.1.0 [Thodoris Greasidis]
- Make
url
a normal dependency [Thodoris Greasidis]
- Update balena-auth to 5.0.0 [Thodoris Greasidis]
- Update TypeScript to 5.1.6 [Thodoris Greasidis]
- Update mockttp to v3.8.0 [Thodoris Greasidis]
- Drop support for node < 14 [Thodoris Greasidis]
- Add querystring-es3 polyfill to fix browser tests [Thodoris Greasidis]
- tsconfig: Enable skipLibCheck to avoid mockttp nested dependency errors [Thodoris Greasidis]
- Update TypeScript to 4.9.5 [Thodoris Greasidis]
- patch: Update flowzone.yml [Kyle Harding]
- Update balena-errors to v4.7.3 [JSReds]
- Delete redundant .resinci.yml [Thodoris Greasidis]
- Fix overriding the whole webpack resolve section of karma tests [Thodoris Greasidis]
- Replace balenaCI with flowzone [Thodoris Greasidis]
- Fix tests in node 18 [Thodoris Greasidis]
- Specify the supported node engines in the package.json [Thodoris Greasidis]
- Fix the typings to properly mark the auth parameter as optional [Thodoris Greasidis]
- Update TypeScript to 4.8.3 [Thodoris Greasidis]
- Fix extracting the response error from object response bodies [Thodoris Greasidis]
- Drop explicit karma-chrome-launcher devDependency [Thodoris Greasidis]
- Use response error as response message if there is one [Matthew Yarmolinsky]
- Drop circle.yml [Thodoris Greasidis]
- Drop mochainon & bump karma [Thodoris Greasidis]
- Convert tests to JavaScript and drop coffeescript [Thodoris Greasidis]
- Fix the jsdoc generation [Thodoris Greasidis]
- Convert to typescript and publish typings [Thodoris Greasidis]
- Allow overriding the default zlib flush setting [Kyle Harding]
- Allow more lenient gzip decompression [Kyle Harding]
- Update fetch-ponyfill to v7 [Thodoris Greasidis]
- Switch to the versioned token refresh endpoint [Thodoris Greasidis]
- Prevent token refresh when no base url is provided [Thodoris Greasidis]
- Update balena-auth from 4.0.0 to 4.1.0 [josecoelho]
- Stop refreshing the token on absolute urls [Thodoris Greasidis]
- Add lazy loading for most modules [Pagan Gazzard]
- Fix body overwriting on nodejs [Pagan Gazzard]
- Add .versionbot/CHANGELOG.yml for nested changelogs [Pagan Gazzard]
- Fix tslib dependency [Pagan Gazzard]
- Fix passing baseUrl to refreshToken if the request uses an absolute url [Pagan Gazzard]
- Change the browser request timeout error to be consistent with node [Thodoris Greasidis]
- Bump balena-config-karma & convert karma.conf.coffee to js [Thodoris Greasidis]
- Switch to a named export [Pagan Gazzard]
- Update fetch-ponyfill to 6.x [Pagan Gazzard]
- Remove rindle dependency [Pagan Gazzard]
- Update balena-auth to 4.x [Pagan Gazzard]
- Drop support for nodejs < 10 [Pagan Gazzard]
- Switch to returning native promises [Pagan Gazzard]
- Convert to type checked javascript [Pagan Gazzard]
- Use native check in favour of isEmpty [Pagan Gazzard]
- Use Object.assign to emulate lodash/defaults [Pagan Gazzard]
- Switch to native includes [Pagan Gazzard]
- Remove lodash noop usage [Pagan Gazzard]
- Switch to native Object.assign [Pagan Gazzard]
- Remove lodash/parseint [Pagan Gazzard]
- Use @balena/node-web-streams instead of a GitHub branch [Thodoris Greasidis]
- Add the build directory to the .gitignore [Thodoris Greasidis]
- Update github target [Pagan Gazzard]
- Update dependencies [Pagan Gazzard]
- Increase the default timeout from 30s to 59s [Pagan Gazzard]
- Use a prepare script to build on install via git and remove built files [Pagan Gazzard]
- Fix invalid balena-auth peer dependency [Thodoris Greasidis]
- Update to new fetch-readablestream that properly supports abort() [Tim Perry]
- Rename everything 'resin' to 'balena' [Tim Perry]
- Use resinCI for publishing to npm [Thodoris Greasidis]
- Stream: Fix Edge bug that causes sending wrong request headers [Thodoris Greasidis]
- Chore: Add headless Chrome parameters to work on ResinCi [Thodoris Greasidis]
- Add method to do the token refresh #120 [amdomanska]
- Ensure request errors whilst streaming are passed on #119 [Tim Perry]
- Handle errors in aborted requests to avoid uncaught exception warnings #119 [Tim Perry]
- Fake Abort in environments with Node streams #118 [Tim Perry]
- Fake Abort in environments with cancellable response bodies #118 [Tim Perry]
- Support Abort signals where natively available #118 [Tim Perry]
- Add support for streaming in the browser #116 [Tim Perry]
- Return the whole body when having a non-object error property #114 [Thodoris Greasidis]
- Update jsdoc-to-markdown to fix #110 #112 [Tim Perry]
- Set up circleci npm autopublishing #109 [Tim Perry]
- Reformat changelog to add versionbot #108 [Tim Perry]
- Using resin-auth instead of resin-token
- Allow requests to be sent without a token using
sendToken: false
, even if one exists
- Added the new
responseFormat
option tosend
to define the explicit response body format - Added proxy support tests
- Fix bug with token error handling when code is minified
- Stopped trying to resolve the token if none is provided
- Updated rindle so that bluebird and lodash can be deduped
- Removed unused
resin-token
import, so that it's possible to use the module with api keys without installingresin-token
- Peer depend on resin-token 4.0.0
- Include request config in errors from failed requests
- Don't add
accept-encoding
in browsers by default (since it doesn't work)
- Added request interception support.
- Internal refactoring of mocking the fetch requests. New
getRequest._setFetch
method added.
- Breaking: Resin-Token must now be injected, rather than being built internally
- Fixed bug where no timeouts were set
- Timeouts now abort underlying requests (in Node only)
- Breaking: Timeouts in requests now use the Bluebird implementation. This changes how errors are thrown slightly: a
Promise.TimeoutError
is now thrown instead of a rawError
, with the message "operation timed out" instead of "timeout". - Fetch is now provided internally (by
Fetch-ponyfill
), so isomorphic-fetch is no longer required in downstream applications.
- Include 'duration' in debug output, if enabled
- Added a 'retries' option you can pass to
send()
, to set the number of times to retry failing requests, or togetRequest
directly to set the default number of retries.
- Fixed: in specific environments (like Chrome 54)
Response.body
is a getter that is impossible to overwrite. As a result it's always the original instance of the ReadableStream. We now clone the response object before assigning the parsed body.
- Lazy-load the dependencies that are not used by the browser code.
- Added the missing
qs
dependency.
- Breaking! Switch to factory pattern in order to make it work with the new resin-token
- Fix the
apikey
query param name
- Updated
resin-token
to v2.4.3 - Run tests in the browser
- Updated node versions to be run on Travis and AppVeyor
- Breaking! Take API Key as a query option
- Breaking! Decouple resin-request from resin-settings-client
- Ensure query strings are not encoded when passing an
api_key
.
- Prevent passing an undefined
api_key
query string.
- Add API key support via
RESIN_API_KEY
.
- Upgrade dependencies.
- Fix README example indentation.
- Remove token if its expired.
- Throw
ResinExpiredToken
if there is a saved token but its expired.
- Show debug information when passing
DEBUG=true
.
- Only set a timeout default on non-streaming HTTP requests.
- Set a default timeout of 30 seconds.
- Support
baseUrl
option.
- Add
statusCode
property toResinRequestError
instances.
- Remove custom stream
.length
property.
- Make sure we send an
Accept-Encoding
header on streaming requests. - Only disable
gzip
on streaming requests. - Enable
strictSSL
by default. - Change license to Apache 2.0.
- Fix
X-Transfer-Length
header not being interpreted correctly.
- Fix
X-Transfer-Length
decompression bug.
- Fix compressed/uncompressed data piping bug.
- Fallback to
X-Transfer-Length
if noContent-Length
.
- Upgrade
resin-settings-client
to v3.0.0.
- Translate
percent
topercentage
in progress event.
- Implement stream custom
.mime
property.
- Document stream custom
.length
property.
- Use response
Content-Length
to determine streamlength
.
- Fix random error when piping a stream.
- Fix unit tests in Appveyor.
- Upgrade
resin-token
to v2.4.1.
- Prevent Authorization header from being undefined, which resulted on an exception in
request@2.53.0
.
- Use
tokenRefreshInterval
setting instead oftokenValidityTime
, to decide if it's time to refresh the token.
- Add
eta
property to progress state. - Refresh session token at an interval.
- Reject
request.stream()
with the request body if response status code doesn't determine a success.
- Upgrade
resin-token
, which now stops validating a token with the server.
- JSDoc documentation.
- License to every source files.
- Implement
request.stream()
.
- Support promises.
- Improved README documentation.
- Rename
request()
tosend()
.
- Move
onProgress
callback tooptions
object.
- Upgrade Resin Settings Client to v1.0.1, which defaults remoteUrl to api.resin.io.
- Fix pipe issue.
- Print node-request progress state on
DEBUG
.
- Configure Hound CI correctly.
- Print request method on
DEBUG
.
- Improve error logging support.
- Implement
DEBUG
flag.
- Make use of resin-settings-client to retrieve
options.remoteUrl
.
options.token
option is now obsolete, as the token is fetched automatically with resin-token.