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.
- package/bin/relay-compiler +8 -7
- package/index.js +1 -1
- package/lib/bin/RelayCompilerMain.js +1 -1
- package/lib/codegen/CodegenDirectory.js +1 -1
- package/lib/codegen/CodegenRunner.js +1 -1
- package/lib/codegen/RelayFileWriter.js +1 -1
- package/lib/codegen/writeRelayGeneratedFile.js +1 -1
- package/lib/core/CompilerContext.js +1 -1
- package/lib/core/GraphQLCompilerProfiler.js +1 -1
- package/lib/core/IRPrinter.js +1 -1
- package/lib/core/IRTransformer.js +1 -1
- package/lib/core/IRValidator.js +1 -1
- package/lib/core/RelaySourceModuleParser.js +1 -1
- package/lib/core/getIdentifierForArgumentValue.js +1 -1
- package/lib/core/getIdentifierForSelection.js +1 -1
- package/lib/language/javascript/RelayFlowBabelFactories.js +1 -1
- package/lib/language/javascript/RelayFlowGenerator.js +1 -1
- package/lib/runner/BufferedFilesystem.js +1 -1
- package/lib/runner/Sources.js +1 -1
- package/lib/runner/StrictMap.js +1 -1
- package/lib/runner/extractAST.js +1 -1
- package/lib/transforms/FieldHandleTransform.js +1 -1
- package/lib/transforms/FlattenTransform.js +2 -2
- package/lib/transforms/InlineFragmentsTransform.js +1 -1
- package/lib/transforms/MaskTransform.js +1 -1
- package/lib/transforms/RelayDirectiveTransform.js +1 -1
- package/lib/transforms/SkipRedundantNodesTransform.js +1 -1
- package/lib/transforms/SkipUnreachableNodeTransform.js +1 -1
- package/lib/util/{areEqualOSS.js → areEqualArgValues.js} +4 -3
- package/package.json +3 -2
- package/relay-compiler.js +2 -2
- package/relay-compiler.min.js +2 -2
- package/transforms/FlattenTransform.js.flow +5 -2
- 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
|
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
|
-
|
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
|
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
|
-
//
|
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 =
|
125
|
+
module.exports = areEqualArgValues;
|