relay-compiler 11.0.1 → 11.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (34) hide show
  1. package/bin/relay-compiler +8 -7
  2. package/index.js +1 -1
  3. package/lib/bin/RelayCompilerMain.js +1 -1
  4. package/lib/codegen/CodegenDirectory.js +1 -1
  5. package/lib/codegen/CodegenRunner.js +1 -1
  6. package/lib/codegen/RelayFileWriter.js +1 -1
  7. package/lib/codegen/writeRelayGeneratedFile.js +1 -1
  8. package/lib/core/CompilerContext.js +1 -1
  9. package/lib/core/GraphQLCompilerProfiler.js +1 -1
  10. package/lib/core/IRPrinter.js +1 -1
  11. package/lib/core/IRTransformer.js +1 -1
  12. package/lib/core/IRValidator.js +1 -1
  13. package/lib/core/RelaySourceModuleParser.js +1 -1
  14. package/lib/core/getIdentifierForArgumentValue.js +1 -1
  15. package/lib/core/getIdentifierForSelection.js +1 -1
  16. package/lib/language/javascript/RelayFlowBabelFactories.js +1 -1
  17. package/lib/language/javascript/RelayFlowGenerator.js +1 -1
  18. package/lib/runner/BufferedFilesystem.js +1 -1
  19. package/lib/runner/Sources.js +1 -1
  20. package/lib/runner/StrictMap.js +1 -1
  21. package/lib/runner/extractAST.js +1 -1
  22. package/lib/transforms/FieldHandleTransform.js +1 -1
  23. package/lib/transforms/FlattenTransform.js +2 -2
  24. package/lib/transforms/InlineFragmentsTransform.js +1 -1
  25. package/lib/transforms/MaskTransform.js +1 -1
  26. package/lib/transforms/RelayDirectiveTransform.js +1 -1
  27. package/lib/transforms/SkipRedundantNodesTransform.js +1 -1
  28. package/lib/transforms/SkipUnreachableNodeTransform.js +1 -1
  29. package/lib/util/{areEqualOSS.js → areEqualArgValues.js} +4 -3
  30. package/package.json +3 -2
  31. package/relay-compiler.js +2 -2
  32. package/relay-compiler.min.js +2 -2
  33. package/transforms/FlattenTransform.js.flow +5 -2
  34. package/util/{areEqualOSS.js.flow → areEqualArgValues.js.flow} +5 -3
@@ -14,7 +14,7 @@
14
14
 
15
15
  const IRTransformer = require('../core/IRTransformer');
16
16
 
17
- const areEqual = require('../util/areEqualOSS');
17
+ const areEqualArgValues = require('../util/areEqualArgValues');
18
18
  const getIdentifierForSelection = require('../core/getIdentifierForSelection');
19
19
 
20
20
  const {createCompilerError, createUserError} = require('../core/CompilerError');
@@ -415,7 +415,10 @@ function areEqualArgs(
415
415
  thisArg.value.kind === thatArg.value.kind &&
416
416
  (thisArg.value: any).variableName ===
417
417
  (thatArg.value: any).variableName &&
418
- areEqual((thisArg.value: any).value, (thatArg.value: any).value)
418
+ areEqualArgValues(
419
+ (thisArg.value: any).value,
420
+ (thatArg.value: any).value,
421
+ )
419
422
  );
420
423
  })
421
424
  );
@@ -8,6 +8,8 @@
8
8
  * @format
9
9
  */
10
10
 
11
+ // TODO: This is only used with `ArgumentValue` types, so it could be simpler.
12
+
11
13
  // flowlint ambiguous-object-type:error
12
14
  'use strict';
13
15
 
@@ -22,7 +24,7 @@ const bStackPool = [];
22
24
  * @copyright 2009-2013 Jeremy Ashkenas, DocumentCloud Inc.
23
25
  * @license MIT
24
26
  */
25
- function areEqual(a: any, b: any): boolean {
27
+ function areEqualArgValues(a: any, b: any): boolean {
26
28
  const aStack = aStackPool.length ? aStackPool.pop() : [];
27
29
  const bStack = bStackPool.length ? bStackPool.pop() : [];
28
30
  const result = eq(a, b, aStack, bStack);
@@ -104,7 +106,7 @@ function eq(a: any, b: any, aStack: Array<any>, bStack: Array<any>): boolean {
104
106
  // HACK: Comparing deeply nested React trees is slow since you end up
105
107
  // comparing the entire tree (all ancestors and all children) and
106
108
  // likely not what you want if you're comparing two elements with
107
- // areEqual. We bail out here for now.
109
+ // areEqualArgValues. We bail out here for now.
108
110
  continue;
109
111
  }
110
112
  if (
@@ -120,4 +122,4 @@ function eq(a: any, b: any, aStack: Array<any>, bStack: Array<any>): boolean {
120
122
  return true;
121
123
  }
122
124
 
123
- module.exports = areEqual;
125
+ module.exports = areEqualArgValues;