Skip to content

v4.8.0

Choose a tag to compare

@lehni lehni released this 17 Oct 22:36
· 376 commits to main since this release

Behaviour changes

  • router: Paths without a route for the request's method respond with 404 instead of 405 or 501 (#328).
  • router: HEAD requests run the GET route of their path. GET handlers with side effects need to check ctx.method (#329).
  • router: Methods can be passed in any case to add(), find() and getAllowedMethods() (#335).
  • router: Routes with * or ** inside a segment, e.g. /files/*.json, or with a param inside a segment after **, throw when added.
  • admin: The login and logout labels read "Sign In" and "Sign Out" (#344).
  • admin: Dialogs focus their submit button, also in confirmations, so Enter confirms.
  • admin: Fields only validate on blur when they were edited.
  • server: A place in the data that several overlapping asset data paths reach, e.g. 'content.items[**].file' and '**.file', counts once and uses the first path's storage. Apps with overlapping paths should run db:recount_assets after upgrading (#385, #387).
  • utils: debounceAsync() resolves each call with the result of its own run, and cancel() only settles calls that still wait (#347, #349).
  • utils: equals() never treats values of different types as equal, and compares typed arrays element by element (#373).
  • utils: * in getValueAtDataPath() keeps values that are arrays instead of merging them (#357).
  • utils: normalizeDataPath() and resolveDataPath() throw for a .. that leads above the root (#358).
  • utils: capitalize() doesn't start new words after digits, e.g. '1st'. This can also change the column names of generated join tables (#356).
  • utils: escapeHtml() escapes single quotes (#359).
  • utils: isAbsoluteUrl() only accepts valid characters in schemes (#360).

New

  • ui: DitoMenuButton takes floating, which opens the menu as a separate panel below the button (#344).
  • admin: The account menu opens as a floating panel (#344).
  • utils: isTypedArray() checks for typed arrays, including Node.js buffers (#350).

Fixes

  • router: Fixes to matching *, ** and params next to each other (#330–#334).
  • router: A trailing slash in the prefix option is ignored (#336).
  • admin: Color fields validate the color typed into them on blur (#390).
  • admin: Everything behind the topmost dialog is inert.
  • server: toJSON() no longer replaces a record's own asset files with the signed copies (#388).
  • utils: isUrl() stays fast for long invalid URLs, and accepts URLs ending in ? or # (#348).
  • utils: clone() copies typed arrays and Node.js buffers (#350).
  • utils: deindent interpolates null and undefined (#352).
  • utils: toCallback() calls its callback only once (#353).
  • utils: flatten() handles arrays of any length (#354).
  • utils: Invalid data paths, e.g. numbers, throw a clear error (#369).