[REL] v2.4.1

# v2.4.1

 - [FIX] app: make subroots more robust
 - [IMP] devtools: show objects class name and add special extension cases
 - [IMP] devtools: allow expansion of empty class
 - [IMP] Bump support for Node 20+
This commit is contained in:
Romeo Fragomeli
2024-10-31 10:42:38 +01:00
parent b8d09e523d
commit 26c7856d5d
5 changed files with 20 additions and 7 deletions
+17 -3
View File
@@ -2270,6 +2270,12 @@ function collectionsProxyHandler(target, callback, targetRawType) {
}
let currentNode = null;
function saveCurrent() {
let n = currentNode;
return () => {
currentNode = n;
};
}
function getCurrent() {
if (!currentNode) {
throw new OwlError("No active component (a hook function should only be called in 'setup')");
@@ -5557,7 +5563,7 @@ function compile(template, options = {}) {
}
// do not modify manually. This file is generated by the release script.
const version = "2.4.0";
const version = "2.4.1";
// -----------------------------------------------------------------------------
// Scheduler
@@ -5568,6 +5574,7 @@ class Scheduler {
this.frame = 0;
this.delayedRenders = [];
this.cancelledNodes = new Set();
this.processing = false;
this.requestAnimationFrame = Scheduler.requestAnimationFrame;
}
addFiber(fiber) {
@@ -5598,6 +5605,10 @@ class Scheduler {
}
}
processTasks() {
if (this.processing) {
return;
}
this.processing = true;
this.frame = 0;
for (let node of this.cancelledNodes) {
node._destroy();
@@ -5611,6 +5622,7 @@ class Scheduler {
this.tasks.delete(task);
}
}
this.processing = false;
}
processFiber(fiber) {
if (fiber.root !== fiber) {
@@ -5686,7 +5698,9 @@ class App extends TemplateSet {
if (config.env) {
this.env = config.env;
}
const restore = saveCurrent();
const node = this.makeNode(Root, props);
restore();
if (config.env) {
this.env = env;
}
@@ -6018,6 +6032,6 @@ TemplateSet.prototype._compileTemplate = function _compileTemplate(name, templat
export { App, Component, EventBus, OwlError, __info__, batched, blockDom, loadFile, markRaw, markup, mount, onError, onMounted, onPatched, onRendered, onWillDestroy, onWillPatch, onWillRender, onWillStart, onWillUnmount, onWillUpdateProps, reactive, status, toRaw, useChildSubEnv, useComponent, useEffect, useEnv, useExternalListener, useRef, useState, useSubEnv, validate, validateType, whenReady, xml };
__info__.date = '2024-09-30T08:49:29.420Z';
__info__.hash = 'eb2b32a';
__info__.date = '2024-10-31T09:42:30.824Z';
__info__.hash = 'b8d09e5';
__info__.url = 'https://github.com/odoo/owl';