metro-source-map 0.72.0 → 0.72.1

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.72.0",
3
+ "version": "0.72.1",
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.72.0",
18
+ "metro-symbolicate": "0.72.1",
19
19
  "nullthrows": "^1.1.1",
20
- "ob1": "0.72.0",
20
+ "ob1": "0.72.1",
21
21
  "source-map": "^0.5.6",
22
22
  "vlq": "^1.0.0"
23
23
  },
@@ -43,7 +43,7 @@ class AbstractConsumer implements IConsumer {
43
43
  callback: (mapping: Mapping) => mixed,
44
44
  context?: mixed = null,
45
45
  order?: IterationOrder = GENERATED_ORDER,
46
- ) {
46
+ ): void {
47
47
  invariant(
48
48
  order === GENERATED_ORDER,
49
49
  `Iteration order not implemented: ${iterationOrderToString(order)}`,
@@ -91,7 +91,7 @@ class MappingsConsumer extends AbstractConsumer implements IConsumer {
91
91
  return {...EMPTY_POSITION};
92
92
  }
93
93
 
94
- *_decodeMappings() {
94
+ *_decodeMappings(): Generator<Mapping, void, void> {
95
95
  let generatedLine = FIRST_LINE;
96
96
  let generatedColumn = FIRST_COLUMN;
97
97
  let originalLine = FIRST_LINE;
@@ -152,7 +152,7 @@ function getNameForPath(path) {
152
152
  }
153
153
 
154
154
  let propertyPath;
155
- let kind = ""; // Find or construct an AST node that names the current node.
155
+ let kind; // Find or construct an AST node that names the current node.
156
156
 
157
157
  if ((0, _types.isObjectMethod)(node) || (0, _types.isClassMethod)(node)) {
158
158
  // ({ foo() {} });
@@ -264,7 +264,7 @@ function getNameForPath(path) {
264
264
  return ANONYMOUS_NAME;
265
265
  } // Annotate getters and setters.
266
266
 
267
- if (kind) {
267
+ if (kind != null) {
268
268
  name = kind + "__" + name;
269
269
  } // Annotate members with the name of their containing object/class.
270
270
 
@@ -54,7 +54,7 @@ type RangeMapping = {
54
54
  start: Position,
55
55
  ...
56
56
  };
57
- type Context = {filename?: string, ...};
57
+ export type Context = {filename?: string, ...};
58
58
 
59
59
  /**
60
60
  * Generate a map of source positions to function names. The names are meant to
@@ -190,8 +190,7 @@ function getNameForPath(path: NodePath<>): string {
190
190
  return node.id.name;
191
191
  }
192
192
  let propertyPath;
193
- let kind: ?(string | $TEMPORARY$string<'get'> | $TEMPORARY$string<'set'>) =
194
- '';
193
+ let kind: ?string;
195
194
 
196
195
  // Find or construct an AST node that names the current node.
197
196
  if (isObjectMethod(node) || isClassMethod(node)) {
@@ -276,7 +275,7 @@ function getNameForPath(path: NodePath<>): string {
276
275
  }
277
276
 
278
277
  // Annotate getters and setters.
279
- if (kind) {
278
+ if (kind != null) {
280
279
  name = kind + '__' + name;
281
280
  }
282
281
 
@@ -512,12 +511,7 @@ class RelativeValue {
512
511
  }
513
512
  }
514
513
 
515
- function positionGreater(
516
- x: {column: number, line: number},
517
- y:
518
- | {column: number, line: number}
519
- | $TEMPORARY$object<{column: number, line: number}>,
520
- ) {
514
+ function positionGreater(x: Position, y: Position) {
521
515
  return x.line > y.line || (x.line === y.line && x.column > y.column);
522
516
  }
523
517