Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions test/fixtures/test426/decoding/scopes/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
## Test cases

- **empty-scopes-field**: Empty original scopes field
- **nil-scopes**: Multiple null original scopes
- **close-start-end-position-scopes**: Scopes with very close start and end
positions
- **single-root-original-scope**: A single global root original scope
- **nested-scopes**: Nested original scopes representing functions and blocks
- **sibling-scopes**: Multiple sibling top-level functions
- **scope-variables**: Scopes containing variable declarations
- **multiple-root-original-scopes-with-nil**: Multiple global root scopes with a
null scope in between
- **sibling-ranges**: Multiple sibling root ranges
- **nested-ranges**: A root range with a nested function range
- **range-values**: A root range with a non-function range with bindings
- **sub-range-values**: A root range with sub-range bindings
- **range-call-site**: A function inlined into the root scope
- **hidden-ranges**: A function range corresponding to an original block scope
13 changes: 13 additions & 0 deletions test/fixtures/test426/decoding/scopes/hidden-ranges.map
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"version": 3,
"file": "hidden-ranges.js",
"sources": [
"original_0.js"
],
"mappings": "",
"names": [
"global",
"block"
],
"scopes": "BCAAA,BCBAC,CEA,CFA,ECAA,EPBAC,FEA,FFA"
}
75 changes: 75 additions & 0 deletions test/fixtures/test426/decoding/scopes/hidden-ranges.map.golden
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
{
"file": "hidden-ranges.js",
"mappings": [],
"sources": [
{
"url": "original_0.js",
"content": null,
"ignored": false,
"scope": {
"start": {
"line": 0,
"column": 0
},
"end": {
"line": 10,
"column": 0
},
"name": null,
"kind": "global",
"isStackFrame": false,
"variables": [],
"children": [
{
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 5,
"column": 0
},
"name": null,
"kind": "block",
"isStackFrame": false,
"variables": [],
"children": []
}
]
}
}
],
"ranges": [
{
"start": {
"line": 0,
"column": 0
},
"end": {
"line": 10,
"column": 0
},
"definitionIndex": 0,
"stackFrameType": "none",
"callSite": null,
"bindings": [],
"children": [
{
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 5,
"column": 0
},
"definitionIndex": 1,
"stackFrameType": "hidden",
"callSite": null,
"bindings": [],
"children": []
}
]
}
]
}
14 changes: 14 additions & 0 deletions test/fixtures/test426/decoding/scopes/nested-ranges.map
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"version": 3,
"file": "nested-ranges.js",
"sources": [
"original_0.js"
],
"mappings": "",
"names": [
"global",
"foo",
"function"
],
"scopes": "BCAAA,BHBACE,CEA,CFA,ECAA,EGCC,FC,FG"
}
75 changes: 75 additions & 0 deletions test/fixtures/test426/decoding/scopes/nested-ranges.map.golden
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
{
"file": "nested-ranges.js",
"mappings": [],
"sources": [
{
"url": "original_0.js",
"content": null,
"ignored": false,
"scope": {
"start": {
"line": 0,
"column": 0
},
"end": {
"line": 10,
"column": 0
},
"name": null,
"kind": "global",
"isStackFrame": false,
"variables": [],
"children": [
{
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 5,
"column": 0
},
"name": "foo",
"kind": "function",
"isStackFrame": true,
"variables": [],
"children": []
}
]
}
}
],
"ranges": [
{
"start": {
"line": 0,
"column": 0
},
"end": {
"line": 0,
"column": 10
},
"definitionIndex": 0,
"stackFrameType": "none",
"callSite": null,
"bindings": [],
"children": [
{
"start": {
"line": 0,
"column": 2
},
"end": {
"line": 0,
"column": 4
},
"definitionIndex": 1,
"stackFrameType": "original",
"callSite": null,
"bindings": [],
"children": []
}
]
}
]
}
14 changes: 14 additions & 0 deletions test/fixtures/test426/decoding/scopes/range-call-site.map
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"version": 3,
"file": "range-call-site.js",
"sources": [
"original_0.js"
],
"mappings": "",
"names": [
"global",
"inlineMe",
"function"
],
"scopes": "BCAAA,BHBACE,CEA,CFA,ECAA,EDBAC,IAGC,FK,FJA"
}
79 changes: 79 additions & 0 deletions test/fixtures/test426/decoding/scopes/range-call-site.map.golden
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
{
"file": "range-call-site.js",
"mappings": [],
"sources": [
{
"url": "original_0.js",
"content": null,
"ignored": false,
"scope": {
"start": {
"line": 0,
"column": 0
},
"end": {
"line": 10,
"column": 0
},
"name": null,
"kind": "global",
"isStackFrame": false,
"variables": [],
"children": [
{
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 5,
"column": 0
},
"name": "inlineMe",
"kind": "function",
"isStackFrame": true,
"variables": [],
"children": []
}
]
}
}
],
"ranges": [
{
"start": {
"line": 0,
"column": 0
},
"end": {
"line": 10,
"column": 0
},
"definitionIndex": 0,
"stackFrameType": "none",
"callSite": null,
"bindings": [],
"children": [
{
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 10
},
"definitionIndex": 1,
"stackFrameType": "none",
"callSite": {
"sourceIndex": 0,
"line": 6,
"column": 2
},
"bindings": [],
"children": []
}
]
}
]
}
20 changes: 20 additions & 0 deletions test/fixtures/test426/decoding/scopes/range-values.map
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"version": 3,
"file": "range-values.js",
"sources": [
"original_0.js"
],
"mappings": "",
"names": [
"global",
"x",
"y",
"z",
"block",
"a",
"x_val",
"z_val",
"a_val"
],
"scopes": "BCAAA,DCCC,BCBAI,DE,CEA,CFA,ECAA,GHAI,ECCC,GJ,FC,FG"
}
Loading
Loading