Releases: derbyjs/racer
Releases · derbyjs/racer
v2.2.2
What's changed
- Have Racer's compiler use typescript@5.4 without "use strict;" directives, instead of latest typescript@5.5
- The "use strict;" appears to cause some issues with LocalDoc in certain cases, so it's now left out again from Racer's JS files, matching v2.1.1 and before.
Full Changelog: v2.2.1...v2.2.2
v2.2.1
_
-prefixed model paths, first introduced in v2.2.0. The issues are not present in v2.1.1 and before, and they should be fully resolved in racer@2.2.2.
What's Changed
- [TS typings] Fixes for TypeScript type issues introduced in racer@2.2.0 / TS 5.5 by @ericyhwang in #313
- Fix TS error when doing Derby
app.use(plugin, options)
with a strongly-typed plugin function- The error looked like
Argument of type '(app: App, appName: string) => void' is not assignable to parameter of type '(arg0: unknown, options?: unknown) => void'.
- The error looked like
- Fix Derby compilation error
Property 'createConnection' does not exist on type 'RootModel'.
- Fix TS error when doing Derby
Full Changelog: v2.2.0...v2.2.1
v2.2.0
_
-prefixed model paths. The issues should be resolved in racer@2.2.2.
What's Changed
- [TS typings] Allow
model.ref
'sto
param to be a Query or Filter, to match what's accepted at runtime by @ericyhwang in #311 - Deprecate named reactive functions (
model.start
with a string as the last argument); fix type for reactive fn args by @craigbeck in #312- To share a reactive function between multiple components, you should export it and then require/import it into each file that needs to use it.
- This resolves a TS error when providing
model.start
with a reactive function that mixesunknown
with stronger types. Previously, it was OK with when the function was either allunknown
types or all "strong" non-unknown
types. Now, a mix ofunknown
and stronger types is allowed.
Documentation updates
- Update Racer jsdoc documentation by @craigbeck in #309
- Update README by @craigbeck in #310
Full Changelog: v2.1.1...v2.2.0
v2.1.1
What's Changed
- [TS typings] In
model.add
callback's error parameter, removenull
from type union by @deongroenewald in #308- This resolves typing issues for consumer code written prior to v2.1.0 calling
model.add
with a callback typed as(error?: Error) => void
.
- This resolves typing issues for consumer code written prior to v2.1.0 calling
New Contributors
- @deongroenewald made their first contribution in #308
Full Changelog: v2.1.0...v2.1.1
v2.1.0
🚀 Enhancement
- Add methods getOrDefault and getOrThrow #307 (@craigbeck)
- Add getValues method for fetching array of docs from collection #306 (@craigbeck)
🐛 Bug Fix
- Resolve
addPromised
with new docid
#305 (@craigbeck)
⚠️ Pushed to master
- Ignore .env file (@craigbeck)
Authors: 1
- Craig Beck (@craigbeck)
v2.0.1
v2.0.0
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. UsecreateModel()
instead.- For example,
new racer.Model()
->racer.createModel()
- Directly trying to construct
Model
can result in errors likeCannot set properties of undefined (setting 'socket')
fromModel.createConnection
- For example,
- Drop support for Node 10-14
- When using
backend.modelMiddleware()
,req
objects will no longer have the deprecatedgetModel()
function.- Switch to the
req.model
reference added by the middleware, if you haven't already.
- Switch to the
- 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 staticModel.BUNDLE_TIMEOUT
property.- The only way to set a custom timeout now is passing the
{ bundleTimeout: timeoutInMs }
option tocreateModel()
. - If no custom timeout is provided, a system default of 10 seconds will be applied.
- The only way to set a custom timeout now is passing the
What's Changed
- Racer 2 by @craigbeck in #302
Full Changelog: v1.1.0...v2.0.0
v2.0.0-beta.22
- RacerBackend type-only export and serverRequire backend in createBackend d106e83
v2.0.0-beta.21
v2.0.0-beta.20
- Consolidate types; remove Model/types e63049f
- Remove returns from create and createNull d60661a
- Ensure promised methods typed as Promise<void> 54628e5
- Make fetch callback optional as is everywhere else 2d4a30e
- Update doc url 147e1c9
- Update doc links to new addresses fbc1d05
- Return to previous implementation now that filter fn always required to have a value 2a88194
- FilterFn required in all cases; additionally add string as type for named functions 8139098