Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix 2021-12 decorators application order (#14244)
* decorated class and class init are returned last * fix: class decs eval earlier than member decs * fix: decorators are applied from right to left * add es2015 test cases * fix: ensure applyDecs is ES5 compliant * bump applyDecs minVersion * fix: do not return stub initializer when empty * Revert "fix: class decs eval earlier than member decs" This reverts commit 4ef1699. # Conflicts: # packages/babel-helpers/src/helpers-generated.ts * fix: memoise non-static decorators / keys * fix: move insertBefore after path queries * test: add computed keys to ordering test * make node 14 happy * add es2015 test * cleanup * test: apply static block for node 14
- Loading branch information
Showing
205 changed files
with
758 additions
and
228 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
...el-plugin-proposal-decorators/test/fixtures/2021-12-accessors--to-es2015/private/input.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
const dec = () => {}; | ||
class Foo { | ||
@dec | ||
accessor #a; | ||
|
2 changes: 2 additions & 0 deletions
2
...l-plugin-proposal-decorators/test/fixtures/2021-12-accessors--to-es2015/private/output.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
...bel-plugin-proposal-decorators/test/fixtures/2021-12-accessors--to-es2015/public/input.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
const dec = () => {}; | ||
class Foo { | ||
@dec | ||
accessor a; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
...in-proposal-decorators/test/fixtures/2021-12-accessors--to-es2015/static-private/input.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
const dec = () => {}; | ||
class Foo { | ||
@dec | ||
static accessor #a; | ||
|
2 changes: 2 additions & 0 deletions
2
...n-proposal-decorators/test/fixtures/2021-12-accessors--to-es2015/static-private/output.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
...gin-proposal-decorators/test/fixtures/2021-12-accessors--to-es2015/static-public/input.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
const dec = () => {}; | ||
class Foo { | ||
@dec | ||
static accessor a; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
...oposal-decorators/test/fixtures/2021-12-accessors--to-es2015/undecorated-private/input.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
const dec = () => {}; | ||
class Foo { | ||
accessor #a; | ||
|
||
|
2 changes: 2 additions & 0 deletions
2
...posal-decorators/test/fixtures/2021-12-accessors--to-es2015/undecorated-private/output.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
const dec = () => {}; | ||
|
||
var _A = /*#__PURE__*/new WeakMap(); | ||
|
||
var _a = /*#__PURE__*/new WeakMap(); | ||
|
1 change: 1 addition & 0 deletions
1
...roposal-decorators/test/fixtures/2021-12-accessors--to-es2015/undecorated-public/input.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
const dec = () => {}; | ||
class Foo { | ||
accessor a; | ||
|
||
|
2 changes: 2 additions & 0 deletions
2
...oposal-decorators/test/fixtures/2021-12-accessors--to-es2015/undecorated-public/output.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
const dec = () => {}; | ||
|
||
var _A = /*#__PURE__*/new WeakMap(); | ||
|
||
var _B = /*#__PURE__*/new WeakMap(); | ||
|
1 change: 1 addition & 0 deletions
1
...decorators/test/fixtures/2021-12-accessors--to-es2015/undecorated-static-private/input.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
const dec = () => {}; | ||
class Foo { | ||
static accessor #a; | ||
|
||
|
2 changes: 2 additions & 0 deletions
2
...ecorators/test/fixtures/2021-12-accessors--to-es2015/undecorated-static-private/output.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
const dec = () => {}; | ||
|
||
class Foo {} | ||
|
||
function _get_a() { | ||
|
1 change: 1 addition & 0 deletions
1
...-decorators/test/fixtures/2021-12-accessors--to-es2015/undecorated-static-public/input.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
const dec = () => {}; | ||
class Foo { | ||
static accessor a; | ||
|
||
|
Oops, something went wrong.