Skip to content

Commit

Permalink
Fix risky internal imports of modules with different package.json.
Browse files Browse the repository at this point in the history
  • Loading branch information
benjamn committed Feb 6, 2023
1 parent a8c0c5a commit 4207078
Show file tree
Hide file tree
Showing 8 changed files with 19 additions and 6 deletions.
12 changes: 11 additions & 1 deletion src/__tests__/__snapshots__/exports.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -391,19 +391,29 @@ Array [
"hasAnyDirectives",
"hasClientExports",
"hasDirectives",
"isAsyncIterableIterator",
"isBlob",
"isDocumentNode",
"isExecutionPatchIncrementalResult",
"isExecutionPatchInitialResult",
"isExecutionPatchResult",
"isField",
"isInlineFragment",
"isNodeReadableStream",
"isNodeResponse",
"isNonEmptyArray",
"isNonNullObject",
"isReadableStream",
"isReference",
"isStreamableBlob",
"iterateObserversSafely",
"makeReference",
"makeUniqueId",
"maybe",
"maybeDeepFreeze",
"mergeDeep",
"mergeDeepArray",
"mergeIncrementalData",
"mergeOptions",
"offsetLimitPagination",
"relayStylePagination",
Expand All @@ -424,7 +434,7 @@ exports[`exports of public entry points @apollo/client/utilities/globals 1`] = `
Array [
"DEV",
"InvariantError",
"checkDEV",
"__DEV__",
"global",
"invariant",
"maybe",
Expand Down
1 change: 1 addition & 0 deletions src/cache/inmemory/__tests__/roundtrip.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { __DEV__ } from "../../../utilities/globals";
import { DocumentNode } from 'graphql';
import gql from 'graphql-tag';

Expand Down
2 changes: 1 addition & 1 deletion src/core/QueryInfo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { equal } from "@wry/equality";

import { Cache, ApolloCache } from '../cache';
import { DeepMerger } from "../utilities"
import { mergeIncrementalData } from '../utilities/common/incrementalResult';
import { mergeIncrementalData } from '../utilities';
import { WatchQueryOptions, ErrorPolicy } from './watchQueryOptions';
import { ObservableQuery, reobserveCacheFirst } from './ObservableQuery';
import { QueryListener } from './types';
Expand Down
2 changes: 1 addition & 1 deletion src/core/QueryManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { ApolloLink, execute, FetchResult } from '../link/core';
import {
isExecutionPatchIncrementalResult,
isExecutionPatchResult,
} from '../utilities/common/incrementalResult';
} from '../utilities';
import { Cache, ApolloCache, canonicalStringify } from '../cache';

import {
Expand Down
2 changes: 1 addition & 1 deletion src/link/http/responseIterator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import {
isNodeReadableStream,
isReadableStream,
isStreamableBlob,
} from "../../utilities/common/responseIterator";
} from "../../utilities";

import asyncIterator from "./iterators/async";
import nodeStreamIterator from "./iterators/nodeStream";
Expand Down
2 changes: 1 addition & 1 deletion src/react/hoc/__tests__/queries/recomposeWithState.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// to avoid incurring an indirect dependency on ua-parser-js via fbjs.

import React, { createFactory, Component } from "react";
import '../../../../utilities/globals'; // For __DEV__
import { __DEV__ } from "../../../../utilities/globals";

const setStatic =
(key: string, value: string) => (BaseComponent: React.ComponentClass) => {
Expand Down
2 changes: 1 addition & 1 deletion src/react/hooks/internal/useIsomorphicLayoutEffect.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { useLayoutEffect, useEffect } from 'react';
import { canUseLayoutEffect } from '../../../utilities/common/canUse';
import { canUseLayoutEffect } from '../../../utilities';

export const useIsomorphicLayoutEffect = canUseLayoutEffect
? useLayoutEffect
Expand Down
2 changes: 2 additions & 0 deletions src/utilities/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,5 +96,7 @@ export * from './common/compact';
export * from './common/makeUniqueId';
export * from './common/stringifyForDisplay';
export * from './common/mergeOptions';
export * from './common/responseIterator';
export * from './common/incrementalResult';

export * from './types/IsStrictlyAny';

0 comments on commit 4207078

Please sign in to comment.