How to use the bolt.projectUpgrade function in bolt

To help you get started, we’ve selected a few bolt 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 wwselleck / bolt-interactive / src / prompts / commands / upgrade.ts View on Github external
export default async function runUpgradePrompt() {
  const scope = await runScopeSelectPrompt({
    scopeTypes: [ScopeType.ALL, ScopeType.PROJECT]
  });
  const packagesInput = await runPackagesInputPrompt({
    message: 'What package(s) to upgrade?'
  });

  const packages: string[] = packagesInput.split(" ");
  if (scope.type === ScopeType.PROJECT) {
    await projectUpgrade({
      deps: packages.map(toDependency),
      flags: []
    });
  } else if (scope.type === ScopeType.ALL) {
    await workspacesUpgrade({
      deps: packages,
      filterOpts: [],
      flags: {}
    });
  }
}