metro-source-map 0.73.2 → 0.73.4

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "metro-source-map",
3
- "version": "0.73.2",
3
+ "version": "0.73.4",
4
4
  "description": "🚇 Source map generator for Metro.",
5
5
  "main": "src/source-map.js",
6
6
  "repository": {
@@ -15,9 +15,9 @@
15
15
  "@babel/traverse": "^7.14.0",
16
16
  "@babel/types": "^7.0.0",
17
17
  "invariant": "^2.2.4",
18
- "metro-symbolicate": "0.73.2",
18
+ "metro-symbolicate": "0.73.4",
19
19
  "nullthrows": "^1.1.1",
20
- "ob1": "0.73.2",
20
+ "ob1": "0.73.4",
21
21
  "source-map": "^0.5.6",
22
22
  "vlq": "^1.0.0"
23
23
  },
@@ -15,8 +15,8 @@ import type {IndexMap, IndexMapSection, MixedSourceMap} from './source-map';
15
15
 
16
16
  const EMPTY_MAP = {
17
17
  version: 3,
18
- sources: [],
19
- names: [],
18
+ sources: ([]: Array<string>),
19
+ names: ([]: Array<string>),
20
20
  mappings: 'A',
21
21
  };
22
22
 
@@ -104,7 +104,7 @@ class MappingsConsumer extends AbstractConsumer implements IConsumer {
104
104
 
105
105
  const {mappings: mappingsRaw, names} = this._sourceMap;
106
106
  let next;
107
- const vlqCache = new Map();
107
+ const vlqCache = new Map<string, any>();
108
108
  for (let i = 0; i < mappingsRaw.length; i = next) {
109
109
  switch (mappingsRaw[i]) {
110
110
  case ';':
@@ -100,7 +100,7 @@ function forEachMapping(
100
100
  context: ?Context,
101
101
  pushMapping: RangeMapping => void,
102
102
  ) {
103
- const nameStack = [];
103
+ const nameStack: Array<{loc: BabelNodeSourceLocation, name: string}> = [];
104
104
  let tailPos = {line: 1, column: 0};
105
105
  let tailName = null;
106
106
 
@@ -203,7 +203,7 @@ async function fromRawMappingsNonBlocking(
203
203
  function toBabelSegments(
204
204
  sourceMap: BasicSourceMap,
205
205
  ): Array<BabelSourceMapSegment> {
206
- const rawMappings = [];
206
+ const rawMappings: Array<BabelSourceMapSegment> = [];
207
207
 
208
208
  new SourceMap.SourceMapConsumer(sourceMap).eachMapping(map => {
209
209
  rawMappings.push({