v3.0.0
Derby is now in Typescript!
Although converted, there are some remaining changes needed before full types can be published along side the javascript code.
Breaking changes
Sub-path import changes
This only affects you if you were requiring modules from sub-paths inside Derby, e.g. require('derby/lib/App')
.
If you are exclusively using the top-level package, i.e. require('derby')
, you should be unaffected.
Code is now compiled to dist/
, and we now are using exports
in package.json
to declare exported code. Previously where consumers would have something like const App = require('derby/lib/App')
, App
is now exported from derby/App
using named exports e.g.
import { App } form 'derby/App'
2-parameter PageForServer#render() parameter swap
The 2-param form of pageForServer.render()
has had its parameters swapped, so the view name comes first and the status second.
The 1-param form is unchanged, with the view name being the first and only parameter.
Before:
pageForServer.render('some:namespace:my-page');
pageForServer.render(404, 'some:namespace:404');
After:
pageForServer.render('some:namespace:my-page'); // Unchanged
pageForServer.render('some:namespace:404', 404); // View name first, status second