Skip to content

v0.26.0

Compare
Choose a tag to compare
@noam-honig noam-honig released this 08 Apr 15:26
· 171 commits to main since this release

Features

  • Added support for migrations. See Migrations.
  • Added an error hook to RemultServerOptions that is called whenever there is an error in the API lifecycle. See RemultServerOptions.
  • Added ForbiddenError to the API, you can throw it anywhere in the request lifecycle to display a forbidden 401 error.
  • Added @Fields.literal and @Fields.enum.
  • Added support for better-sqlite3 without knex, see Connection a Database.
  • Added support for bun:sqlite #387.
  • Added a generic implementation for sqlite that can be easily extended to any provider.
  • Added apiPreprocessFilter and backendPreprocessFilter, see access control.
  • Added a way to analyze filter and query it - Filter.getPreciseValues, which returns a FilterPreciseValues object containing the precise values for each property. see access control.
  • Added an exception when calling updateMany or deleteMany without a filter - to protect against accidental deleting/updating all data.
  • Added updateMany and deleteMany to OpenAPI (swagger) & graphql

Improvements

  • Added validation for @Fields.number & Fields.integer that the value is a valid number.
  • Added "basic" supports for environments where async hooks doesn't work well - mostly for web based dev machines.
  • Improved the API of rawFilter so it can now return the SQL where to be added to the command. see Leveraging Custom Filters for Enhanced Data Filtering
  • KnexDataProvider now supports all execute and createCommand and can be used with any SqlDatabase functionality.
  • Changed postgres schema builder to use timestamptz instead of timestamp.
  • Changed the default storage of @Fields.object to text (varchar max) instead of string 255 in knex and sqlite.

Documentation Updates

Bug Fixes

  • Fixed an issue with entity ids that included date.
  • Fixed an issue with repo(Entity,dataProvider) - where saving wasn't fired because of wrong isProxy inference.
  • Fixed an issue with chaining of validators that in some cases caused a validator to be overwritten.
  • Fixed ValueConverters Number fromInput handle 0 as a valid value.

Breaking Changes

  • Changed the signature of updateMany and deleteMany to require a where parameter: repo(Task).delete({ where: { completed: true } }).
  • Changed the signature of getDb to receive DataProvider as a parameter instead of Remult.
  • Changed the POST REST API queries to include the filter under the where key in the body - previously, it included the filter as the body itself.

New Contributors

Full Changelog: v0.25.8...v0.26.0