Uneventful
    Preparing search index...
    root: Scope

    The "main" context of the program or bundle, which all other tasks and contexts should be a child of. This provides a single point of configuration and cleanup, as one can e.g.:

    • Use root.asyncCatch() to define the default async error handling policy
    • Use root.end() to clean up all resources for the entire program
    • Use root.start() to create top-level, standalone, or "daemon"/service tasks, or to create tasks whose lifetime is managed by an external framework.

    By default, there is only ever one root scope in a given process or page. But for testing you can use newRoot to end the existing root and replace it with a new one.

    Uneventful does not include any code to end the root scope itself, as the decision of when and whether to do that varies heavily by context (e.g. server vs. browser, app vs. plugin, etc.), and often doesn't need to happen at all. (Because exiting the process or leaving the web page is often sufficient.)

    More commonly, you will only end the root scope when running tests (to get a clean environment for the next test), or when your entire bundle is itself an unloadable plugin (e.g. in Obsidian).

    Note, too, that when the root scope ends, root is reset to null so that any subsequent attempt to use the root scope will throw an exception. (Unless of course a new root has been created with newRoot.)