mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
DevTools: Show hook names based on variable usage (#21641)
Co-authored-by: Brian Vaughn <brian.david.vaughn@gmail.com> Co-authored-by: Saphal Patro <saphal1998@gmail.com> Co-authored-by: VibhorCodecianGupta <vibhordelgupta@gmail.com>
This commit is contained in:
co-authored by
Brian Vaughn
Saphal Patro
VibhorCodecianGupta
parent
ab390c65ee
commit
c5cfa71948
@@ -55,12 +55,20 @@ module.exports = Object.assign({}, baseConfig, {
|
||||
// Don't run bundle tests on -test.internal.* files
|
||||
testPathIgnorePatterns: ['/node_modules/', '-test.internal.js$'],
|
||||
// Exclude the build output from transforms
|
||||
transformIgnorePatterns: ['/node_modules/', '<rootDir>/build2/'],
|
||||
testRegex: 'packages/react-devtools-shared/src/__tests__/[^]+.test.js$',
|
||||
transformIgnorePatterns: [
|
||||
'/node_modules/',
|
||||
'<rootDir>/build2/',
|
||||
'/__compiled__/',
|
||||
],
|
||||
testRegex:
|
||||
'packages/react-devtools-(extensions|shared)/src/__tests__/[^]+.test.js$',
|
||||
snapshotSerializers: [
|
||||
require.resolve(
|
||||
'../../packages/react-devtools-shared/src/__tests__/dehydratedValueSerializer.js'
|
||||
),
|
||||
require.resolve(
|
||||
'../../packages/react-devtools-shared/src/__tests__/hookSerializer.js'
|
||||
),
|
||||
require.resolve(
|
||||
'../../packages/react-devtools-shared/src/__tests__/inspectedElementSerializer.js'
|
||||
),
|
||||
|
||||
@@ -52,6 +52,7 @@ module.exports = Object.assign({}, baseConfig, {
|
||||
moduleNameMapper,
|
||||
modulePathIgnorePatterns: [
|
||||
...baseConfig.modulePathIgnorePatterns,
|
||||
'packages/react-devtools-extensions',
|
||||
'packages/react-devtools-shared',
|
||||
],
|
||||
// Don't run bundle tests on -test.internal.* files
|
||||
|
||||
@@ -5,6 +5,7 @@ const baseConfig = require('./config.base');
|
||||
module.exports = Object.assign({}, baseConfig, {
|
||||
modulePathIgnorePatterns: [
|
||||
...baseConfig.modulePathIgnorePatterns,
|
||||
'packages/react-devtools-extensions',
|
||||
'packages/react-devtools-shared',
|
||||
'ReactIncrementalPerf',
|
||||
'ReactIncrementalUpdatesMinimalism',
|
||||
|
||||
@@ -5,6 +5,7 @@ const baseConfig = require('./config.base');
|
||||
module.exports = Object.assign({}, baseConfig, {
|
||||
modulePathIgnorePatterns: [
|
||||
...baseConfig.modulePathIgnorePatterns,
|
||||
'packages/react-devtools-extensions',
|
||||
'packages/react-devtools-shared',
|
||||
],
|
||||
setupFiles: [
|
||||
|
||||
@@ -5,6 +5,7 @@ const baseConfig = require('./config.base');
|
||||
module.exports = Object.assign({}, baseConfig, {
|
||||
modulePathIgnorePatterns: [
|
||||
...baseConfig.modulePathIgnorePatterns,
|
||||
'packages/react-devtools-extensions',
|
||||
'packages/react-devtools-shared',
|
||||
],
|
||||
setupFiles: [
|
||||
|
||||
@@ -25,7 +25,14 @@ let didWarn = false;
|
||||
let didError = false;
|
||||
|
||||
const files = glob
|
||||
.sync('**/*.js', {ignore: ['**/node_modules/**', '**/cjs/**']})
|
||||
.sync('**/*.js', {
|
||||
ignore: [
|
||||
'**/node_modules/**',
|
||||
'**/cjs/**',
|
||||
'**/__compiled__/**',
|
||||
'packages/react-devtools-extensions/src/ErrorTesterCompiled.js',
|
||||
],
|
||||
})
|
||||
.filter(f => !onlyChanged || changedFiles.has(f));
|
||||
|
||||
if (!files.length) {
|
||||
|
||||
Reference in New Issue
Block a user