@ardatan/relay-compiler 12.1.0 → 12.1.2

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.
@@ -15,7 +15,6 @@
15
15
  const IRTransformer = require('../core/IRTransformer');
16
16
 
17
17
  import type CompilerContext from '../core/CompilerContext';
18
- const IMap = require('immutable').Map;
19
18
  const partitionArray = require('../util/partitionArray');
20
19
  const getIdentifierForSelection = require('../core/getIdentifierForSelection');
21
20
  const invariant = require('invariant');
@@ -31,7 +30,7 @@ import type {Fragment, Node, Root, SplitOperation, Selection} from '../core/IR';
31
30
  * etc).
32
31
  */
33
32
  // $FlowFixMe[value-as-type]
34
- type SelectionMap = IMap<string, ?SelectionMap>;
33
+ type SelectionMap = Map<string, ?SelectionMap>;
35
34
 
36
35
  /**
37
36
  * A transform that removes redundant fields and fragment spreads. Redundancy is
@@ -139,7 +138,7 @@ function visitNode<T: Fragment | Root | SplitOperation>(node: T): ?T {
139
138
  cache = new Map();
140
139
  // $FlowFixMe[incompatible-use]
141
140
  const context: CompilerContext = this.getContext();
142
- return transformNode(context.getSchema(), node, new IMap()).node;
141
+ return transformNode(context.getSchema(), node, new Map()).node;
143
142
  }
144
143
 
145
144
  /**
@@ -197,7 +196,7 @@ function transformNode<T: Node>(
197
196
  const transformed = transformNode(
198
197
  schema,
199
198
  selection,
200
- selectionMap.get(identifier) || new IMap(),
199
+ selectionMap.get(identifier) || new Map(),
201
200
  );
202
201
  if (transformed.node) {
203
202
  selections.push(transformed.node);