[Bug]: decorators are broken and when applied, they override the preceding value. #16198
Closed
1 task
Labels
i: bug
i: regression
outdated
A closed issue/PR that is archived due to age. Recommended to make a new issue
Spec: Decorators
馃捇
How are you using Babel?
@babel/cli
Input code
I've created a test repo with a basic example here. You can also see it below:
I only checked class decorators. This bug may exist for function decorators as well but I haven't checked.
Configuration file name
No response
Configuration
Current and expected behavior
Instead of passing the result of one decorator to the next, the original value of the
Target
class gets passed to each decorator and as a result, the last applied decorator result overrides the preceding ones.Environment
Babel package versions:
Node:
20.9.0
NPM:
10.1.0
Yarn:
1.22.19
Environment:
Ubuntu 20.04.4 LTS (WSL2 on Windows)
Possible solution
No response
Additional context
This is a recent bug because I have a project that is using Babel version
7.23.2
and it's working fine. However, the bug doesn't seem to originate in Babel itself because simply reverting to an older version of the packages, doesn't fix anything. I think the problem might originate in a sub-dependency. I haven't had time to investigate further though.The text was updated successfully, but these errors were encountered: