Home / File/ index.ts — react Source File

index.ts — react Source File

Architecture documentation for index.ts, a typescript file in the react codebase. 7 imports, 0 dependents.

File typescript BabelCompiler Validation 7 imports 1 functions

Entity Profile

Dependency Diagram

graph LR
  62c6ef48_b6c1_13e9_0d99_fe0a9fcba79a["index.ts"]
  59baec20_252f_875a_e0a2_9e420cfb5db8["libraryCompat.ts"]
  62c6ef48_b6c1_13e9_0d99_fe0a9fcba79a --> 59baec20_252f_875a_e0a2_9e420cfb5db8
  73dc1103_e33f_6e55_0717_0792300bc7e8["reactCompiler.ts"]
  62c6ef48_b6c1_13e9_0d99_fe0a9fcba79a --> 73dc1103_e33f_6e55_0717_0792300bc7e8
  5488ec04_9215_52f6_1b36_7bc71dca8f3c["strictMode.ts"]
  62c6ef48_b6c1_13e9_0d99_fe0a9fcba79a --> 5488ec04_9215_52f6_1b36_7bc71dca8f3c
  88bb7c92_0dfa_da02_95e3_0417e09ee0cb["fast-glob"]
  62c6ef48_b6c1_13e9_0d99_fe0a9fcba79a --> 88bb7c92_0dfa_da02_95e3_0417e09ee0cb
  c0588312_ab09_8f72_8d9e_95868024d651["promises"]
  62c6ef48_b6c1_13e9_0d99_fe0a9fcba79a --> c0588312_ab09_8f72_8d9e_95868024d651
  2c5caf12_d18a_8333_766b_02c5ac77719c["ora"]
  62c6ef48_b6c1_13e9_0d99_fe0a9fcba79a --> 2c5caf12_d18a_8333_766b_02c5ac77719c
  47937ccc_9595_75dc_bb83_e514c3f4b217["yargs"]
  62c6ef48_b6c1_13e9_0d99_fe0a9fcba79a --> 47937ccc_9595_75dc_bb83_e514c3f4b217
  style 62c6ef48_b6c1_13e9_0d99_fe0a9fcba79a fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

/**
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */

import {glob} from 'fast-glob';
import * as fs from 'fs/promises';
import ora from 'ora';
import yargs from 'yargs/yargs';
import libraryCompatCheck from './checks/libraryCompat';
import reactCompilerCheck from './checks/reactCompiler';
import strictModeCheck from './checks/strictMode';

async function main() {
  const argv = yargs(process.argv.slice(2))
    .scriptName('healthcheck')
    .usage('$ npx healthcheck <src>')
    .option('src', {
      description: 'glob expression matching src files to compile',
      type: 'string',
      default: '**/+(*.{js,mjs,jsx,ts,tsx}|package.json)',
    })
    .parseSync();

  const spinner = ora('Checking').start();
  let src = argv.src;

  const globOptions = {
    onlyFiles: true,
    ignore: [
      '**/node_modules/**',
      '**/dist/**',
      '**/tests/**',
      '**/__tests__/**',
      '**/__mocks__/**',
      '**/__e2e__/**',
    ],
  };

  for (const path of await glob(src, globOptions)) {
    const source = await fs.readFile(path, 'utf-8');
    spinner.text = `Checking ${path}`;
    reactCompilerCheck.run(source, path);
    strictModeCheck.run(source, path);
    libraryCompatCheck.run(source, path);
  }
  spinner.stop();

  reactCompilerCheck.report();
  strictModeCheck.report();
  libraryCompatCheck.report();
}

main();

Domain

Subdomains

Functions

Dependencies

Frequently Asked Questions

What does index.ts do?
index.ts is a source file in the react codebase, written in typescript. It belongs to the BabelCompiler domain, Validation subdomain.
What functions are defined in index.ts?
index.ts defines 1 function(s): main.
What does index.ts depend on?
index.ts imports 7 module(s): fast-glob, libraryCompat.ts, ora, promises, reactCompiler.ts, strictMode.ts, yargs.
Where is index.ts in the architecture?
index.ts is located at compiler/packages/react-compiler-healthcheck/src/index.ts (domain: BabelCompiler, subdomain: Validation, directory: compiler/packages/react-compiler-healthcheck/src).

Analyze Your Own Codebase

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

Try Supermodel Free