Skip to content

Releases: ibm-garage/node-garage-utils

6.0.1

13 Apr 15:07
Compare
Choose a tag to compare

No functional changes. Dependency updates.

6.0.0

21 Sep 14:47
Compare
Choose a tag to compare

⚠ BREAKING CHANGES

  • cfutil: The cfutil CLI has been removed from this package. The code has been preserved in https://github.com/ibm-garage/node-garage-tools, with the intent that it could be published as a separate package if there is a need for it.
  • time: The time API, which was deprecated in version 5.3.0, has now been removed entirely. Clients can declare a dependency directly on Moment.js. If required, they can also copy code from the removed time.js implementation.
  • errors: Minor change to ResponseError: detail, code, and cause properties are always present, even if null or undefined.
  • The minimum supported version of Node.js is now 12.13.0 (LTS Erbium).

Features

Bug Fixes

  • errors: always include detail, code, cause properties on ResponseError, to align with Error.cause on Node 16 (b1a6cb6)

  • require Node.js 12.13.0, as 10.x is out of LTS support (ce7fc6c)

5.3.0

20 Sep 14:54
Compare
Choose a tag to compare

Features

  • time: deprecate the time API (f1c0a58)

5.2.0

30 Nov 20:36
Compare
Choose a tag to compare

Features

  • errors: log the internal server error created in toResponseError(), instead of the underlying cause, to show where it was handled on the stack (bf2db57)

5.1.0

28 Nov 03:20
Compare
Choose a tag to compare

Features

  • errors: expose a custom ResponseError class and do an instanceof check in toResponseError() (0300377)

Note: This is a minor behavior change, in that if you directly create an Error and set a status on it, it will no longer be treated like a proper response error created by responseError(). However, such usage was not anticipated and is not believed to exist, and this change protects against incorrectly treating an arbitrary error that happens to have a status property as an intended HTTP response.

5.0.2

26 Nov 23:06
Compare
Choose a tag to compare

Bug Fixes

  • appEnv: recognize the new Mocha script name (mocha) as test environment (42832ba)

5.0.1

01 Sep 22:42
Compare
Choose a tag to compare

No functional changes. Dependency updates.

5.0.0

30 Mar 23:45
Compare
Choose a tag to compare

This is a major release that reworks the errors API, removes the deprecated cf API, and drops support for obsolete Node.js releases.

⚠ BREAKING CHANGES

  • The cf API, which was deprecated in version 4.1.0, has now been removed entirely. Clients should adopt the new cloudEnv API, which works in both Cloud Foundry and Kubernetes environments, or use the cfenv package directly.
  • The minimum supported version of Node.js is now 10.13.0 (LTS Dubnium).
  • errors: the errors API is completely changed. All clients using it must be updated accordingly.
    • errors.error() is replaced by errors.responseError(), which no longer takes detail and cause separately as arguments, but together in an options argument.
    • All the error factory functions (badRequest(), unauthorized(), etc.) now take a single, standard options argument, instead of varying arguments per function.
    • responseBody() is replaced by toResponseBody(), which has a new options argument.

Features

  • errors: introduce a more flexible API to support deatils, codes, and causes on all errors (2465aa2)

Chores

  • remove cf API (b473b63)
  • update dependencies, require Node 10.13.0, and reformat code with Prettier (5a8f5fb)

4.3.0

24 Mar 23:14
Compare
Choose a tag to compare

Features

  • appEnv: handle more environments, finding rootDir from entry point when installed in an external node_modules (c625680)

4.2.0

11 Nov 15:06
Compare
Choose a tag to compare

Features

  • logger: support pretty printing application logs according to LOG_FORMAT (and by default in development) (f0a3d80)