Skip to content

chore: update dependency babel-plugin-inferno to v10 - #110

Closed
renovate[bot] wants to merge 1 commit into
mainfrom
renovate/babel-plugin-inferno-10.x
Closed

renovate[bot] wants to merge 1 commit into
mainfrom
renovate/babel-plugin-inferno-10.x

Conversation

@renovate

@renovate renovate Bot commented Oct 13, 2026

Copy link
Copy Markdown
Contributor

This PR contains the following updates:

Package Change Age Confidence
babel-plugin-inferno ^5.1.0 → ^10.0.0 age confidence

Release Notes

trueadm/babel-plugin-inferno (babel-plugin-inferno)

v10.0.0

Compare Source

10.0.0

This release compiles JSX for Inferno 10. The plugin now calls Inferno 10's newVNode factories, which take the shape of the children inside the vNode flags. It also removes $ReCreate, and it stops the build when a child flag cannot match the children it is written on.

From this release on, the major version of the plugin matches the major version of Inferno: use plugin 10.x with Inferno 10.x, plugin 11.x with Inferno 11.x, and so on. There is no plugin 8 or 9. For Inferno 9 and older, keep using plugin 7.

Breaking changes

Inferno 10 is required

The compiled code calls the Inferno 10 factories:

Plugin 7 Plugin 10
createVNode newVNode
createComponentVNode newComponentVNode
createFragment newFragment
createTextVNode newTextVNode

normalizeProps is unchanged.

The child flags are no longer a separate argument. Each vNode gets one number that holds both its type and the shape of its children, using the VNodeFlags of inferno-vnode-flags 10. Inferno 10 also renumbered these flags, so code compiled by plugin 7 does not work with Inferno 10 and has to be compiled again. This includes packages that ship JSX compiled by plugin 7.

<div>Hello</div>
// 7.x
createVNode(1, "div", null, "Hello", 16);
// 10.x: HtmlElement (1) + HasTextChildren (2)
newVNode(3, "div", null, "Hello");

<><a /><b /></>
// 7.x
createFragment([createVNode(1, "a"), createVNode(1, "b")], 4);
// 10.x: Fragment (256) + HasNonKeyedChildren (4)
newFragment(260, [newVNode(17, "a"), newVNode(17, "b")]);

Children that are only known at runtime, such as {expression}, get no child bit, and Inferno normalizes them. Components get ComponentUnknown, which is now 0. The README lists all the flag values.

$Flags takes Inferno 10 flag values

$Flags={expression} still replaces the flags of the vNode. The value is now read as Inferno 10 VNodeFlags, and the plugin adds the child bit of the children to it. Components also get HasInvalidChildren (16). Update any numbers you pass. For example, $Flags={64} meant InputElement in plugin 7 and means SvgElement in plugin 10.

Flag Inferno 9 Inferno 10
HtmlElement 1 1
ComponentUnknown 2 0
ComponentClass 4 128
ComponentFunction 8 8192
SvgElement 32 64
InputElement 64 512
TextareaElement 128 2048
SelectElement 256 4096
ContentEditable 4096 131072

$ChildFlag keeps the ChildFlags values: 0, 1, 2, 4, 8 and 16.

$ReCreate is removed

Inferno 10 has no ReCreate flag. The plugin throws for $ReCreate on any element, component or Fragment, whatever the uselessFlags option is. To re-create an element, change its key instead. Inferno unmounts the old element and mounts a new one when the key changes.

// 7.x
<section $ReCreate>{content}</section>
// 10.x
<section key={version}>{content}</section>

Child flags that cannot match the children are compile errors

When the JSX shows that the children cannot have the shape a child flag declares, the plugin now throws an error that points at the flag. Before, the plugin ignored the flag or passed it on to Inferno, which then rendered the children wrong or threw in development.

// An array is not a single vNode
<div $HasVNodeChildren><a/><b/></div>
<div $HasVNodeChildren>{[a, b]}</div>

// Text is not a vNode, and an element is not text
<div $HasVNodeChildren>text</div>
<div $HasTextChildren><a/></div>

// One element is not an array, and keyed children need keys
<ul $HasNonKeyedChildren><li/></ul>
<ul $HasKeyedChildren><li key="1"/><li/></ul>

// Not a ChildFlags value
<div $ChildFlag={3}>{a}</div>
SyntaxError: /project/src/App.jsx: $HasVNodeChildren needs one element or component child, but there are 2 children.
> 1 | <div $HasVNodeChildren><a/><b/></div>
    |      ^^^^^^^^^^^^^^^^^

