MCPcopy Index your code
hub / github.com/adobe/react-spectrum / promptVersions

Method promptVersions

scripts/bumpVersions.js:413–462  ·  view source on GitHub ↗
(versions)

Source from the content-addressed store, hash-verified

411 }
412
413 async promptVersions(versions) {
414 console.log('');
415 for (let [name, [oldVersion, newVersion, isPrivate]] of versions) {
416 if (newVersion !== oldVersion || isPrivate) {
417 console.log(
418 `${name}: ${chalk.blue(oldVersion)}${isPrivate ? chalk.red(' (private)') : ''} => ${chalk.green(newVersion)}`
419 );
420 }
421 }
422
423 let loggedSpace = false;
424 for (let name in this.workspacePackages) {
425 if (
426 !this.releasedPackages.has(name) &&
427 !excludedPackages.has(name) &&
428 !this.existingPackages.has(name)
429 ) {
430 let filePath = this.workspacePackages[name].location + '/package.json';
431 let pkg = JSON.parse(fs.readFileSync(filePath, 'utf8'));
432 if (!pkg.private) {
433 if (!loggedSpace) {
434 console.log('');
435 loggedSpace = true;
436 }
437
438 console.warn(chalk.red(`${name} will change from public to private`));
439 }
440 }
441 }
442
443 console.log('');
444
445 let rl = readline.createInterface({
446 input: process.stdin,
447 output: process.stdout
448 });
449
450 return new Promise((resolve, reject) => {
451 rl.question('Do you want to continue? (y/n) ', function (c) {
452 rl.close();
453 if (c === 'n') {
454 reject('Not continuing');
455 } else if (c === 'y') {
456 resolve();
457 } else {
458 reject('Invalid answer');
459 }
460 });
461 });
462 }
463
464 bumpVersions(versions) {
465 for (let [name, {location}] of this.releasedPackages) {

Callers 1

runMethod · 0.95

Calls 4

hasMethod · 0.65
closeMethod · 0.65
resolveFunction · 0.50
parseMethod · 0.45

Tested by

no test coverage detected