Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
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: {}
});
}
}