How to use the just-scripts-utils.findMonoRepoRootPath function in just-scripts-utils

To help you get started, we’ve selected a few just-scripts-utils examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github microsoft / just / packages / just-scripts / src / tasks / upgradeRepoTask.ts View on Github external
return async function upgradeRepo() {
    const rootPath = findMonoRepoRootPath();

    if (!rootPath) {
      logger.error('Could not find monorepo root path. Not upgrading anything.');
      return;
    }

    const resolveStacks = getResolvedStackVersions(path.join(rootPath, 'scripts'));
    const stackDiffs = await getStackDiffs(rootPath, resolveStacks);

    if (stackDiffs) {
      let didUpgradeProjects = false;

      // For each package, look for stacks that match, and apply upgrade for the project
      const rushConfig = readRushJson(rootPath);
      if (!rushConfig) {
        logger.error(`Could not read rush.json under ${rootPath}. Not upgrading anything.`);
github microsoft / just / packages / just-scripts / src / tasks / addPackageTask.ts View on Github external
return async function addPackage() {
    const args = argv();
    const rootPath = findMonoRepoRootPath();

    const name =
      args.name ||
      (await prompts({
        type: 'text',
        name: 'name',
        message: 'What is the name of the package?'
      })).name;

    logger.info(`Creating a package called: ${name}`);

    if (!rootPath) {
      logger.warn('Cannot determine the root path to the mono repo');
      return;
    }
github microsoft / just / packages / just-scripts / src / tasks / addPackageTask.ts View on Github external
return async function addPackage() {
    const args = argv();
    const rootPath = findMonoRepoRootPath();

    const name =
      args.name ||
      (await prompts({
        type: 'text',
        name: 'name',
        message: 'What is the name of the package?'
      })).name;

    logger.info(`Creating a package called: ${name}`);

    if (!rootPath) {
      logger.warn('Cannot determine the root path to the mono repo');
      return;
    }