@kamaalio/codemod-kit 0.0.37 → 0.0.38

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -516,6 +516,7 @@ async function codemodPostTransform(transformedContent) {
516
516
  async function runCodemodRunner(codemods, repositories, workingDirectory) {
517
517
  const codemodRepositoriesMappedByCodemodName = await prepareRepositoriesForCodemods(repositories, codemods, workingDirectory);
518
518
  const results = Object.fromEntries(await Promise.all(codemods.map(async (codemod)=>{
519
+ const start = performance.now();
519
520
  const codemodRepositories = codemodRepositoriesMappedByCodemodName[codemod.name];
520
521
  kamaal_namespaceObject.asserts.invariant(null != codemodRepositories, 'Codemod repositories should be present');
521
522
  const codemodWorkingDirectory = external_node_path_default().resolve(workingDirectory, codemod.name.replace(/\//g, '-'));
@@ -530,6 +531,8 @@ async function runCodemodRunner(codemods, repositories, workingDirectory) {
530
531
  postTransform: codemodPostTransform
531
532
  }
532
533
  });
534
+ const end = performance.now();
535
+ console.log(`\u{2728} '${codemod.name}' codemod took ${((end - start) / 1000).toFixed(2)} seconds`);
533
536
  return [
534
537
  codemod.name,
535
538
  result
@@ -551,7 +554,7 @@ async function prepareRepositoriesForCodemods(repositories, codemods, workingDir
551
554
  if (prepareResult.isErr()) throw prepareResult.error;
552
555
  return prepareResult.value;
553
556
  }));
554
- console.log(`\u{1F4CB} prepared the following repos for codemods!
557
+ console.log(`\u{1F4CB} prepared the following repos for codemods:
555
558
  \xb7 ${updatedRepositories.map((repo)=>repo.address).join("\n\xb7 ")}`);
556
559
  return Object.fromEntries(await Promise.all(codemods.map(async (codemod)=>{
557
560
  const codemodWorkingDirectory = external_node_path_default().resolve(workingDirectory, codemod.name.replace(/\//g, '-'));
package/dist/index.js CHANGED
@@ -467,6 +467,7 @@ async function codemodPostTransform(transformedContent) {
467
467
  async function runCodemodRunner(codemods, repositories, workingDirectory) {
468
468
  const codemodRepositoriesMappedByCodemodName = await prepareRepositoriesForCodemods(repositories, codemods, workingDirectory);
469
469
  const results = Object.fromEntries(await Promise.all(codemods.map(async (codemod)=>{
470
+ const start = performance.now();
470
471
  const codemodRepositories = codemodRepositoriesMappedByCodemodName[codemod.name];
471
472
  asserts.invariant(null != codemodRepositories, 'Codemod repositories should be present');
472
473
  const codemodWorkingDirectory = node_path.resolve(workingDirectory, codemod.name.replace(/\//g, '-'));
@@ -481,6 +482,8 @@ async function runCodemodRunner(codemods, repositories, workingDirectory) {
481
482
  postTransform: codemodPostTransform
482
483
  }
483
484
  });
485
+ const end = performance.now();
486
+ console.log(`\u{2728} '${codemod.name}' codemod took ${((end - start) / 1000).toFixed(2)} seconds`);
484
487
  return [
485
488
  codemod.name,
486
489
  result
@@ -502,7 +505,7 @@ async function prepareRepositoriesForCodemods(repositories, codemods, workingDir
502
505
  if (prepareResult.isErr()) throw prepareResult.error;
503
506
  return prepareResult.value;
504
507
  }));
505
- console.log(`\u{1F4CB} prepared the following repos for codemods!
508
+ console.log(`\u{1F4CB} prepared the following repos for codemods:
506
509
  \xb7 ${updatedRepositories.map((repo)=>repo.address).join("\n\xb7 ")}`);
507
510
  return Object.fromEntries(await Promise.all(codemods.map(async (codemod)=>{
508
511
  const codemodWorkingDirectory = node_path.resolve(workingDirectory, codemod.name.replace(/\//g, '-'));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kamaalio/codemod-kit",
3
- "version": "0.0.37",
3
+ "version": "0.0.38",
4
4
  "type": "module",
5
5
  "author": "Kamaal Farah",
6
6
  "license": "MIT",