Skip to content

Commit 075dc80

Browse files
committed
Move shared utilities into backend/shared
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.
1 parent 7e87569 commit 075dc80

File tree

9 files changed

+7
-7
lines changed

9 files changed

+7
-7
lines changed

.eslintrc.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -490,7 +490,7 @@ module.exports = {
490490
'packages/react-devtools-extensions/**/*.js',
491491
'packages/react-devtools-shared/src/hook.js',
492492
'packages/react-devtools-shared/src/backend/console.js',
493-
'packages/react-devtools-shared/src/backend/DevToolsComponentStackFrame.js',
493+
'packages/react-devtools-shared/src/backend/shared/DevToolsComponentStackFrame.js',
494494
],
495495
globals: {
496496
__IS_CHROME__: 'readonly',

packages/react-devtools-extensions/src/contentScripts/renderer.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
* @flow
99
*/
1010

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

packages/react-devtools-shared/src/backend/console.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ import {
3232
supportsOwnerStacks,
3333
supportsNativeConsoleTasks,
3434
} from './fiber/DevToolsFiberComponentStack';
35-
import {formatOwnerStack} from './DevToolsOwnerStack';
35+
import {formatOwnerStack} from './shared/DevToolsOwnerStack';
3636
import {castBool, castBrowserTheme} from '../utils';
3737

3838
const OVERRIDE_CONSOLE_METHODS = ['error', 'trace', 'warn'];

packages/react-devtools-shared/src/backend/fiber/DevToolsFiberComponentStack.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ import {
2222
describeFunctionComponentFrame,
2323
describeClassComponentFrame,
2424
describeDebugInfoFrame,
25-
} from '../DevToolsComponentStackFrame';
25+
} from '../shared/DevToolsComponentStackFrame';
2626

27-
import {formatOwnerStack} from '../DevToolsOwnerStack';
27+
import {formatOwnerStack} from '../shared/DevToolsOwnerStack';
2828

2929
export function describeFiber(
3030
workTagMap: WorkTagMap,

packages/react-devtools-shared/src/backend/fiber/renderer.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ import {
9595
MEMO_NUMBER,
9696
MEMO_SYMBOL_STRING,
9797
SERVER_CONTEXT_SYMBOL_STRING,
98-
} from '../ReactSymbols';
98+
} from '../shared/ReactSymbols';
9999
import {enableStyleXFeatures} from 'react-devtools-feature-flags';
100100
import is from 'shared/objectIs';
101101
import hasOwnProperty from 'shared/hasOwnProperty';

packages/react-devtools-shared/src/backend/DevToolsComponentStackFrame.js renamed to packages/react-devtools-shared/src/backend/shared/DevToolsComponentStackFrame.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
// while still maintaining support for multiple renderer versions
1313
// (which use different values for ReactTypeOfWork).
1414

15-
import type {CurrentDispatcherRef} from './types';
15+
import type {CurrentDispatcherRef} from '../types';
1616

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

0 commit comments

Comments
 (0)