Open
Description
Since@babel/plugin-transform-classes
7.16.5, seven unit tests are failing:
not ok 467 ES5: simple class
not ok 481 ES5: annotated class
not ok 482 ES5 explicitOnly: annotated class
not ok 489 ES5: annotated constructor
not ok 490 ES5 explicitOnly: annotated constructor
not ok 493 ES5: constructor with prologue directive
not ok 494 ES5 explicitOnly: constructor with prologue directive
I bisected the issue to this line diff in commit babel/babel@acda160 in the PR babel/babel#12115
It looks like in ES5 mode, @babel/plugin-transform-classes
transforms class declarations to function expressions (which are still recognized by babel-plugin-angularjs-annotate
as annotation candidates), but following 7.16.5, these expressions are now wrapped in the _createClass()
helper, which babel-plugin-angularjs-annotate
does not recognize as eligible for annotation.
This issue would have been caught by the test suite with earlier versions of @babel/plugin-transform-classes
if additional methods besides the constructor had been present in the test cases.
Metadata
Metadata
Assignees
Labels
No labels