Skip to content

Releases: xpresserjs/framework

Added LICENSE and updated Packages

25 Jan 20:00
Compare
Choose a tag to compare

Added an MIT LICENSE file.

Updated 'fs-extra`

Updated Packages & Changed how empty string values in body is converted to null

30 Aug 17:54
Compare
Choose a tag to compare
  • Using sync middleware function instead of async when converting empty string body values to null
  • Updated Typescript
  • Updated Moment
  • Updated Moment Timezone

Add http.onError function to handle all errors

26 May 19:30
Compare
Choose a tag to compare

if using a custom RequestEngine.ts you can define a method called onError() to handle all thrown errors in any http request.

See How To Extend Request Engine

class MyRequestEngine extends $.extendedRequestEngine() {

     onError(error, formattedError){
         // Respond how ever you wish
         this.send({message: error.message. formattedError});
     } 

}

Xpresser checks if this function exists and then calls it.

Added types of `fs` and `fsExtra` in fileEngine

10 Mar 22:27
Compare
Choose a tag to compare

Added types of fs and fsExtra in fileEngine. Thanks to @techieoriname
Also updated packages.

No Breaking Change

Added Detailed Logger

21 Jan 15:14
Compare
Choose a tag to compare

The request logger has been refactored to display more (optional) data.

See: debug.requests config.

Upgraded Object-collection

01 Jan 17:55
Compare
Choose a tag to compare

Updated Xpresser to version 0.26.0
This version includes minor Typescript Related breaking changes regarding the new typed object-collection

Since object-collection is widely used in xpresser you may now need to declare types when accessing object-collection instances.

For example

// This may throw a type error
const name = http.$body.get("name");

// Proper way.
const name: string = http.$body.get("name");

// OR
// Proper way.
const name = http.$body.get<string>("name");