mirror of
https://github.com/odoo/owl.git
synced 2025-10-06 19:59:41 +07:00
[REL] v2.6.1
# v2.6.1 - [FIX] code generator: prevent AST change - [IMP] runtime: simplify info message when running in dev mode
This commit is contained in:
+8
-16
@@ -4801,16 +4801,15 @@ class CodeGenerator {
|
||||
isMultiple = isMultiple || this.slotNames.has(ast.name);
|
||||
this.slotNames.add(ast.name);
|
||||
}
|
||||
const dynProps = ast.attrs ? ast.attrs["t-props"] : null;
|
||||
if (ast.attrs) {
|
||||
delete ast.attrs["t-props"];
|
||||
}
|
||||
const attrs = { ...ast.attrs };
|
||||
const dynProps = attrs["t-props"];
|
||||
delete attrs["t-props"];
|
||||
let key = this.target.loopLevel ? `key${this.target.loopLevel}` : "key";
|
||||
if (isMultiple) {
|
||||
key = this.generateComponentKey(key);
|
||||
}
|
||||
const props = ast.attrs
|
||||
? this.formatPropObject(ast.attrs, ast.attrsTranslationCtx, ctx.translationCtx)
|
||||
? this.formatPropObject(attrs, ast.attrsTranslationCtx, ctx.translationCtx)
|
||||
: [];
|
||||
const scope = this.getPropString(props, dynProps);
|
||||
if (ast.defaultContent) {
|
||||
@@ -5705,7 +5704,7 @@ function compile(template, options = {
|
||||
}
|
||||
|
||||
// do not modify manually. This file is generated by the release script.
|
||||
const version = "2.6.0";
|
||||
const version = "2.6.1";
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// Scheduler
|
||||
@@ -5800,13 +5799,6 @@ class Scheduler {
|
||||
Scheduler.requestAnimationFrame = window.requestAnimationFrame.bind(window);
|
||||
|
||||
let hasBeenLogged = false;
|
||||
const DEV_MSG = () => {
|
||||
const hash = window.owl ? window.owl.__info__.hash : "master";
|
||||
return `Owl is running in 'dev' mode.
|
||||
|
||||
This is not suitable for production use.
|
||||
See https://github.com/odoo/owl/blob/${hash}/doc/reference/app.md#configuration for more information.`;
|
||||
};
|
||||
const apps = new Set();
|
||||
window.__OWL_DEVTOOLS__ || (window.__OWL_DEVTOOLS__ = { apps, Fiber, RootFiber, toRaw, reactive });
|
||||
class App extends TemplateSet {
|
||||
@@ -5823,7 +5815,7 @@ class App extends TemplateSet {
|
||||
}
|
||||
this.warnIfNoStaticProps = config.warnIfNoStaticProps || false;
|
||||
if (this.dev && !config.test && !hasBeenLogged) {
|
||||
console.info(DEV_MSG());
|
||||
console.info(`Owl is running in 'dev' mode.`);
|
||||
hasBeenLogged = true;
|
||||
}
|
||||
const env = config.env || {};
|
||||
@@ -6183,6 +6175,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 = '2025-01-15T10:40:24.184Z';
|
||||
__info__.hash = 'a9be149';
|
||||
__info__.date = '2025-03-05T08:37:58.580Z';
|
||||
__info__.hash = '2b5cea9';
|
||||
__info__.url = 'https://github.com/odoo/owl';
|
||||
|
||||
Reference in New Issue
Block a user