fix: install the Aura theme in every mode - #9410
totally-not-ai[bot] wants to merge 3 commits into
Conversation
The mode property was added to tell Flow which packages a React application does not install, and every package marked for the Lit mode then was a dependency of @vaadin/react-components. The Aura theme entry was added later with the same mode as the entries around it, but the React components do not depend on @vaadin/aura, so nothing brings it to a React application. Leaving the mode out installs and pins it whichever mode is used, as it is a theme rather than a web component of one mode.
Dependencies Report
|
|
Shouldn't "mode": "lit" be removed from all the packages not listed in |
The four packages left are the ones marked for the Lit mode that the React components do not exclude, so a React application installs them today all the same. Marking them for one mode says the opposite of what happens. Every entry marked for the Lit mode is now one the React components exclude, which is the invariant the mode was added under.
|
Those were exactly the entries marked for the Lit mode that the React components do not exclude, so a React application installs them today anyway and the mode said the opposite of what happens. After both commits every remaining
|
This reverts commit b00f243. The Lit mode does not mean the package is left out of a React application altogether: it is not installed as a dependency of its own, because the React components already depend on it, while its version is still locked through the npm overrides, which are written from every entry whichever mode it declares. So the four packages are marked right. @vaadin/react-components depends on all of them, and locking the version without installing them separately is what the mode asks for.
|
The Lit mode does not mean the package is left out of a React application altogether. Flow writes the npm overrides from every entry of the versions files, whichever mode it declares ( That is exactly right for They are not in the
|
|
Let's get back to this if needed |
Summary
The
@vaadin/auraentry inversions.jsonwas marked for the Lit mode, so it was skipped in React applications. Aura is a theme, not a Lit web component, so this change removes the mode and makes it install and pin in every mode.Details
The
modeproperty tells Flow which packages a React application does not install on its own. Every package markedlitis a dependency of@vaadin/react-components, so React applications still get it and only its version is pinned through the npm overrides.The Aura entry was added later and copied the
mode: "lit"of the entries around it. But@vaadin/react-componentsdoes not depend on@vaadin/aura, so nothing pulled the theme into a React application. Dropping the mode from that one entry fixes it.The branch also contains a commit that removed the Lit mode from four other packages, plus a revert of it. Those four entries are marked correctly: they are dependencies of
@vaadin/react-components, so pinning them without installing them separately is exactly what the mode means. The net change is the single line for Aura.