Home / File/ print-follow-up-instructions.js — react Source File

print-follow-up-instructions.js — react Source File

Architecture documentation for print-follow-up-instructions.js, a javascript file in the react codebase.

Entity Profile

Relationship Graph

Source Code

#!/usr/bin/env node

'use strict';

const clear = require('clear');
const {existsSync} = require('fs');
const {readJsonSync} = require('fs-extra');
const {join} = require('path');
const theme = require('../theme');
const {execRead} = require('../utils');

const run = async ({cwd, packages, tags}) => {
  // Tags are named after the react version.
  const {version} = readJsonSync(
    `${cwd}/build/node_modules/react/package.json`
  );

  clear();

  if (tags.length === 1 && tags[0] === 'next') {
    console.log(
      theme`{header A "next" release} {version ${version}} {header has been published!}`
    );
  } else if (tags.length === 1 && tags[0] === 'experimental') {
    console.log(
      theme`{header An "experimental" release} {version ${version}} {header has been published!}`
    );
  } else {
    const nodeModulesPath = join(cwd, 'build/node_modules');

    console.log(
      theme.caution`The release has been published but you're not done yet!`
    );

    if (tags.includes('latest')) {
      // All packages are built from a single source revision,
      // so it is safe to read build info from any one of them.
      const arbitraryPackageName = packages[0];
      // FIXME: New build script does not output build-info.json. It's only used
      // by this post-publish print job, and only for "latest" releases, so I've
      // disabled it as a workaround so the publish script doesn't crash for
      // "next" and "experimental" pre-releases.
      const {commit} = readJsonSync(
        join(
          cwd,
          'build',
          'node_modules',
          arbitraryPackageName,
          'build-info.json'
        )
      );

      console.log();
      console.log(
        theme.header`Please review and commit all local, staged changes.`
      );

      console.log();
      console.log('Version numbers have been updated in the following files:');
      for (let i = 0; i < packages.length; i++) {
// ... (70 more lines)

Domain

Subdomains

Functions

Frequently Asked Questions

What does print-follow-up-instructions.js do?
print-follow-up-instructions.js is a source file in the react codebase, written in javascript. It belongs to the BabelCompiler domain, Entrypoint subdomain.
What functions are defined in print-follow-up-instructions.js?
print-follow-up-instructions.js defines 1 function(s): run.
Where is print-follow-up-instructions.js in the architecture?
print-follow-up-instructions.js is located at scripts/release/publish-commands/print-follow-up-instructions.js (domain: BabelCompiler, subdomain: Entrypoint, directory: scripts/release/publish-commands).

Analyze Your Own Codebase

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

Try Supermodel Free