5.4 - 7 Feb
PLEASE NOTE! YOU NEED TO UPGRADE TO 4.35 BEFORE UPGRADING TO 5.xx
Incompatibilities and deprecations
- The WHFS hooks (whfs_file_aftercontentupdate, whfs_file_aftermetadataupdate, whfs_folder_aftermetadataupdate, whfs_object_afterinstancedataupdate) have been removed
- WRD 'worldinfo' has been removed and address storage has been simplified to better support HTML5 autofill. (plus, noone was able to really maintain worldinfo and
a lot of data was either outdated or unverified). This will cause all existing addresses to be converted and most of the existing country-specific address format info to be lost.
- If you have foreign addresses in your database, please test the conversion and report any issues
- The conversions are logged in the debug logfile, which is normally saved for 30 days. If you suspect issues with the conversion be sure to save this log
- Country codes in addresses are now always uppercase ISO 3166 2-letter country codes.
- Please contact us or file issues about countries that matter to you and now have an incorrect address fields or foramtting. We will fix the address formats that actually matter to users as long as we're able to verify the supplied information in some way.
- The experimental Feedback application has been disabled for now. You can browse existing feedback but not submit new feedback.
CallAsync
is a transitional solution for invoking JS functions and will never be supported under WASM. You should switch toImportJS
instead (it is supported under both WASM and native harescript modes although behaviour may differ)- libgit2 has been replaced with direct calls to the git binary and with isomorphic-git. this may affect the dev module (eg. it may ignore some global configuration now)
- Some log files have switched to JSON lines.
- WRD schema settings have been deprecated. Most of these settings will be migrated to a WRD_SETTINGS entity with a wellknown GUID
Things that are nice to know
- WRD can now automatically delete closed entities (by setting
deleteclosedafter
to the number of days to keep closed entities) - Scheduled tasks in the dashboard now have a button to reschedule all failed tasks
- Newly created WRD entities will select WRD_GUIDs that are compatible with UUIDv4 (the proper bits will be set). Existing WRD_GUIDs aren't converted and their format in HareScript is unchanged
- Extensive support for building type-safe OpenAPI servers in TypeScript has been added.
- Editors with unsaved content can now show a 'pending changes' corner on their application tab (try it in eg. the Publisher RTD editor) and will warn if you attempt to navigate away without saving.
- The
etr
debug flag can now be set globally (wh debug enable etr
) to get better information when invoking eg. RPCs- Be careful enabling this on publicly accessible installations - stack traces and error/exception messages may leak information to third parties
- Two new
rowkeytypes
have been introduced for Tollium lists:entityid
andfsobjectid
. Using these allows the 'magic menu' (alt+shift+rightclick) to offer WRD and WHFS specific actions for rows- The WRD app now offers 'goto wrdId' on its opening screen to quickly jump to a schema and entity by ID (no more separate
?app=wrd(12345)
browser tabs)
- The WRD app now offers 'goto wrdId' on its opening screen to quickly jump to a schema and entity by ID (no more separate
- RTD tablestyles can now disable widgets and limit available paragraph styles
- We are now recommending VS Code instead of Sublime as the standard WebHare editor.
- The original WebHare Sublime extension is no longer supported. LSP-Sublime should still work
- Other editors may still have support modules (and as much as possible functionality will be offered through a language server) but may not offer featury parity with the VS Code WebHare extension
- When running
wh console
in a terminal CTRL+Z will also suspend all subprocesses - WRD now has a
json
datatype which stores records using JSON encoding and supports attaching TypeScript types. - Tollium compositions now add
onload
andonstore
to manipulate the value set/get to a composition
Things you should do
- Verify if the WRD address conversion is causing issues for you
- Authentication scripts implementing login pages should use IsWHSafePublicEndpoint to check whether they need to protect a URL or let traffic go through instead of trying to maintain the exception URL list themselves.
- Long term all special WebHare URLs will move under
/.wh/
- Long term all special WebHare URLs will move under
TypeScript/JavaScript highlights
- The JavaScript WRD engine now uses the UUID format for wrdGuids. Use UUIDToWrdGuid and wrdGuidToUUID (@webhare/hscompat) to convert between the HareScript and JS formats
- The JavaScript WRD engine now uses male/female/other for wrdGender, not 1/2/3.
- A new Money type has been added by @webhare/std to replace finmath. (But eventually we hope ECMAScript will ship with a proper Decimal type)
- The HareScript engine and most of its libraries are now available as a WASM module in backend code (just use
loadlib
from @webhare/harescript). Usingwh runwasm
will run HareScript code using the WASM engine- HareScript code invoked this way from JavaScript will share transactions and commit/rollback to work
- HareScript code running under WASM can use
ImportJS
- this will not spawn a helper process like CallAsync does but run in the JavaScript engine hosting the HareScript code, giving much lower overhead - Keep in mind that some functionality (eg Drawlib, Word conversion, process management, TCP/IP) may never be offered in the WASM HareScript engine
- In WASM the HareScript WebBrowser object is implemented on top of fetch.whlib and some behavior may differ.
- Use
IsWASM()
to check whether HareScript code is running natively or under WASM
- A couple of
@webhare/
libraries embedded in WebHare are now also published to NPM to make it easier to interface with and reuse WebHare code - Tasks and WebHare services (called 'backend services' in JavaScript) can run both HareScript and JavaScript code, and can be invoked from either language. These are often the easiest solution to connect JavaScript and HareScript
@webhare/dompack
is available as a replacement fordompack
. It has dropped most deprecated APIs and offers extensive TypeScript support.