@volar/source-map 2.0.0-alpha.9 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/sourceMap.js +6 -3
- package/package.json +2 -2
package/lib/sourceMap.js
CHANGED
|
@@ -25,18 +25,21 @@ class SourceMap {
|
|
|
25
25
|
}
|
|
26
26
|
*findMatching(offset, fromRange, toRange) {
|
|
27
27
|
const memo = this.getMemoBasedOnRange(fromRange);
|
|
28
|
-
if (memo.offsets.length === 0)
|
|
28
|
+
if (memo.offsets.length === 0) {
|
|
29
29
|
return;
|
|
30
|
+
}
|
|
30
31
|
const { low: start, high: end } = (0, binarySearch_1.binarySearch)(memo.offsets, offset);
|
|
31
32
|
const skip = new Set();
|
|
32
33
|
for (let i = start; i <= end; i++) {
|
|
33
34
|
for (const mapping of memo.mappings[i]) {
|
|
34
|
-
if (skip.has(mapping))
|
|
35
|
+
if (skip.has(mapping)) {
|
|
35
36
|
continue;
|
|
37
|
+
}
|
|
36
38
|
skip.add(mapping);
|
|
37
39
|
const mapped = (0, translateOffset_1.translateOffset)(offset, mapping[fromRange], mapping[toRange], mapping.lengths);
|
|
38
|
-
if (mapped !== undefined)
|
|
40
|
+
if (mapped !== undefined) {
|
|
39
41
|
yield [mapped, mapping];
|
|
42
|
+
}
|
|
40
43
|
}
|
|
41
44
|
}
|
|
42
45
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@volar/source-map",
|
|
3
|
-
"version": "2.0.0
|
|
3
|
+
"version": "2.0.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"files": [
|
|
6
6
|
"**/*.js",
|
|
@@ -14,5 +14,5 @@
|
|
|
14
14
|
"dependencies": {
|
|
15
15
|
"muggle-string": "^0.4.0"
|
|
16
16
|
},
|
|
17
|
-
"gitHead": "
|
|
17
|
+
"gitHead": "95217136d2727bb7304443d91cfde3dbe711369c"
|
|
18
18
|
}
|