Home / Function/ packages() — react Function Reference

packages() — react Function Reference

Architecture documentation for the packages() function in config.build-devtools.js from the react codebase.

Entity Profile

Dependency Diagram

graph TD
  1580c40a_ae87_1227_a7ef_bd61d6c8bae1["packages()"]
  81b4e6b1_73e1_082a_1c80_2940f6d55842["config.build-devtools.js"]
  1580c40a_ae87_1227_a7ef_bd61d6c8bae1 -->|defined in| 81b4e6b1_73e1_082a_1c80_2940f6d55842
  style 1580c40a_ae87_1227_a7ef_bd61d6c8bae1 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

scripts/jest/config.build-devtools.js lines 13–34

const packages = readdirSync(packagesRoot).filter(dir => {
  if (dir.charAt(0) === '.') {
    return false;
  }
  if (dir.includes('react-devtools')) {
    return false;
  }
  if (dir === 'internal-test-utils') {
    // This is an internal package used only for testing. It's OK to read
    // from source.
    // TODO: Maybe let's have some convention for this?
    return false;
  }
  const packagePath = join(packagesRoot, dir, 'package.json');
  let stat;
  try {
    stat = statSync(packagePath);
  } catch (err) {
    return false;
  }
  return stat.isFile();
});

Domain

Subdomains

Frequently Asked Questions

What does packages() do?
packages() is a function in the react codebase, defined in scripts/jest/config.build-devtools.js.
Where is packages() defined?
packages() is defined in scripts/jest/config.build-devtools.js at line 13.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free