Releases: raveljs/ravel
Release 0.17.14
Fix for #163
Release 0.17.13
Fix for #161
Release 0.17.12
Documentation improvements concerning logging ( #157 )
Release 0.17.11
It turns out TypeScript supports decorators on generator methods! Ravel will be moving to TypeScript as its default/recommended JavaScript transpiler for the time being until issues with babel are fixed.
Please keep in mind that Ravel is not a TypeScript framework. All of the examples continue to be ES6+Decorators exclusively. It is simply recommended to use TypeScript as an ES6+Generators => ES6 transpiler (though you are welcome to try TypeScript itself with Ravel).
When using the TypeScript transpiler on your js source, be sure to enable allowJs
, experimentalDecorators
and set target='ES6'
.
From now on, Resource
and Routes
classes can take full advantage of the originally-intended syntax for Ravel:
@inject('cities')
class CitiesResource extends Resource {
// ... constructor ...
// notice the koa-like syntax of the handler function
@before('anotherMiddleware')
*get(ctx) {
ctx.body = yield this.cities.getCity(ctx.params.id);
}
}
Release 0.17.10
- Removing some undocumented behaviour (see #149)
Routes
andResource
handler methods can now return a generator function as well as Promises. The generator will be wrapped withco
and executed appropriately. This is a stepping stone to when ES2016 decorators can be used on generator methods:
@inject('users')
class UsersResource extends Resource {
constructor(users) {
this.users = users;
}
@before('something')
getAll(ctx) {
return function*() {
// assume users.getAllUsers returns a Promise
ctx.body = yield this.users.getAllUsers();
}.bind(this);
}
}
Release 0.17.9
Maintenance release containing upgraded dependencies. See #147 for details.
Release 0.17.8
Removes koa-redis dependency in favour of an equivalent, internal implementation. This removes the need for two separate redis connections, as well as two sets of potentially incompatible redis libraries.
Release 0.17.7
Fix for #142