Dynamic children such as {expression} are not checked, and neither are the children of components. The uselessFlags option does not turn this check off.

A ref without a value is a compile error

<div ref /> compiled to a true ref, which is neither a callback nor a ref object. Give the ref an explicit value.

The pragma options rename the Inferno 10 factories

pragma, pragmaCreateComponentVNode, pragmaFragmentVNode and pragmaTextVNode now replace newVNode, newComponentVNode, newFragment and newTextVNode. A custom function set with these options gets the new arguments: newVNode(flags, type, className, children, props, key, ref) has no childFlags argument, and newFragment(flags, children, key) takes the flags first.

Changes

$ChildFlag

  • A numeric $ChildFlag is folded into the flags like the other child flags. <div $ChildFlag={2}>{a}</div> compiles to newVNode(9, "div", null, a).
  • A $ChildFlag expression is only known at runtime, so that element or Fragment is compiled to Inferno's deprecated createVNode or createFragment, which convert the value. The plugin imports them next to the new factories when they are needed. These two calls do not use the pragma options.
<div $ChildFlag={flag}>{a}</div>
// compiles to
createVNode(1, "div", null, a, flag);

Smaller output

  • null values of className, key, ref and children are left out. <div className={null} key={null} ref={null} /> compiled to createVNode(1, "div", null, null, 1, null, null, null) and now compiles to newVNode(17, "div"). Other props keep their null values.
  • A {null} child is left out too. <Fragment>{null}</Fragment> compiles like an empty Fragment: newFragment(272).
Bug fixes
  • A single dynamic child of a Fragment with a $ChildFlag was put in an array. <Fragment $ChildFlag={x}>{a}</Fragment> compiled to createFragment([a], x), so the flag described the array instead of the value. The child is now passed as written: createFragment(a, x). Static children are still put in an array.
Development
  • New tests cover the packed flags, the child flag errors, $ReCreate and valueless refs.
  • The benchmark fixture no longer uses $ReCreate.
  • Dev dependencies updated, including chai 6.3, ESLint 10.12, Mocha 12.0.3 and Rollup 4.64. inferno 10 is added as a dev dependency.
Upgrading
  1. Upgrade inferno and babel-plugin-inferno to 10 together, and follow the Inferno 10 migration guide.
  2. Compile everything again, including dependencies that ship JSX compiled by plugin 7.
  3. Replace $ReCreate with a changing key.
  4. Fix the child flags that the new errors point at. Usually the flag can be removed, because the plugin sets the child flags of JSX children itself.
  5. Give every ref a value.
  6. Update the numbers in $Flags to the Inferno 10 values, and update custom pragma functions to the new arguments.

v7.1.0

Compare Source

7.1.0

This release warns about optimization flags that cannot change the compiled output, fixes Fragments that combine child flags with dynamic or children prop content, and makes source maps point at tag names.

New features

