Home / Function/ run() — react Function Reference

run() — react Function Reference

Architecture documentation for the run() function in confirm-version-and-tags.js from the react codebase.

Entity Profile

Dependency Diagram

graph TD
  f29110b6_242d_ce87_7706_9a0ce22ec37f["run()"]
  b75b56c3_1165_df6c_ff98_9bb4c35adf2b["confirm-version-and-tags.js"]
  f29110b6_242d_ce87_7706_9a0ce22ec37f -->|defined in| b75b56c3_1165_df6c_ff98_9bb4c35adf2b
  style f29110b6_242d_ce87_7706_9a0ce22ec37f fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

scripts/release/publish-commands/confirm-version-and-tags.js lines 11–51

const run = async ({cwd, packages, tags, ci}) => {
  clear();

  if (tags.length === 0) {
    console.error('Expected at least one tag.');
    process.exit(1);
  } else if (tags.length === 1) {
    console.log(
      theme`{spinnerSuccess ✓} You are about the publish the following packages under the tag {tag ${tags}}:`
    );
  } else {
    console.log(
      theme`{spinnerSuccess ✓} You are about the publish the following packages under the tags {tag ${tags.join(
        ', '
      )}}:`
    );
  }

  for (let i = 0; i < packages.length; i++) {
    const packageName = packages[i];
    const packageJSONPath = join(
      cwd,
      'build/node_modules',
      packageName,
      'package.json'
    );
    const packageJSON = await readJson(packageJSONPath);
    console.log(
      theme`• {package ${packageName}} {version ${packageJSON.version}}`
    );
    if (ci) {
      console.log(packageJSON);
    }
  }

  if (!ci) {
    await confirm('Do you want to proceed?');
  }

  clear();
};

Domain

Subdomains

Frequently Asked Questions

What does run() do?
run() is a function in the react codebase, defined in scripts/release/publish-commands/confirm-version-and-tags.js.
Where is run() defined?
run() is defined in scripts/release/publish-commands/confirm-version-and-tags.js at line 11.

Analyze Your Own Codebase

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

Try Supermodel Free