From ac9ccb81ca6b9e6af24bedd5a19ca8ea093d416c Mon Sep 17 00:00:00 2001 From: Romeo Fragomeli Date: Wed, 5 Mar 2025 09:38:08 +0100 Subject: [PATCH] [REL] v2.6.1 # v2.6.1 - [FIX] code generator: prevent AST change - [IMP] runtime: simplify info message when running in dev mode --- docs/owl.js | 24 ++++++++---------------- package-lock.json | 2 +- package.json | 2 +- src/version.ts | 2 +- 4 files changed, 11 insertions(+), 19 deletions(-) diff --git a/docs/owl.js b/docs/owl.js index 406a7566..4d536ea0 100644 --- a/docs/owl.js +++ b/docs/owl.js @@ -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'; diff --git a/package-lock.json b/package-lock.json index 18310104..9471f951 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "@odoo/owl", - "version": "2.6.0", + "version": "2.6.1", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index d5bad0ba..5bc01423 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@odoo/owl", - "version": "2.6.0", + "version": "2.6.1", "description": "Odoo Web Library (OWL)", "main": "dist/owl.cjs.js", "module": "dist/owl.es.js", diff --git a/src/version.ts b/src/version.ts index 3acc922c..9f2fee00 100644 --- a/src/version.ts +++ b/src/version.ts @@ -1,2 +1,2 @@ // do not modify manually. This file is generated by the release script. -export const version = "2.6.0"; +export const version = "2.6.1";