Skip to content

Commit

Permalink
Update packages, imports, and configs for new named hooks location
Browse files Browse the repository at this point in the history
This is the commit that should be reviewed.
  • Loading branch information
Brian Vaughn committed Sep 7, 2021
1 parent 35da492 commit 7fa3ab6
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 11 deletions.
4 changes: 2 additions & 2 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ packages/react-devtools-core/dist
packages/react-devtools-extensions/chrome/build
packages/react-devtools-extensions/firefox/build
packages/react-devtools-extensions/shared/build
packages/react-devtools-extensions/src/__tests__/__source__/__compiled__/
packages/react-devtools-extensions/src/__tests__/__source__/__untransformed__/
packages/react-devtools-extensions/src/ErrorTesterCompiled.js
packages/react-devtools-inline/dist
packages/react-devtools-shared/src/hooks/__tests__/__source__/__compiled__/
packages/react-devtools-shared/src/hooks/__tests__/__source__/__untransformed__/
packages/react-devtools-shell/dist
packages/react-devtools-scheduling-profiler/dist
packages/react-devtools-scheduling-profiler/static
4 changes: 2 additions & 2 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ packages/react-devtools-core/dist
packages/react-devtools-extensions/chrome/build
packages/react-devtools-extensions/firefox/build
packages/react-devtools-extensions/shared/build
packages/react-devtools-extensions/src/__tests__/__source__/__compiled__/
packages/react-devtools-extensions/src/__tests__/__source__/__untransformed__/
packages/react-devtools-extensions/src/ErrorTesterCompiled.js
packages/react-devtools-inline/dist
packages/react-devtools-shared/src/hooks/__tests__/__source__/__compiled__/
packages/react-devtools-shared/src/hooks/__tests__/__source__/__untransformed__/
packages/react-devtools-shell/dist
packages/react-devtools-scheduling-profiler/dist
packages/react-devtools-scheduling-profiler/static
5 changes: 1 addition & 4 deletions packages/react-devtools-extensions/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@
"test:chrome": "node ./chrome/test",
"test:firefox": "node ./firefox/test",
"test:edge": "node ./edge/test",
"improve-images": "node ./improveImages.mjs",
"update-mock-source-maps": "babel-node --presets=@babel/preset-env,@babel/preset-flow ./src/__tests__/updateMockSourceMaps.js"
"improve-images": "node ./improveImages.mjs"
},
"devDependencies": {
"@babel/core": "^7.11.1",
Expand All @@ -27,8 +26,6 @@
"@babel/plugin-transform-flow-strip-types": "^7.10.4",
"@babel/plugin-transform-modules-commonjs": "^7.10.4",
"@babel/plugin-transform-react-jsx-source": "^7.10.5",
"@babel/preset-env": "^7.11.0",
"@babel/preset-flow": "^7.10.4",
"@babel/preset-react": "^7.10.4",
"acorn-jsx": "^5.2.0",
"archiver": "^3.0.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/react-devtools-extensions/src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ function createPanelIfReactLoaded() {

render = (overrideTab = mostRecentOverrideTab) => {
mostRecentOverrideTab = overrideTab;
import('./parseHookNames').then(
import('react-devtools-shared/src/hooks/parseHookNames').then(
({parseHookNames, prefetchSourceFiles, purgeCachedMetadata}) => {
root.render(
createElement(DevTools, {
Expand Down
5 changes: 5 additions & 0 deletions packages/react-devtools-shared/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,17 @@
"private": true,
"name": "react-devtools-shared",
"version": "0.0.0",
"scripts": {
"update-mock-source-maps": "babel-node --presets=@babel/preset-env,@babel/preset-flow ./src/hooks/__tests__/updateMockSourceMaps.js"
},
"devDependencies": {
"react-15": "npm:react@^15",
"react-dom-15": "npm:react-dom@^15"
},
"dependencies": {
"@babel/parser": "^7.12.5",
"@babel/preset-env": "^7.11.0",
"@babel/preset-flow": "^7.10.4",
"@babel/runtime": "^7.11.2",
"@babel/traverse": "^7.12.5",
"@reach/menu-button": "^0.16.1",
Expand Down
3 changes: 1 addition & 2 deletions scripts/jest/config.build-devtools.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,7 @@ module.exports = Object.assign({}, baseConfig, {
'/__compiled__/',
'/__untransformed__/',
],
testRegex:
'packages/react-devtools-(extensions|shared)/src/__tests__/[^]+.test.js$',
testRegex: 'packages/react-devtools-shared/.+/__tests__/[^]+.test.js$',
snapshotSerializers: [
require.resolve(
'../../packages/react-devtools-shared/src/__tests__/dehydratedValueSerializer.js'
Expand Down

0 comments on commit 7fa3ab6

Please sign in to comment.