-
Notifications
You must be signed in to change notification settings - Fork 47k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added hookNames entrypoint to react-devtools-inline
And changed dynamic import() code to be passed in rather than embedded in the package
- Loading branch information
Brian Vaughn
committed
Sep 7, 2021
1 parent
2b4b830
commit 16d2ce5
Showing
10 changed files
with
153 additions
and
90 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
module.exports = require('./dist/hookNames'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
/** @flow */ | ||
|
||
import { | ||
parseHookNames, | ||
parseSourceAndMetadata, | ||
prefetchSourceFiles, | ||
purgeCachedMetadata, | ||
} from 'react-devtools-shared/src/hooks/parseHookNames'; | ||
|
||
export { | ||
parseHookNames, | ||
parseSourceAndMetadata, | ||
prefetchSourceFiles, | ||
purgeCachedMetadata, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 8 additions & 1 deletion
9
packages/react-devtools-shared/src/devtools/views/Components/FetchFileWithCachingContext.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
packages/react-devtools-shared/src/devtools/views/Components/HookNamesModuleLoaderContext.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
/** | ||
* Copyright (c) Facebook, Inc. and its affiliates. | ||
* | ||
* This source code is licensed under the MIT license found in the | ||
* LICENSE file in the root directory of this source tree. | ||
* | ||
* @flow | ||
*/ | ||
|
||
import type {Thenable} from 'shared/ReactTypes'; | ||
|
||
import {createContext} from 'react'; | ||
import typeof * as ParseHookNamesModule from 'react-devtools-shared/src/hooks/parseHookNames'; | ||
|
||
export type HookNamesModuleLoaderFunction = () => Thenable<ParseHookNamesModule>; | ||
export type Context = HookNamesModuleLoaderFunction | null; | ||
|
||
const HookNamesModuleLoaderContext = createContext<Context>(null); | ||
HookNamesModuleLoaderContext.displayName = 'HookNamesModuleLoaderContext'; | ||
|
||
export default HookNamesModuleLoaderContext; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters