[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; let currentNode = null;
function saveCurrent() {
let n = currentNode;
return () => {
currentNode = n;
};
}
function getCurrent() { function getCurrent() {
if (!currentNode) { if (!currentNode) {
throw new OwlError("No active component (a hook function should only be called in 'setup')"); 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. // do not modify manually. This file is generated by the release script.
const version = "2.4.0"; const version = "2.4.1";
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
// Scheduler // Scheduler
@@ -5568,6 +5574,7 @@ class Scheduler {
this.frame = 0; this.frame = 0;
this.delayedRenders = []; this.delayedRenders = [];
this.cancelledNodes = new Set(); this.cancelledNodes = new Set();
this.processing = false;
this.requestAnimationFrame = Scheduler.requestAnimationFrame; this.requestAnimationFrame = Scheduler.requestAnimationFrame;
} }
addFiber(fiber) { addFiber(fiber) {
@@ -5598,6 +5605,10 @@ class Scheduler {
} }
} }
processTasks() { processTasks() {
if (this.processing) {
return;
}
this.processing = true;
this.frame = 0; this.frame = 0;
for (let node of this.cancelledNodes) { for (let node of this.cancelledNodes) {
node._destroy(); node._destroy();
@@ -5611,6 +5622,7 @@ class Scheduler {
this.tasks.delete(task); this.tasks.delete(task);
} }
} }
this.processing = false;
} }
processFiber(fiber) { processFiber(fiber) {
if (fiber.root !== fiber) { if (fiber.root !== fiber) {
@@ -5686,7 +5698,9 @@ class App extends TemplateSet {
if (config.env) { if (config.env) {
this.env = config.env; this.env = config.env;
} }
const restore = saveCurrent();
const node = this.makeNode(Root, props); const node = this.makeNode(Root, props);
restore();
if (config.env) { if (config.env) {
this.env = 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 }; 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__.date = '2024-10-31T09:42:30.824Z';
__info__.hash = 'eb2b32a'; __info__.hash = 'b8d09e5';
__info__.url = 'https://github.com/odoo/owl'; __info__.url = 'https://github.com/odoo/owl';
+1 -1
View File
@@ -1,6 +1,6 @@
{ {
"name": "@odoo/owl", "name": "@odoo/owl",
"version": "2.4.0", "version": "2.4.1",
"lockfileVersion": 1, "lockfileVersion": 1,
"requires": true, "requires": true,
"dependencies": { "dependencies": {
+1 -1
View File
@@ -1,6 +1,6 @@
{ {
"name": "@odoo/owl", "name": "@odoo/owl",
"version": "2.4.0", "version": "2.4.1",
"description": "Odoo Web Library (OWL)", "description": "Odoo Web Library (OWL)",
"main": "dist/owl.cjs.js", "main": "dist/owl.cjs.js",
"module": "dist/owl.es.js", "module": "dist/owl.es.js",
+1 -1
View File
@@ -1,2 +1,2 @@
// do not modify manually. This file is generated by the release script. // do not modify manually. This file is generated by the release script.
export const version = "2.4.0"; export const version = "2.4.1";
-1
View File
@@ -140,7 +140,6 @@ async function startRelease() {
} }
// --------------------------------------------------------------------------- // ---------------------------------------------------------------------------
log(`Step ${step++}/${STEPS}: Creating the release...`); log(`Step ${step++}/${STEPS}: Creating the release...`);
const relaseResult = await execCommand(`gh release create v${next} dist/*.js dist/*.zip ${draft} -F ${file}`); const relaseResult = await execCommand(`gh release create v${next} dist/*.js dist/*.zip ${draft} -F ${file}`);
if (relaseResult !== 0) { if (relaseResult !== 0) {