5.7 - 26 April 2025
PLEASE NOTE! YOU NEED TO UPGRADE TO 4.35 BEFORE UPGRADING TO 5.xx
Incompatibilities and deprecations
- OpenAPI services must declare
defaulterror
if you usecreateErrorResponse
(https://www.webhare.dev/manuals/typescript/openapi/) - Drops the default import from @webhare/jsonrpc-client
- Generation and modification of .tar.gz files has been removed. WebHare itself will use ZIP everywhere
- Socialite's GetRSSFeed no longer caches feeds in the database, and will be removed in the future
- This removes callHareScript - use loadlib instead.
- WebHare no longer allows you to have the whdata folder inside whtree
- Word doc support has been dropped from MakeEmailComposer
wh update-generated-files
has been replaced withwh apply dev
- bigints are now encoded with $stdType: bigint instead of $stdType: BigInt. we will still be able to read old stringified values, so we expect the impact to be minimal
- external tools that process access, audot or pxl log files may need to be changed to support JSON
- frontendConfig and whintegration.config will be deprecated in the future in favor of get/setFrontendData
- openBackendService without a class or explicit type now returns an object without any properties. use <any> if you really do not want to define the client shape
- pxl no longer uses the doNotTrack setting
- remove legacy image rescaling API GfxResizeImageBlob
- removes support for @storage- libraries.
- we no longer attempt to transpile .js files in the backend, so they actually need to be js files now (ie: no import but require!)
wildcardsToRegExp
has been removed - it has proven itself to be too much of a footgun (you still need to wrap the result in /...$ and this was often forgotten). it's functionality has been added toescapeRegExp
as a wildcards parameterisLive
has been deprecated, checkdtapStage
instead.- Some lowercase
backendConfig
properties have been deprecated. proper camcelCase versions have been added. - WHFS APIs now use Temporal.Instants instead of Date objects for creationdate and modificationdate
- eslint has been upgraded to version 9, which may change the name/tag of some messages.
Things that are nice to know
- New API GfxResizeAndOpenImage - open a resized image, retain refpoint information
- WH versions 5.7.1 and 5.6.4 (and up) support syncing mixed-case fields in WRD JSON attributes
wh service force-terminate-all
kills all running processes started (indirectly) by a WH service manager- access & pxl logfile formats are now in JSON
- Adds a built-in
devkit
module that will eventually absorb thedev
module's functionality- this module is not activated in Docker/Podman images unless you explicitly set the WEBHARE_ENABLE_DEVKIT=1 environment vairiable
- add
wh devkit:createmodule
- add interface definitions to BackendServices and all openBackendService calls can pick these up automatically
- adds
fetchResource
to @webhare/services - download remote files with WebHare managed cache (useful for CI tests) - adds
getFrontendData
/setFrontendData
to type-safely transfer data to frontend pages - adds
moduleFileTypes
to moduledefiniton.yml to set up validation and type generation for your own YAML files - adds toNumber() to Money
- allow dynamic OpenAPI service definition (
initHook
) - allows composition/cellname on
<authenticationsettings>
for easier integration in apps. - ansi library to print nice colors in CLI applications
- better inform users about broken vimeo search
wh devkit:es2ts
converts existing modules with ES files to TS/TSX- enable
accountstatus="active"
to add awrdauthAccountStatus
field that must be set to 'active' to be allowed to log in (to prevent unactivated accounts using a password reset to log in) - new storeDiskFile options
- pass
mkdir:true
option to storeDiskFile to recursively create the parent dir - pass
onlyIfChanged:true
to avoid rewriting files if the contents haven't changed (reduces fsevent-triggered cache invalidations)
- pass
- regExpFromWildcards builds a RegExp from one or more wildcard masks
- allows ypou to globally set the default image format to AVIF or WEBP in Dashboard > Global settings. This then affects all image resize methods that do not explicitly set a format.
- you can use
format := "keep"
in a resize method to keep explicigly the original format - the quality scale for WEBP/AVIF work differently than for JPEG. if you set
quality :=
in a resize method, be sure to also explicitly set the desired format.
- you can use
- std.stdTypeOf returns the std-recognized type of an object - it recognizes Date, Money and Blob
- support indeterminate checkboxes in lists
- support running package tests
- test.eq and test.eqPartial now accept a function in their 'expected' argument which allows you to write a custom test for that value. eg
test.eq( odd => odd % 2 === 1, testVal, "verify testVal is odd)
. this is useful when comparing deep values - test.wait() adds a test option to define its exit condition
- use
setupDataLayerTags
to automatically pick up data-wh-datalayer-onclick-xxx="yyy" - you explicitly set the
pi
pxl option to an external id or top 'anonymous' to override userids. session ids are managed independently - npm/package issues are now grouped per module in
wh check
WEBHARE_DEBUG=apr
now works to profile wasm-executed HareScript code- WRD Auth
@webhare/frontend
s WRD authentication now prefixes authentication cookies with __Host-/__Secure- where possibleprepareFrontendLogin
allows implementation of 'login as' like functionality and allows you to add claims to recognize a login-as- The HareSrcript WRDAuth plugin has added
GetClaims()
to read these claims in HareScript code
- Quality can now be explicitly set for AVIF/WEBP
- Various improvement to WebHare startup for faster CI runs
TypeScript/JavaScript highlights
- New RPC library
@webhare/rpc
- WebHare rpc using typed JSON. This is now the recommended RPC method if the service you're invoking is implemented in TypeScript and gives full support for eg. Temporal types - Integrates the Temporal polyfill in all backend code - you should be able to use it right away.
- Frontend code should explicity load
import "@webhare/deps/temporal-polyfill";
to get Temporal support in code and in WebHare rpcs.
- Frontend code should explicity load
- Adds
@webhare/cli
to easily createwh
command line tools with autocomplete support and offers ANSI color support. This will replace our use ofcommander
- Adds
@webhare/zip
to create and unpack.zip
files - Adds
@webhare/office-formats
to generate.xlsx
files - Adds
@webhare/auth
for token and API key management - Adds SortedMultiSet and SortedMultiMap to
@webhare/std
as a proper alternative for RecordLowerBound etc uses. - Adds
compare
andcompareProperties
as safer Array, SortedMultiSet and SortedMultiMap sort functions (eg proper 'number' support instead of sorting alphabetically, Date and temporal support) - pushTodataLayer validates ecommerce events (compile time only using TypeScript)
- Adds
@webhare/tolium-iframe-api
for easier communication with Tollium<iframe>
hosts and to synchronize styling with Tollium
To get the full list of changes between 5.6 and 5.7 yourself, use: git log $(git merge-base master origin/release/5.6)..$(git merge-base master origin/release/5.7)