forked from babel/babel
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Preserve identifier location information when mapping this and argume…
…nts. (babel#7312)
- Loading branch information
1 parent
cf756b0
commit 8a70541
Showing
9 changed files
with
67 additions
and
11 deletions.
There are no files selected for viewing
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
5 changes: 5 additions & 0 deletions
5
packages/babel-traverse/test/fixtures/conversion/arguments-source-maps/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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
function fn() { | ||
var inner = () => { | ||
console.log(arguments); | ||
}; | ||
} |
3 changes: 3 additions & 0 deletions
3
packages/babel-traverse/test/fixtures/conversion/arguments-source-maps/options.json
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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"plugins": ["transform-arrow-functions"] | ||
} |
7 changes: 7 additions & 0 deletions
7
packages/babel-traverse/test/fixtures/conversion/arguments-source-maps/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 |
---|---|---|
@@ -0,0 +1,7 @@ | ||
function fn() { | ||
var _arguments = arguments; | ||
|
||
var inner = function () { | ||
console.log(_arguments); | ||
}; | ||
} |
8 changes: 8 additions & 0 deletions
8
packages/babel-traverse/test/fixtures/conversion/arguments-source-maps/source-mappings.json
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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
[{ | ||
"generated": { | ||
"line": 5, "column": 16 | ||
}, | ||
"original": { | ||
"line": 3, "column": 16 | ||
} | ||
}] |
5 changes: 5 additions & 0 deletions
5
packages/babel-traverse/test/fixtures/conversion/this-source-maps/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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
function fn() { | ||
var inner = () => { | ||
console.log(this); | ||
}; | ||
} |
3 changes: 3 additions & 0 deletions
3
packages/babel-traverse/test/fixtures/conversion/this-source-maps/options.json
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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"plugins": ["transform-arrow-functions"] | ||
} |
7 changes: 7 additions & 0 deletions
7
packages/babel-traverse/test/fixtures/conversion/this-source-maps/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 |
---|---|---|
@@ -0,0 +1,7 @@ | ||
function fn() { | ||
var _this = this; | ||
|
||
var inner = function () { | ||
console.log(_this); | ||
}; | ||
} |
8 changes: 8 additions & 0 deletions
8
packages/babel-traverse/test/fixtures/conversion/this-source-maps/source-mappings.json
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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
[{ | ||
"generated": { | ||
"line": 5, "column": 16 | ||
}, | ||
"original": { | ||
"line": 3, "column": 16 | ||
} | ||
}] |