Repository navigation
[REF] owl-blockdom: move blockdom into its own package - #2080
Merged
Merged
Conversation
mcm-odoo
marked this pull request as ready for review
November 27, 2026 12:03
Blockdom does not depend on the rest of Owl, so it can live in its own workspace package, @odoo/owl-blockdom, which owl-runtime now depends on. - inOwnerDocument, only used by blockdom, moves with it - filterOutModifiersFromData is exported from the blockdom index, as owl-runtime's event handling needs it - the blockdom tests no longer use owl-runtime test helpers - the "boom" OwlError thrown on unsupported nodes in a block template becomes a plain Error with a clear message, which removes blockdom's only dependency on owl-core
mcm-odoo
force-pushed
the
master-blockdom-package-mcm
branch
from
November 27, 2026 12:06
37fd7b6 to
d4f3bd1
Compare
ged-odoo
approved these changes
Nov 27, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Blockdom (the virtual DOM) lived in
owl-runtime/src/blockdom, but it does not depend on the rest of Owl. This moves it into its own workspace package,@odoo/owl-blockdom, whichowl-runtimenow depends on.This is the first step of a series that clarifies the boundaries between the packages (template contract, then splitting
TemplateSetfromApp).What changes
packages/owl-blockdom: the source and its tests, moved with history (git mv), plus the usual package files (build, tsconfigs, vitest config). It has no dependency.@odoo/owl-blockdominstead of./blockdom.inOwnerDocument, only used by blockdom's event handling, moves from runtime'sutils.tsinto blockdom.filterOutModifiersFromDatais now exported from blockdom's index, as runtime's event handling needs it.OwlError("boom")thrown when a block template contains a node that is neither an element nor text (comment, CDATA, processing instruction) becomes a plainErrorwith a clear message. That was blockdom's only use ofowl-core. Templates never produce such nodes (the parser drops them); only directblockDom.createBlockcalls can, and a test now covers it.logStep) no longer do.build,build:bundle,build:runtimeandtestscripts include the new package, built right afterowl-core.tools/release.cjsbumps and cleans it with the other packages.owlbundle resolves blockdom to its built file, as it already does forowl-core, so it is bundled once.No behaviour change apart from the error message above.
Checks
npm run build,npm run build:types,npm test(all packages),npm run test:typesandnpm run check-formattingpass.owlbundle contains blockdom once.depends on #2079