From ed24f9d55f92e27dcd48cf41050c8895967af909 Mon Sep 17 00:00:00 2001 From: Jan Kassens Date: Thu, 6 Jan 2022 06:57:56 -0800 Subject: [PATCH] fix unused variables lints in relay-runtime Reviewed By: josephsavona Differential Revision: D33436199 fbshipit-source-id: e6165fc7e0ea4e153addf270989efcd4f9eececb --- ...layFragmentContainer-react-double-effects-test.js | 1 - ...yPaginationContainer-react-double-effects-test.js | 1 - ...layRefetchContainer-WithFragmentOwnership-test.js | 6 ++---- ...elayRefetchContainer-react-double-effects-test.js | 1 - .../multi-actor/__tests__/ActorChange-test.js | 6 +----- .../__tests__/ActorChangeWithDefer-test.js | 1 - .../__tests__/ActorChangeWithMutation-test.js | 6 +----- .../__tests__/ActorChangeWithStream-test.js | 1 - .../__tests__/useBlockingPaginationFragment-test.js | 12 ++++++------ ...ginationFragment-with-suspense-transition-test.js | 4 ++-- .../useEntryPointLoader-react-double-effects-test.js | 2 +- .../useFragmentNode-react-double-effects-test.js | 1 - .../__tests__/useFragmentNode-required-test.js | 1 - .../relay-hooks/__tests__/useFragmentNode-test.js | 4 ++-- .../__tests__/usePaginationFragment-test.js | 3 --- .../useQueryLoader-react-double-effects-test.js | 5 +---- .../__tests__/useRefetchableFragmentNode-test.js | 8 ++++---- ...ableFragmentNode-with-suspense-transition-test.js | 4 ++-- .../relay-hooks/useSubscribeToInvalidationState.js | 2 +- .../mutations/RelayDeclarativeMutationConfig.js | 1 - packages/relay-runtime/store/RelayModernStore.js | 1 - .../RelayModernEnvironment-CommitPayload-test.js | 1 - ...odernEnvironment-ExecuteMutationWithMatch-test.js | 5 +---- .../RelayModernEnvironment-ExecuteWithDefer-test.js | 1 - ...dernEnvironment-ExecuteWithDeferAndModule-test.js | 6 +----- .../RelayModernEnvironment-ExecuteWithModule-test.js | 1 - ...yModernEnvironment-ExecuteWithNestedMatch-test.js | 1 - .../RelayModernEnvironment-ExecuteWithStream-test.js | 1 - ...Environment-ExecuteWithStreamedConnection-test.js | 1 - .../RelayModernEnvironment-NoInline-test.js | 1 - ...alizedDataObservabilityWithBatchedUpdates-test.js | 1 - .../RelayModernFragmentSpecResolver-test.js | 1 - .../__tests__/RelayReader-RequiredFields-test.js | 2 +- .../subscription/requestSubscription.js | 1 - 34 files changed, 26 insertions(+), 68 deletions(-) diff --git a/packages/react-relay/__tests__/ReactRelayFragmentContainer-react-double-effects-test.js b/packages/react-relay/__tests__/ReactRelayFragmentContainer-react-double-effects-test.js index 479e632ddb9bd..7aa5acfb37c48 100644 --- a/packages/react-relay/__tests__/ReactRelayFragmentContainer-react-double-effects-test.js +++ b/packages/react-relay/__tests__/ReactRelayFragmentContainer-react-double-effects-test.js @@ -13,7 +13,6 @@ const {createContainer} = require('../ReactRelayFragmentContainer'); const RelayEnvironmentProvider = require('../relay-hooks/RelayEnvironmentProvider'); -// eslint-disable-next-line no-unused-vars const React = require('react'); const {useEffect} = require('react'); const ReactTestRenderer = require('react-test-renderer'); diff --git a/packages/react-relay/__tests__/ReactRelayPaginationContainer-react-double-effects-test.js b/packages/react-relay/__tests__/ReactRelayPaginationContainer-react-double-effects-test.js index 8ae3ad979444b..b41a788babd79 100644 --- a/packages/react-relay/__tests__/ReactRelayPaginationContainer-react-double-effects-test.js +++ b/packages/react-relay/__tests__/ReactRelayPaginationContainer-react-double-effects-test.js @@ -13,7 +13,6 @@ const {createContainer} = require('../ReactRelayPaginationContainer'); const RelayEnvironmentProvider = require('../relay-hooks/RelayEnvironmentProvider'); -// eslint-disable-next-line no-unused-vars const React = require('react'); const {useEffect} = require('react'); const ReactTestRenderer = require('react-test-renderer'); diff --git a/packages/react-relay/__tests__/ReactRelayRefetchContainer-WithFragmentOwnership-test.js b/packages/react-relay/__tests__/ReactRelayRefetchContainer-WithFragmentOwnership-test.js index ea0d13d567ea1..e94734b9154ac 100644 --- a/packages/react-relay/__tests__/ReactRelayRefetchContainer-WithFragmentOwnership-test.js +++ b/packages/react-relay/__tests__/ReactRelayRefetchContainer-WithFragmentOwnership-test.js @@ -168,13 +168,11 @@ describe('ReactRelayRefetchContainer with fragment ownerhsip', () => { }); describe('refetch()', () => { - let instance; - beforeEach(() => { const userPointer = environment.lookup(ownerUser1.fragment, ownerUser1) .data.node; environment.mock.clearCache(); - instance = ReactTestRenderer.create( + ReactTestRenderer.create( , @@ -389,7 +387,7 @@ describe('ReactRelayRefetchContainer with fragment ownerhsip', () => { const userPointer = environment.lookup(ownerUser1.fragment, ownerUser1) .data.node; environment.mock.clearCache(); - instance = ReactTestRenderer.create( + ReactTestRenderer.create( , diff --git a/packages/react-relay/__tests__/ReactRelayRefetchContainer-react-double-effects-test.js b/packages/react-relay/__tests__/ReactRelayRefetchContainer-react-double-effects-test.js index a10cca2700a3b..1c5287394c02b 100644 --- a/packages/react-relay/__tests__/ReactRelayRefetchContainer-react-double-effects-test.js +++ b/packages/react-relay/__tests__/ReactRelayRefetchContainer-react-double-effects-test.js @@ -13,7 +13,6 @@ const {createContainer} = require('../ReactRelayRefetchContainer'); const RelayEnvironmentProvider = require('../relay-hooks/RelayEnvironmentProvider'); -// eslint-disable-next-line no-unused-vars const React = require('react'); const {useEffect} = require('react'); const ReactTestRenderer = require('react-test-renderer'); diff --git a/packages/react-relay/multi-actor/__tests__/ActorChange-test.js b/packages/react-relay/multi-actor/__tests__/ActorChange-test.js index 971bc5cdeeeee..0c2540fea71a9 100644 --- a/packages/react-relay/multi-actor/__tests__/ActorChange-test.js +++ b/packages/react-relay/multi-actor/__tests__/ActorChange-test.js @@ -12,7 +12,6 @@ 'use strict'; import type {ActorChangeTestFeedUnitFragment$key} from './__generated__/ActorChangeTestFeedUnitFragment.graphql'; -import type {ActorChangeTestQuery} from './__generated__/ActorChangeTestQuery.graphql'; import type { ActorIdentifier, IActorEnvironment, @@ -32,10 +31,7 @@ const { MultiActorEnvironment, getActorIdentifier, } = require('relay-runtime/multi-actor-environment'); -const { - disallowWarnings, - expectWarningWillFire, -} = require('relay-test-utils-internal'); +const {disallowWarnings} = require('relay-test-utils-internal'); function ComponentWrapper( props: $ReadOnly<{ diff --git a/packages/react-relay/multi-actor/__tests__/ActorChangeWithDefer-test.js b/packages/react-relay/multi-actor/__tests__/ActorChangeWithDefer-test.js index ae449eaccbeae..e65ed9017ee1c 100644 --- a/packages/react-relay/multi-actor/__tests__/ActorChangeWithDefer-test.js +++ b/packages/react-relay/multi-actor/__tests__/ActorChangeWithDefer-test.js @@ -12,7 +12,6 @@ 'use strict'; import type {ActorChangeWithDeferTestDeferFragment$key} from './__generated__/ActorChangeWithDeferTestDeferFragment.graphql'; import type {ActorChangeWithDeferTestFragment$key} from './__generated__/ActorChangeWithDeferTestFragment.graphql'; -import type {ActorChangeWithDeferTestQuery} from './__generated__/ActorChangeWithDeferTestQuery.graphql'; import type { IActorEnvironment, IMultiActorEnvironment, diff --git a/packages/react-relay/multi-actor/__tests__/ActorChangeWithMutation-test.js b/packages/react-relay/multi-actor/__tests__/ActorChangeWithMutation-test.js index 7af96e9f2ae63..355dbdda016ed 100644 --- a/packages/react-relay/multi-actor/__tests__/ActorChangeWithMutation-test.js +++ b/packages/react-relay/multi-actor/__tests__/ActorChangeWithMutation-test.js @@ -13,7 +13,6 @@ import type {ActorIdentifier} from '../../../relay-runtime/multi-actor-environment/ActorIdentifier'; import type {ActorChangeWithMutationTestFragment$key} from './__generated__/ActorChangeWithMutationTestFragment.graphql'; import type {ActorChangeWithMutationTestMutation} from './__generated__/ActorChangeWithMutationTestMutation.graphql'; -import type {ActorChangeWithMutationTestQuery} from './__generated__/ActorChangeWithMutationTestQuery.graphql'; import type { IActorEnvironment, IMultiActorEnvironment, @@ -40,10 +39,7 @@ const { MultiActorEnvironment, getActorIdentifier, } = require('relay-runtime/multi-actor-environment'); -const { - disallowWarnings, - expectWarningWillFire, -} = require('relay-test-utils-internal'); +const {disallowWarnings} = require('relay-test-utils-internal'); function ComponentWrapper( props: $ReadOnly<{ diff --git a/packages/react-relay/multi-actor/__tests__/ActorChangeWithStream-test.js b/packages/react-relay/multi-actor/__tests__/ActorChangeWithStream-test.js index d1f10c173fcce..c167b18c16b89 100644 --- a/packages/react-relay/multi-actor/__tests__/ActorChangeWithStream-test.js +++ b/packages/react-relay/multi-actor/__tests__/ActorChangeWithStream-test.js @@ -11,7 +11,6 @@ 'use strict'; import type {ActorChangeWithStreamTestFragment$key} from './__generated__/ActorChangeWithStreamTestFragment.graphql'; -import type {ActorChangeWithStreamTestQuery} from './__generated__/ActorChangeWithStreamTestQuery.graphql'; import type { IActorEnvironment, IMultiActorEnvironment, diff --git a/packages/react-relay/relay-hooks/__tests__/useBlockingPaginationFragment-test.js b/packages/react-relay/relay-hooks/__tests__/useBlockingPaginationFragment-test.js index 68f0c7fea52ba..f96d4b691ece6 100644 --- a/packages/react-relay/relay-hooks/__tests__/useBlockingPaginationFragment-test.js +++ b/packages/react-relay/relay-hooks/__tests__/useBlockingPaginationFragment-test.js @@ -377,8 +377,8 @@ describe('useBlockingPaginationFragment', () => { ... }) => { // We need a render a component to run a Hook - const [owner, _setOwner] = useState(props.owner); - const [_, _setCount] = useState(0); + const [owner, setOwner_] = useState(props.owner); + const [, setCount] = useState(0); const fragment = props.fragment ?? gqlFragment; const artificialUserRef = useMemo( () => environment.lookup(owner.fragment).data?.node, @@ -388,8 +388,8 @@ describe('useBlockingPaginationFragment', () => { ? props.userRef : artificialUserRef; - setOwner = _setOwner; - forceUpdate = _setCount; + setOwner = setOwner_; + forceUpdate = setCount; const {data: userData} = useBlockingPaginationFragment(fragment, userRef); return ; @@ -842,10 +842,10 @@ describe('useBlockingPaginationFragment', () => { // This prevents console.error output in the test, which is expected jest.spyOn(console, 'error').mockImplementationOnce(() => {}); const { - __internal: {fetchQuery}, + __internal: {fetchQuery: fetchQuery_}, } = require('relay-runtime'); - fetchQuery(environment, query).subscribe({}); + fetchQuery_(environment, query).subscribe({}); const callback = jest.fn(); // $FlowFixMe[method-unbinding] added when improving typing for this parameters diff --git a/packages/react-relay/relay-hooks/__tests__/useBlockingPaginationFragment-with-suspense-transition-test.js b/packages/react-relay/relay-hooks/__tests__/useBlockingPaginationFragment-with-suspense-transition-test.js index 22ee6acb91bf1..31a5db8e062bd 100644 --- a/packages/react-relay/relay-hooks/__tests__/useBlockingPaginationFragment-with-suspense-transition-test.js +++ b/packages/react-relay/relay-hooks/__tests__/useBlockingPaginationFragment-with-suspense-transition-test.js @@ -392,7 +392,7 @@ describe('useBlockingPaginationFragment with useTransition', () => { }) => { // We need a render a component to run a Hook const [owner, _setOwner] = useState(props.owner); - const [_, _setCount] = useState(0); + const [, setCount] = useState(0); const fragment = props.fragment ?? gqlFragment; const artificialUserRef = useMemo(() => { const snapshot = environment.lookup(owner.fragment); @@ -403,7 +403,7 @@ describe('useBlockingPaginationFragment with useTransition', () => { : artificialUserRef; setOwner = _setOwner; - forceUpdate = _setCount; + forceUpdate = setCount; const {data: userData} = useBlockingPaginationFragmentWithSuspenseTransition( diff --git a/packages/react-relay/relay-hooks/__tests__/useEntryPointLoader-react-double-effects-test.js b/packages/react-relay/relay-hooks/__tests__/useEntryPointLoader-react-double-effects-test.js index 8bb952b6aca1f..84f13d3ec7593 100644 --- a/packages/react-relay/relay-hooks/__tests__/useEntryPointLoader-react-double-effects-test.js +++ b/packages/react-relay/relay-hooks/__tests__/useEntryPointLoader-react-double-effects-test.js @@ -151,7 +151,7 @@ describe.skip('useEntryPointLoader-react-double-effects', () => { loaderRenderLogs = []; LoaderComponent = function (props) { - const [entryPointRef, _loadEntryPoint] = useEntryPointLoader( + const [entryPointRef] = useEntryPointLoader( environmentProvider, props.entryPoint, { diff --git a/packages/react-relay/relay-hooks/__tests__/useFragmentNode-react-double-effects-test.js b/packages/react-relay/relay-hooks/__tests__/useFragmentNode-react-double-effects-test.js index a208bc680a761..c359a33aa4e47 100644 --- a/packages/react-relay/relay-hooks/__tests__/useFragmentNode-react-double-effects-test.js +++ b/packages/react-relay/relay-hooks/__tests__/useFragmentNode-react-double-effects-test.js @@ -13,7 +13,6 @@ const RelayEnvironmentProvider = require('../RelayEnvironmentProvider'); const useFragmentNode = require('../useFragmentNode'); -// eslint-disable-next-line no-unused-vars const React = require('react'); const {useEffect} = require('react'); const ReactTestRenderer = require('react-test-renderer'); diff --git a/packages/react-relay/relay-hooks/__tests__/useFragmentNode-required-test.js b/packages/react-relay/relay-hooks/__tests__/useFragmentNode-required-test.js index 569832d4c210b..7a101c24ab68c 100644 --- a/packages/react-relay/relay-hooks/__tests__/useFragmentNode-required-test.js +++ b/packages/react-relay/relay-hooks/__tests__/useFragmentNode-required-test.js @@ -14,7 +14,6 @@ import type {ReaderFragment} from '../../../relay-runtime/util/ReaderNode'; import type {RequestDescriptor} from 'relay-runtime/store/RelayStoreTypes'; const useFragmentNodeOriginal = require('../useFragmentNode'); -// eslint-disable-next-line no-unused-vars const React = require('react'); const ReactRelayContext = require('react-relay/ReactRelayContext'); const TestRenderer = require('react-test-renderer'); diff --git a/packages/react-relay/relay-hooks/__tests__/useFragmentNode-test.js b/packages/react-relay/relay-hooks/__tests__/useFragmentNode-test.js index 84a2701f48871..18564ac7924fe 100644 --- a/packages/react-relay/relay-hooks/__tests__/useFragmentNode-test.js +++ b/packages/react-relay/relay-hooks/__tests__/useFragmentNode-test.js @@ -224,7 +224,7 @@ beforeEach(() => { }) => { // We need a render a component to run a Hook const [owner, _setOwner] = useState(props.owner); - const [, _setCount] = useState(0); + const [, setCount] = useState(0); const userRef = props.hasOwnProperty('userRef') ? props.userRef : { @@ -237,7 +237,7 @@ beforeEach(() => { }; setSingularOwner = _setOwner; - forceSingularUpdate = () => _setCount(count => count + 1); + forceSingularUpdate = () => setCount(count => count + 1); const [userData] = useFragmentNode(gqlSingularFragment, userRef); return ; diff --git a/packages/react-relay/relay-hooks/__tests__/usePaginationFragment-test.js b/packages/react-relay/relay-hooks/__tests__/usePaginationFragment-test.js index 361d749a8b368..57f35f02344af 100644 --- a/packages/react-relay/relay-hooks/__tests__/usePaginationFragment-test.js +++ b/packages/react-relay/relay-hooks/__tests__/usePaginationFragment-test.js @@ -44,7 +44,6 @@ describe('usePaginationFragment', () => { let gqlQueryWithLiteralArgs; let gqlQueryWithStreaming; let gqlPaginationQuery; - let gqlPaginationQueryWithStreaming; let gqlFragment; let gqlFragmentWithStreaming; let query; @@ -3964,8 +3963,6 @@ describe('usePaginationFragment', () => { }); describe('paginating @fetchable types', () => { - let gqlRefetchQuery; - beforeEach(() => { const fetchVariables = {id: 'a'}; gqlQuery = getRequest(graphql` diff --git a/packages/react-relay/relay-hooks/__tests__/useQueryLoader-react-double-effects-test.js b/packages/react-relay/relay-hooks/__tests__/useQueryLoader-react-double-effects-test.js index a9649d3d279fd..3b605f95bd1d2 100644 --- a/packages/react-relay/relay-hooks/__tests__/useQueryLoader-react-double-effects-test.js +++ b/packages/react-relay/relay-hooks/__tests__/useQueryLoader-react-double-effects-test.js @@ -135,10 +135,7 @@ describe.skip('useQueryLoader-react-double-effects', () => { loaderRenderLogs = []; LoaderComponent = function (props) { - const [queryRef, _loadQuery] = useQueryLoader( - gqlQuery, - props.initialQueryRef, - ); + const [queryRef] = useQueryLoader(gqlQuery, props.initialQueryRef); const queryRefId = queryRef == null ? 'null' : queryRef.id ?? 'Unknown'; useEffect(() => { diff --git a/packages/react-relay/relay-hooks/__tests__/useRefetchableFragmentNode-test.js b/packages/react-relay/relay-hooks/__tests__/useRefetchableFragmentNode-test.js index 3a5a45a009b51..35795445a0767 100644 --- a/packages/react-relay/relay-hooks/__tests__/useRefetchableFragmentNode-test.js +++ b/packages/react-relay/relay-hooks/__tests__/useRefetchableFragmentNode-test.js @@ -262,8 +262,8 @@ describe('useRefetchableFragmentNode', () => { ... }) => { // We need a render a component to run a Hook - const [owner, _setOwner] = useState(props.owner); - const [_, _setCount] = useState(0); + const [owner, setOwner_] = useState(props.owner); + const [, setCount_] = useState(0); const fragment = props.fragment ?? gqlFragment; const artificialUserRef = useMemo( () => ({ @@ -281,8 +281,8 @@ describe('useRefetchableFragmentNode', () => { ? props.userRef : artificialUserRef; - forceUpdate = _setCount; - setOwner = _setOwner; + forceUpdate = setCount_; + setOwner = setOwner_; const {fragmentData: userData, refetch: refetchInternal} = useRefetchableFragmentNode(fragment, userRef); diff --git a/packages/react-relay/relay-hooks/__tests__/useRefetchableFragmentNode-with-suspense-transition-test.js b/packages/react-relay/relay-hooks/__tests__/useRefetchableFragmentNode-with-suspense-transition-test.js index 00e1c7b739a39..0c0a2c20ba744 100644 --- a/packages/react-relay/relay-hooks/__tests__/useRefetchableFragmentNode-with-suspense-transition-test.js +++ b/packages/react-relay/relay-hooks/__tests__/useRefetchableFragmentNode-with-suspense-transition-test.js @@ -253,7 +253,7 @@ describe('useRefetchableFragmentNode with useTransition', () => { }) => { // We need a render a component to run a Hook const owner = props.owner; - const [_, _setCount] = useState(0); + const [, setCount] = useState(0); const fragment = props.fragment ?? gqlFragment; const artificialUserRef = useMemo( () => ({ @@ -271,7 +271,7 @@ describe('useRefetchableFragmentNode with useTransition', () => { ? props.userRef : artificialUserRef; - forceUpdate = _setCount; + forceUpdate = setCount; const {data: userData} = useRefetchableFragmentNodeWithSuspenseTransition(fragment, userRef); diff --git a/packages/react-relay/relay-hooks/useSubscribeToInvalidationState.js b/packages/react-relay/relay-hooks/useSubscribeToInvalidationState.js index 9e2b824827927..8cb9f52d037df 100644 --- a/packages/react-relay/relay-hooks/useSubscribeToInvalidationState.js +++ b/packages/react-relay/relay-hooks/useSubscribeToInvalidationState.js @@ -13,7 +13,7 @@ 'use strict'; -import type {DataID, Disposable, InvalidationState} from 'relay-runtime'; +import type {DataID, Disposable} from 'relay-runtime'; const useRelayEnvironment = require('./useRelayEnvironment'); const {useEffect, useRef} = require('react'); diff --git a/packages/relay-runtime/mutations/RelayDeclarativeMutationConfig.js b/packages/relay-runtime/mutations/RelayDeclarativeMutationConfig.js index b4eebefd9008c..77307ca36fedf 100644 --- a/packages/relay-runtime/mutations/RelayDeclarativeMutationConfig.js +++ b/packages/relay-runtime/mutations/RelayDeclarativeMutationConfig.js @@ -15,7 +15,6 @@ import type { MutationParameters, RecordSourceSelectorProxy, - SelectorData, SelectorStoreUpdater, } from '../store/RelayStoreTypes'; import type {ConcreteRequest} from '../util/RelayConcreteNode'; diff --git a/packages/relay-runtime/store/RelayModernStore.js b/packages/relay-runtime/store/RelayModernStore.js index 9606b0b000d67..c516149399c8e 100644 --- a/packages/relay-runtime/store/RelayModernStore.js +++ b/packages/relay-runtime/store/RelayModernStore.js @@ -12,7 +12,6 @@ 'use strict'; -import type {ActorIdentifier} from '../multi-actor-environment/ActorIdentifier'; import type {DataID, Disposable} from '../util/RelayRuntimeTypes'; import type {Availability} from './DataChecker'; import type {GetDataID} from './RelayResponseNormalizer'; diff --git a/packages/relay-runtime/store/__tests__/RelayModernEnvironment-CommitPayload-test.js b/packages/relay-runtime/store/__tests__/RelayModernEnvironment-CommitPayload-test.js index 69af08e7129ab..3ab045d1453e4 100644 --- a/packages/relay-runtime/store/__tests__/RelayModernEnvironment-CommitPayload-test.js +++ b/packages/relay-runtime/store/__tests__/RelayModernEnvironment-CommitPayload-test.js @@ -19,7 +19,6 @@ const { } = require('../../multi-actor-environment'); const RelayNetwork = require('../../network/RelayNetwork'); const {getFragment, getRequest, graphql} = require('../../query/GraphQLTag'); -const RelayFeatureFlags = require('../../util/RelayFeatureFlags'); const RelayModernEnvironment = require('../RelayModernEnvironment'); const { createOperationDescriptor, diff --git a/packages/relay-runtime/store/__tests__/RelayModernEnvironment-ExecuteMutationWithMatch-test.js b/packages/relay-runtime/store/__tests__/RelayModernEnvironment-ExecuteMutationWithMatch-test.js index b565cc4cadfea..409aa27558a2b 100644 --- a/packages/relay-runtime/store/__tests__/RelayModernEnvironment-ExecuteMutationWithMatch-test.js +++ b/packages/relay-runtime/store/__tests__/RelayModernEnvironment-ExecuteMutationWithMatch-test.js @@ -33,10 +33,7 @@ const { const RelayModernStore = require('../RelayModernStore'); const RelayRecordSource = require('../RelayRecordSource'); const nullthrows = require('nullthrows'); -const { - disallowWarnings, - expectWarningWillFire, -} = require('relay-test-utils-internal'); +const {disallowWarnings} = require('relay-test-utils-internal'); disallowWarnings(); diff --git a/packages/relay-runtime/store/__tests__/RelayModernEnvironment-ExecuteWithDefer-test.js b/packages/relay-runtime/store/__tests__/RelayModernEnvironment-ExecuteWithDefer-test.js index d91ad951f06c2..f853a966a0fe8 100644 --- a/packages/relay-runtime/store/__tests__/RelayModernEnvironment-ExecuteWithDefer-test.js +++ b/packages/relay-runtime/store/__tests__/RelayModernEnvironment-ExecuteWithDefer-test.js @@ -29,7 +29,6 @@ const { const RelayNetwork = require('../../network/RelayNetwork'); const RelayObservable = require('../../network/RelayObservable'); const {getFragment, getRequest, graphql} = require('../../query/GraphQLTag'); -const RelayFeatureFlags = require('../../util/RelayFeatureFlags'); const RelayModernEnvironment = require('../RelayModernEnvironment'); const { createOperationDescriptor, diff --git a/packages/relay-runtime/store/__tests__/RelayModernEnvironment-ExecuteWithDeferAndModule-test.js b/packages/relay-runtime/store/__tests__/RelayModernEnvironment-ExecuteWithDeferAndModule-test.js index c5a31e228f2a2..a475afe341007 100644 --- a/packages/relay-runtime/store/__tests__/RelayModernEnvironment-ExecuteWithDeferAndModule-test.js +++ b/packages/relay-runtime/store/__tests__/RelayModernEnvironment-ExecuteWithDeferAndModule-test.js @@ -27,7 +27,6 @@ const { } = require('../../multi-actor-environment'); const RelayNetwork = require('../../network/RelayNetwork'); const RelayObservable = require('../../network/RelayObservable'); -const RelayFeatureFlags = require('../../util/RelayFeatureFlags'); const RelayModernEnvironment = require('../RelayModernEnvironment'); const { createOperationDescriptor, @@ -37,10 +36,7 @@ const RelayModernStore = require('../RelayModernStore'); const RelayRecordSource = require('../RelayRecordSource'); const QueryUserNormalizationFragment = require('./__generated__/RelayModernEnvironmentExecuteWithDeferAndModuleTestQuery_user$normalization.graphql'); const {graphql} = require('relay-runtime'); -const { - disallowWarnings, - expectWarningWillFire, -} = require('relay-test-utils-internal'); +const {disallowWarnings} = require('relay-test-utils-internal'); disallowWarnings(); diff --git a/packages/relay-runtime/store/__tests__/RelayModernEnvironment-ExecuteWithModule-test.js b/packages/relay-runtime/store/__tests__/RelayModernEnvironment-ExecuteWithModule-test.js index 090eb58d6ed66..09ceaa6b274ac 100644 --- a/packages/relay-runtime/store/__tests__/RelayModernEnvironment-ExecuteWithModule-test.js +++ b/packages/relay-runtime/store/__tests__/RelayModernEnvironment-ExecuteWithModule-test.js @@ -18,7 +18,6 @@ import type {NormalizationRootNode} from '../../util/NormalizationNode'; const RelayNetwork = require('../../network/RelayNetwork'); const RelayObservable = require('../../network/RelayObservable'); const {getFragment, getRequest, graphql} = require('../../query/GraphQLTag'); -const RelayFeatureFlags = require('../../util/RelayFeatureFlags'); const RelayModernEnvironment = require('../RelayModernEnvironment'); const { createOperationDescriptor, diff --git a/packages/relay-runtime/store/__tests__/RelayModernEnvironment-ExecuteWithNestedMatch-test.js b/packages/relay-runtime/store/__tests__/RelayModernEnvironment-ExecuteWithNestedMatch-test.js index f0e2bdb566b56..3e7c0283ad169 100644 --- a/packages/relay-runtime/store/__tests__/RelayModernEnvironment-ExecuteWithNestedMatch-test.js +++ b/packages/relay-runtime/store/__tests__/RelayModernEnvironment-ExecuteWithNestedMatch-test.js @@ -18,7 +18,6 @@ import type {NormalizationRootNode} from '../../util/NormalizationNode'; const RelayNetwork = require('../../network/RelayNetwork'); const RelayObservable = require('../../network/RelayObservable'); const {getFragment, getRequest, graphql} = require('../../query/GraphQLTag'); -const RelayFeatureFlags = require('../../util/RelayFeatureFlags'); const RelayModernEnvironment = require('../RelayModernEnvironment'); const { createOperationDescriptor, diff --git a/packages/relay-runtime/store/__tests__/RelayModernEnvironment-ExecuteWithStream-test.js b/packages/relay-runtime/store/__tests__/RelayModernEnvironment-ExecuteWithStream-test.js index 1254eafb3eb70..3f71f42ef873a 100644 --- a/packages/relay-runtime/store/__tests__/RelayModernEnvironment-ExecuteWithStream-test.js +++ b/packages/relay-runtime/store/__tests__/RelayModernEnvironment-ExecuteWithStream-test.js @@ -25,7 +25,6 @@ import type { const RelayNetwork = require('../../network/RelayNetwork'); const RelayObservable = require('../../network/RelayObservable'); const {getFragment, getRequest, graphql} = require('../../query/GraphQLTag'); -const RelayFeatureFlags = require('../../util/RelayFeatureFlags'); const RelayModernEnvironment = require('../RelayModernEnvironment'); const { createOperationDescriptor, diff --git a/packages/relay-runtime/store/__tests__/RelayModernEnvironment-ExecuteWithStreamedConnection-test.js b/packages/relay-runtime/store/__tests__/RelayModernEnvironment-ExecuteWithStreamedConnection-test.js index 5c13d11c1210d..cc81ec1187a3d 100644 --- a/packages/relay-runtime/store/__tests__/RelayModernEnvironment-ExecuteWithStreamedConnection-test.js +++ b/packages/relay-runtime/store/__tests__/RelayModernEnvironment-ExecuteWithStreamedConnection-test.js @@ -26,7 +26,6 @@ const ConnectionHandler = require('../../handlers/connection/ConnectionHandler') const RelayNetwork = require('../../network/RelayNetwork'); const RelayObservable = require('../../network/RelayObservable'); const {getFragment, getRequest, graphql} = require('../../query/GraphQLTag'); -const RelayFeatureFlags = require('../../util/RelayFeatureFlags'); const RelayModernEnvironment = require('../RelayModernEnvironment'); const { createOperationDescriptor, diff --git a/packages/relay-runtime/store/__tests__/RelayModernEnvironment-NoInline-test.js b/packages/relay-runtime/store/__tests__/RelayModernEnvironment-NoInline-test.js index a01f522d86b52..94a873945de68 100644 --- a/packages/relay-runtime/store/__tests__/RelayModernEnvironment-NoInline-test.js +++ b/packages/relay-runtime/store/__tests__/RelayModernEnvironment-NoInline-test.js @@ -18,7 +18,6 @@ const { const RelayNetwork = require('../../network/RelayNetwork'); const RelayObservable = require('../../network/RelayObservable'); const {getFragment, getRequest, graphql} = require('../../query/GraphQLTag'); -const RelayFeatureFlags = require('../../util/RelayFeatureFlags'); const RelayModernEnvironment = require('../RelayModernEnvironment'); const { createOperationDescriptor, diff --git a/packages/relay-runtime/store/__tests__/RelayModernEnvironment-PartiallyNormalizedDataObservabilityWithBatchedUpdates-test.js b/packages/relay-runtime/store/__tests__/RelayModernEnvironment-PartiallyNormalizedDataObservabilityWithBatchedUpdates-test.js index 7d468cba7082a..947a3228f2d0a 100644 --- a/packages/relay-runtime/store/__tests__/RelayModernEnvironment-PartiallyNormalizedDataObservabilityWithBatchedUpdates-test.js +++ b/packages/relay-runtime/store/__tests__/RelayModernEnvironment-PartiallyNormalizedDataObservabilityWithBatchedUpdates-test.js @@ -22,7 +22,6 @@ import type { const RelayNetwork = require('../../network/RelayNetwork'); const RelayObservable = require('../../network/RelayObservable'); const {getFragment, getRequest, graphql} = require('../../query/GraphQLTag'); -const RelayFeatureFlags = require('../../util/RelayFeatureFlags'); const RelayModernEnvironment = require('../RelayModernEnvironment'); const { createOperationDescriptor, diff --git a/packages/relay-runtime/store/__tests__/RelayModernFragmentSpecResolver-test.js b/packages/relay-runtime/store/__tests__/RelayModernFragmentSpecResolver-test.js index 03068146958f9..4e4a4e8aaf8ca 100644 --- a/packages/relay-runtime/store/__tests__/RelayModernFragmentSpecResolver-test.js +++ b/packages/relay-runtime/store/__tests__/RelayModernFragmentSpecResolver-test.js @@ -11,7 +11,6 @@ 'use strict'; const {fetchQuery} = require('../../query/fetchQueryInternal'); -const RelayFeatureFlags = require('../../util/RelayFeatureFlags'); const RelayModernFragmentSpecResolver = require('../RelayModernFragmentSpecResolver'); const { createOperationDescriptor, diff --git a/packages/relay-runtime/store/__tests__/RelayReader-RequiredFields-test.js b/packages/relay-runtime/store/__tests__/RelayReader-RequiredFields-test.js index d3258ba3c2a32..5af1b6160db3c 100644 --- a/packages/relay-runtime/store/__tests__/RelayReader-RequiredFields-test.js +++ b/packages/relay-runtime/store/__tests__/RelayReader-RequiredFields-test.js @@ -16,7 +16,7 @@ const { } = require('../RelayModernOperationDescriptor'); const {read} = require('../RelayReader'); const RelayRecordSource = require('../RelayRecordSource'); -const {RelayFeatureFlags, createReaderSelector} = require('relay-runtime'); +const {createReaderSelector} = require('relay-runtime'); describe('RelayReader @required', () => { it('bubbles @required(action: LOG) scalars up to LinkedField', () => { diff --git a/packages/relay-runtime/subscription/requestSubscription.js b/packages/relay-runtime/subscription/requestSubscription.js index f6f350ba8e55c..86d01a0228f0c 100644 --- a/packages/relay-runtime/subscription/requestSubscription.js +++ b/packages/relay-runtime/subscription/requestSubscription.js @@ -30,7 +30,6 @@ const { createOperationDescriptor, } = require('../store/RelayModernOperationDescriptor'); const {createReaderSelector} = require('../store/RelayModernSelector'); -const RelayFeatureFlags = require('../util/RelayFeatureFlags'); const warning = require('warning'); export type SubscriptionParameters = {|