Useless flag warnings (#​60)

The plugin now warns when a compile-time flag cannot improve the output:

  • A child flag on an element whose children are written as JSX. The plugin already sees their shape and sets the child flags itself. Child flags only help with dynamic children such as {expression} or children={expression}.
  • A child flag on a component. Components get their children in props.children, so the flag does nothing.
  • Two child flags on the same element. Only one applies, in this order: $ChildFlag, $HasKeyedChildren, $HasNonKeyedChildren, $HasTextChildren, $HasVNodeChildren.
  • $ReCreate together with $Flags. $Flags replaces all the vNode flags, including ReCreate.
  • $Flags or $ReCreate on a Fragment. Fragments have no vNode flags.
// Warns: the children are known at compile time
<div $HasVNodeChildren>
  <h1>Hi</h1>
</div>

// Warns: components get their children in props.children
<Foo $HasKeyedChildren>{items}</Foo>

The warning is printed with console.warn and shows the file, line, column, the reason and a code frame:

babel-plugin-inferno: /project/src/App.jsx:3:10: $HasVNodeChildren is not needed: the children are known at compile time, so the plugin sets their child flags. Child flags only help with dynamic children such as {expression}.
  1 | function App() {
  2 |   return (
> 3 |     <div $HasVNodeChildren>
    |          ^^^^^^^^^^^^^^^^^
  4 |       <h1>Hi</h1>
  5 |     </div>

New uselessFlags option

  • "warn" (default): print a warning.
  • "error": stop the build at the first useless flag. For example, CIlags out.
  • "off": do nothing.

Any other value fails when Babel loads the config, so a typo does not The README shows how to use a different level in CI or in some folders.

{
    "plugins": [["inferno", {
        "imports": true,
        "uselessFlags": "error"
    }]]
}
Bug fixes

Fragments with child flags and children props

  • <Fragment $HasTextChildren>{x}</Fragment> and <Fragment $HasTextCped the child and compiled to an empty createFragment(). They nowcompile to createFragment([createTextVNode(x)], 4)`.
  • <Fragment $HasTextChildren><a /></Fragment> crashed the plugin witrayExpression expected node ... but instead got undefined, and {}` was dropped. JSX children now stay vNodes whatever the flag says.
  • <Fragment $HasVNodeChildren>{x}</Fragment> passed the single childnflag (4), which tells Inferno the children are an array. It now usesHasVNodeChildren` (2).
  • <Fragment children="text" key="k" /> compiled with the HasInvalidxt was not rendered. It now compiles tocreateFragment([createTextVNode("text")], 4, "k")`.
  • A string children prop combined with a child flag on a Fragment prmatch the flag, such as createFragment("text", 8) for$HasKeyedChildren. The text is now always compiled to [createTextVNode("text")].
  • <Fragment children="text" /> without a key or flag is now compilede instead of being normalized at runtime.
  • createTextVNode is imported only when the output calls it. Before, <Fragment $HasTextChildren /> and <Fragment $HasTextChildren>{x}{y}</Fragment> imported it
    without using it.

Source maps

  • Tag names now keep their own source location. <Foo …> maps to Foo:4), the same as Babel's react-jsx transform. Element tags ("div") and each part of a member tag (Ns.Inner.Comp, this.Item, Foo["baroo.
Upgrading

Projects that use $ flags may see new warnings in the build output. The warnings do not change the compiled code. Remove the flags the warnings point at, or set
uselessFlags: "off".

v7.0.0

Compare Source

7.0.0

This release fixes many cases where the plugin generated wrong or invalid code, adds compile-time errors for mistakes it used to accept silently, and roughly halves the plugin's own transform cost.

Breaking changes
  • Node.js 24 or newer is required. The previous requirement was Node.js 18 or newer.
  • Duplicate props are now a compile error. Before, the last value silently won.
    • Repeated names on elements and components: <p prop prop />, two keys, two refs, repeated onComponent* hooks or $ flags.
    • Two names that set the same prop on an element: className + class, htmlFor + for, tabIndex + tabindex, strokeWidth + stroke-width, xlinkHref + xlink:href.
  • key without a value is now a compile error. <li key /> used to compile to key: true. Give the key an explicit value.
Bug fixes

Imports and module output

  • imports: false: when several files were compiled with the same config (babel-loader, loadOptionsSync), only the first file got var createVNode = Inferno.createVNode. Every later file failed at runtime with ReferenceError: createVNode is not defined. The plugin no longer keeps state between files.
  • imports: false: that declaration now goes at the top of the file, after the imports and after the file's own Inferno declaration. Before, it was inserted just before the first statement that contained JSX, so a hoisted function called earlier in the file ran while createVNode was still undefined.
  • sourceType: "script", and "unambiguous" on a file without import/export: the plugin added an import declaration, which is invalid in a script. It now uses require("inferno") there.
  • imports: "true" given as a string was read as a module name. It is now read as true.

Children

  • <div children={x} /> was always compiled as a single vnode (HasVNodeChildren). As a result, strings and arrays passed that way failed Inferno's flag validation in development and broke mounting in production. Now only JSX values are flagged as a single vnode, and Inferno normalizes other values at runtime. <Fragment children={a} /> had the same bug.
  • children=<span /> (JSX without braces) was silently dropped. It now works.
  • Spread children like <div>{...items}</div> were silently dropped. They now compile to [...items], the same as TypeScript and esbuild.

Props

  • A __proto__ prop changed the props object's prototype instead of passing the prop. It is now written as a computed key, {["__proto__"]: x}, so the component receives it as an ordinary prop.
  • A component with both ref and onComponent* hooks crashed the plugin. They are now merged, and the hooks take precedence.
  • <>...</> fragments ignored the defineAll option.

String attributes

  • Line breaks inside quoted attributes, such as a multi-line className, produced invalid JavaScript.
  • Backslashes were treated as JavaScript escape sequences: pattern="\d{3}" became d{3}, and "\9" was a syntax error in modules.
  • HTML entities were not decoded: title="a&amp;b" stayed a&amp;b.

SVG attributes

  • lengthAdjust, xChannelSelector and yChannelSelector were lowercased. SVG attribute names are case-sensitive, so browsers ignored them.
  • fontWidth, maskType, textOverflow and whiteSpace now become font-width, mask-type, text-overflow and white-space.
  • Tests now cover every attribute in MDN's SVG attribute reference.

Tag names

  • Namespaced tags like <a:b /> crashed with path.replaceWith() a falsy node. They now throw a clear error that points to the tag.
  • <Foo-bar /> crashed the plugin. It now compiles as a DOM element.
  • <Foo.bar-baz /> crashed the plugin. It now compiles to Foo["bar-baz"].
  • <a-b.c /> now reports that a-b is not a valid variable name.

Source maps

  • Generated createVNode, createFragment, createTextVNode and normalizeProps calls now have the location of the JSX they replace, so source maps point to the JSX.
Performance
  • The plugin's own transform time and allocations are about halved: 49% less time and 48% fewer bytes allocated, as a geometric mean over 9 benchmark cases. A full transformSync is about 16% faster and allocates about 14% less. The generated code and source maps are unchanged.
  • The Babel 8 warning "Usage of builders starting with an uppercase letter such as StringLiteral has been deprecated" is no longer printed.
Development
  • New benchmark suite in bench/: npm run bench, bench:quick, bench:compare and bench:profile. See the README.
  • The test suite is much larger.
  • ESLint config updated for ESLint 10. Dev dependencies updated, including Babel 8.0.6 and Mocha 12.

v6.9.0

Compare Source

6.9.0

  • All tests run using babel 8
  • dependencies updated

v6.8.5

Compare Source

v6.8.4

Compare Source

v6.8.3

Compare Source

v6.8.2

Compare Source

v6.8.1

Compare Source

v6.8.0

Compare Source

6.8.0

  • Added some missing React attribute transformations infernojs#64
  • Updated internal dependencies

v6.7.2

Compare Source

v6.7.2

  • Internal dependencies updated

v6.7.1

Compare Source

v6.7.0

Compare Source

v6.6.1

Compare Source

v6.6.0

Compare Source

v6.5.0

Compare Source

v6.4.0

Compare Source

v6.3.0: babel-plugin-inferno 6.3.0

Compare Source

React.Fragment is now also compiled to inferno createFragment call to ease with project migration
infernojs#56

Internal dependencies updated

v6.2.0: babel-plugin-inferno 6.2.0

Compare Source

Small improvement to plugin logic
Internal dependencies updated

v6.1.1

Compare Source

v6.1.0

Compare Source

v6.0.5

Compare Source

v6.0.4

Compare Source

v6.0.3

Compare Source

v6.0.2

Compare Source

v6.0.1

Compare Source

v6.0.0

Compare Source


Configuration

📅 Schedule: (UTC)

  • Branch creation
    • "after 10pm,before 5:00am"
  • Automerge
    • "after 10pm and before 5:00am"

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate
renovate Bot requested review from a team and a balanced review from Copilot October 13, 2026 01:59
@renovate renovate Bot added the dependencies Updates a dependency label Oct 13, 2026
@bpmn-io-tasks bpmn-io-tasks Bot added the needs review Review pending label Oct 13, 2026

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Plugin v10 is incompatible with the existing Babel 7 and Inferno 5 dependencies.

1 open finding
What changed in this PR

Updates the Inferno Babel plugin from v5 to v10.

Changes:

  • Bumps babel-plugin-inferno.
  • Refreshes transitive dependencies and lock data.
File Description
package.json Updates the plugin dependency.
package-lock.json Records the updated dependency tree.

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread package.json
"@babel/preset-env": "^7.29.7",
"babel-loader": "^10.1.1",
"babel-plugin-inferno": "^5.1.0",
"babel-plugin-inferno": "^10.0.0",
@nikku nikku closed this Oct 13, 2026
@bpmn-io-tasks bpmn-io-tasks Bot removed the needs review Review pending label Oct 13, 2026
@renovate

renovate Bot commented Oct 13, 2026

Copy link
Copy Markdown
Contributor Author

Renovate Ignore Notification

Because you closed this PR without merging, Renovate will ignore this update. You will not get PRs for any future 10.x releases. But if you manually upgrade to 10.x then Renovate will re-enable minor and patch updates automatically.

If you accidentally closed this PR, or if you changed your mind: rename this PR to get a fresh replacement PR.

@renovate
renovate Bot deleted the renovate/babel-plugin-inferno-10.x branch October 13, 2026 21:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Updates a dependency

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants