From 30e9b4f3b7f861a00410e685a3e5c00b6e54cc9d Mon Sep 17 00:00:00 2001 From: Arlen Beiler <439872+Arlen22@users.noreply.github.com> Date: Wed, 12 Nov 2025 16:41:29 -0500 Subject: [PATCH] Add change notes as requested in #9406 (#9435) * Add change notes as requested in #9406 * fix username casing --- editions/tw5.com/tiddlers/releasenotes/5.4.0/#9103.tid | 10 ++++++++++ editions/tw5.com/tiddlers/releasenotes/5.4.0/#9135.tid | 10 ++++++++++ 2 files changed, 20 insertions(+) create mode 100644 editions/tw5.com/tiddlers/releasenotes/5.4.0/#9135.tid diff --git a/editions/tw5.com/tiddlers/releasenotes/5.4.0/#9103.tid b/editions/tw5.com/tiddlers/releasenotes/5.4.0/#9103.tid index 73e4a41cbf..e9611e1f37 100644 --- a/editions/tw5.com/tiddlers/releasenotes/5.4.0/#9103.tid +++ b/editions/tw5.com/tiddlers/releasenotes/5.4.0/#9103.tid @@ -6,3 +6,13 @@ change-type: enhancement change-category: developer github-links: https://github.com/TiddlyWiki/TiddlyWiki5/pull/9103 github-contributors: Arlen22 + +This adds support for async functions to commands and startups. + +In both `synchronous: true` and `synchronous: false` mode, if you return a promise (manually or by using the async keyword), it will wait for the promise to resolve, and then proceed using the resolved value as the return value of the function. + +Importantly, in `synchronous: false` mode, returning a promise will not change the callback behavior. So you can safely use an async function and still call the callback to continue execution. + +Previously, in `synchronous: true` mode, returning a promise would have just logged the promise to console and halted execution. Now the promise will be awaited, and if the value is truthy, it will be logged to console and halt execution. If the promise resolves to a falsy value, execution will continue. This is the main breaking change, but since logging an opaque promise to console is the most useless of all error messages, this is unlikely to seriously break anything in practice. Throwing anything, truthy or not, will still stop execution (in `synchronous: true` mode). + +This also does not add any error handling code. Rejected promises should still be logged to console as unhandled rejections just as uncaught exceptions are currently. \ No newline at end of file diff --git a/editions/tw5.com/tiddlers/releasenotes/5.4.0/#9135.tid b/editions/tw5.com/tiddlers/releasenotes/5.4.0/#9135.tid new file mode 100644 index 0000000000..e90f9b262e --- /dev/null +++ b/editions/tw5.com/tiddlers/releasenotes/5.4.0/#9135.tid @@ -0,0 +1,10 @@ +title: $:/changenotes/5.4.0/#9135 +description: Update ESLint target to ES2017 +release: 5.4.0 +tags: $:/tags/ChangeNote +change-type: enhancement +change-category: developer +github-links: https://github.com/TiddlyWiki/TiddlyWiki5/pull/9135 +github-contributors: Arlen22 + +Updates the eslint config to check for syntax newer than ES2017. This uses a plugin to check for newer syntax, for better error messages, and may need to be updated regularly along with eslint to catch the latest features. \ No newline at end of file