Skip to content

v2.0.0

Compare
Choose a tag to compare
@craigbeck craigbeck released this 01 May 19:11
· 61 commits to master since this release

The Racer codebase is now in TypeScript, with bundled type definitions in the package!

There are only a few breaking changes, and preparation for them can be done on racer@1, prior to upgrading.

Breaking changes

  • The Model class is now an abstract class, so it should no longer be directly constructed. Use createModel() instead.
    • For example, new racer.Model() -> racer.createModel()
    • Directly trying to construct Model can result in errors like Cannot set properties of undefined (setting 'socket') from Model.createConnection
  • Drop support for Node 10-14
  • When using backend.modelMiddleware(), req objects will no longer have the deprecated getModel() function.
    • Switch to the req.model reference added by the middleware, if you haven't already.
  • The root module racer now individually exports functions and classes, instead of the entire module export being an instance of a Racer class.
    • It should be functionally equivalent, but this change is documented for completeness.
  • For the model.bundle() called used in Derby's server-side rendering, a customized default time limit can no longer be set via a static Model.BUNDLE_TIMEOUT property.
    • The only way to set a custom timeout now is passing the { bundleTimeout: timeoutInMs } option to createModel().
    • If no custom timeout is provided, a system default of 10 seconds will be applied.

What's Changed

Full Changelog: v1.1.0...v2.0.0