#18259·babel

Invalid transform-unicode-sets-regex output involving union and intersection operation

Author: JLHwungCreated Sep 29, 2026Updated Sep 29, 2026
Labelsarea: upstream

  • Would you like to work on a fix?

How are you using Babel?

Programmatic API (babel.transform, babel.parse)

Input code

javascript
/[[b-da-c]&&a]/v

REPL

Configuration file name

No response

Configuration

json
{
  "filename": "repl.js",
  "plugins": [
    [
      "@babel/plugin-transform-unicode-sets-regex",
      {}
    ]
  ],
  "sourceType": "module"
}

Current and expected behavior

Current output:

javascript
/[]/u;

Expected output:

javascript
/a/u;

Environment

REPL

Possible solution

This is an upstream issue: https://github.com/mathiasbynens/regenerate/pull/48

Additional context

No response