Release notes v0.0.81

Compared to v0.0.79 this is a very small release.

Chores

We currently test PR's against internal projects that use lbu. Currently, it is only a single frontend and backend project, but soon an extra frontend and backend will be added. The builds are failing if either E2E fronted I or E2E backend I are still on a PR.

Code gen

We also added T.searchable() this allows to have reusable type definitions for things like strings and numbers, but do not want to have it as sql searchable everywhere.

Store

The biggest part of this release focuses on store. There is now an optional 'meta' field on 'file'. This is a breaking migration. We also try to resolve migration imports better, by checking nested node_modules and following the main and exports keys from the package.json of a nested namespace.

Then there is also support for recurring jobs, by providing a name and an interval. Lbu will schedule your jobs on an interval, making sure that only a single job with the provided name is active. It is also possible to provide a priority. The scheduled job will always have a higher priority than the job that is scheduling.

It boils down to approximately the following:

  • Call addRecurringJobToQueue(sql, { name: "foo", interval: { hours: 1 } }) Check if there is an incomplete 'scheduling'-job for name 'foo', if not create one.
  • JobQueueWorker has special handling for the 'scheduling'-job, which is handled internally.
  • The special handler creates a job scheduled for 'now' with name 'foo'
  • The special handler creates a new 'scheduling'-job, taking the interval into account.

These recurring jobs can be scheduled by using addRecurringJobToQueue only available by importing and not on a JobQueueWorker.

In closing

We are currently working on a refactor of the code generator. This has mostly breakages in exports, sql relations and various types. I want to give my sincere apologies in advance for all breaking changes in the next release. That's all for now.