Skip to content

v6.1.0

Choose a tag to compare

@github-actions github-actions released this 25 Oct 00:50
· 64 commits to main since this release

See Upgrading to 6.1 for what apps need to
change.

Behaviour changes

  • server: S3 storages use aws-lite instead of the AWS SDK and multer-s3:
    • Install @aws-lite/client and @aws-lite/s3 instead of @aws-sdk/client-s3 and @aws-sdk/lib-storage.
    • s3 needs region and credentials, which no longer come from environment variables or ~/.aws, see S3StorageConfig.
    • Object options like acl or cacheControl take strings only, and apply to imported files too.
    • Without url, files get the URL of the bucket. The MulterS3File type is removed.
  • server: UserMixin rejects hash in all untrusted input, not only in UsersController.
  • server: Asset signatures cover the files' metadata, so admin pages that were open during the update need a reload before saving files.
  • server: ctx.transaction no longer emits 'commit' and 'rollback'.
  • server: ctx.logIn() and ctx.logOut() are removed: use ctx.login() and ctx.logout().
  • admin: Empty values and defaults, see Empty values:
    • A null written while editing stays until saving, e.g. when clearing a number to type another one. Saving and copying replace it with the default, or the empty value of the type, in values that aren't nullable.
    • The clear button of fields with nullable: false sets their default.
    • Custom types declare their data type with getProperty(). treatsNullAsMissing is removed.
  • admin: required arrays need one item everywhere, also in written properties and custom types. minItems: 0 accepts none, see Types and limits of fields.
  • admin: Several fields of the same value take each rule and option, e.g. minLength or trim, from the first field that sets it, and validate the value once.
  • admin: Trees take details instead of properties, with the type Details.
  • admin: Removed: DitoFormEmbedded (use DitoForm) and context.nested.
  • admin: Renamed classes: dito-root--overlay-sidebar and --sliding-sidebar are on .dito-page as dito-page--…, dito-tree-item--dragging is dito-draggable--dragging, and .dito-properties of trees is .dito-tree-item__details.
  • admin: The login dialog shows icons in its fields, and its Forgot? button moves into the password field.
  • admin: "is required" shows before the other messages of a value.
  • ui: The Sass placeholders are BEM modifiers, e.g. %field--has-errors or %icon--clear.
  • ui: DitoInput spaces its prefix and suffix by its padding.
  • router: Routes with several params in one segment, e.g. /a/:x-:y, throw when added.
  • router: getAllowedMethods(path) adds the prefix itself, as find() does.

New

  • admin: Input affixes can be buttons, and affixes with hover: true only show while hovering, as the clear button does now.
  • admin: getProperty() of custom types, e.g. getProperty: () => ({ type: 'number' }).
  • ui: A lock icon.

Fixes

  • server:
    • $refs in anyOf and oneOf reject unknown properties again, as in 3.5.
    • Files stored in a transaction that rolls back are removed again, in all transactions.
    • Clients can't overwrite stored files by sending asset files back with data.
    • S3 storages give imported and copied files a URL.
  • admin, forms:
    • Removing an item whose form has unsaved changes closes the form, instead of keeping it on the removed item.
    • The validation notification lists the errors of hidden fields.
    • Enter submits dialogs only once.
    • Forms of useDitoForm() that fail to set up log the error instead of loading.
    • Panels with an object as data no longer write into the schema.
    • notify() no longer breaks lists in html paragraphs apart.
  • admin, fields:
    • Options that are 0, false or '' are selected like other options.
    • Values without an option show as unavailable for all kinds of options.
    • A failed upload keeps the file that was there before.
    • nullable and trim callbacks of text fields are respected.
    • Empty strings that are options stay ''.
    • DitoSelectField and DitoRadioField throw for arrays, pointing to the fields that support them.
    • A named DitoCustomField emits change on blur, and its content fills the field.
  • admin, resources:
    • Resource functions receive the method of the request and return their own method and query.
    • Buttons whose resource function reads its parent submit again.
  • admin, trees: Items without children can show their details, and details respect their if.
  • admin, layout:
    • Pages are wide only for wide forms again.
    • The menu shows no empty items.
    • Back from an object without data no longer loops.
    • Large sections and lists open fast again.
  • admin, types: Resources without type and all standard autocomplete values type-check.
  • ui:
    • Collapsible sections open smoothly again.
    • aria-invalid="false" shows no error.
  • schema: decimals accepts numbers in exponent form, e.g. 1e-7.
  • utils: equals() handles objects without prototype, and html([]) returns an empty value.

Internal

  • admin, schema: The packages no longer publish their tests.