Skip to content

Commit

Permalink
Move shared utilities into backend/shared
Browse files Browse the repository at this point in the history
Clears the root folder of the backend a bit to clarify which parts are entry points.

This follows from these same files being in packages/shared/ since they're
shared by multiple renderers.
  • Loading branch information
sebmarkbage committed Jul 27, 2024
1 parent 7e87569 commit bbe437b
Show file tree
Hide file tree
Showing 8 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
* @flow
*/

import {attach} from 'react-devtools-shared/src/backend/renderer';
import {attach} from 'react-devtools-shared/src/backend/fiber/renderer';
import {SESSION_STORAGE_RELOAD_AND_PROFILE_KEY} from 'react-devtools-shared/src/constants';
import {sessionStorageGetItem} from 'react-devtools-shared/src/storage';

Expand Down
2 changes: 1 addition & 1 deletion packages/react-devtools-shared/src/backend/console.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ import {
supportsOwnerStacks,
supportsNativeConsoleTasks,
} from './fiber/DevToolsFiberComponentStack';
import {formatOwnerStack} from './DevToolsOwnerStack';
import {formatOwnerStack} from './shared/DevToolsOwnerStack';
import {castBool, castBrowserTheme} from '../utils';

const OVERRIDE_CONSOLE_METHODS = ['error', 'trace', 'warn'];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ import {
describeFunctionComponentFrame,
describeClassComponentFrame,
describeDebugInfoFrame,
} from '../DevToolsComponentStackFrame';
} from '../shared/DevToolsComponentStackFrame';

import {formatOwnerStack} from '../DevToolsOwnerStack';
import {formatOwnerStack} from '../shared/DevToolsOwnerStack';

export function describeFiber(
workTagMap: WorkTagMap,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ import {
MEMO_NUMBER,
MEMO_SYMBOL_STRING,
SERVER_CONTEXT_SYMBOL_STRING,
} from '../ReactSymbols';
} from '../shared/ReactSymbols';
import {enableStyleXFeatures} from 'react-devtools-feature-flags';
import is from 'shared/objectIs';
import hasOwnProperty from 'shared/hasOwnProperty';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// while still maintaining support for multiple renderer versions
// (which use different values for ReactTypeOfWork).

import type {CurrentDispatcherRef} from './types';
import type {CurrentDispatcherRef} from '../types';

// The shared console patching code is DEV-only.
// We can't use it since DevTools only ships production builds.
Expand Down

0 comments on commit bbe437b

Please sign in to comment.