Repository: tailwindlabs/tailwindcss
File: packages/@tailwindcss-upgrade/src/index.ts (TypeScript)

Code before:

      let config = await prepareConfig(sheet.linkedConfigPath, { base })
      configBySheet.set(sheet, config)

      info(
        `Migrating JavaScript configuration file: ${highlight(relative(config.configFilePath, base))}`,
      )
      let jsConfigMigration = await migrateJsConfig(
        config.designSystem,
        config.configFilePath,
        base,
      )
      jsConfigMigrationBySheet.set(sheet, jsConfigMigration)

      if (jsConfigMigration !== null) {
        // Remove the JS config if it was fully migrated
        cleanup.push(() => fs.rm(config.configFilePath))
      }
    }

    // Migrate source files, linked to config files
    {
      // Template migrations
      for (let config of configBySheet.values()) {
        info(
          `Migrating templates using the provided configuration file: ${highlight(relative(config.configFilePath, base))}.`,
        )
        let set = new Set<string>()
        for (let globEntry of config.globs.flatMap((entry) => hoistStaticGlobParts(entry))) {
          let files = await globby([globEntry.pattern], {
            absolute: true,
            gitignore: true,
            cwd: globEntry.base,
          })

          for (let file of files) {
            set.add(file)
          }
        }

        let files = Array.from(set)
        files.sort()

        // Migrate each file
        await Promise.allSettled(
          files.map((file) => migrateTemplate(config.designSystem, config.userConfig, file)),
        )

        success('↳ Template migration complete.')
      }
    }

Review comment (suggestion):
```suggestion
          `Migrating templates found using configuration file: ${highlight(relative(config.configFilePath, base))}.`,
```

Code after:
      if (!sheet.isTailwindRoot) continue

      let config = await prepareConfig(sheet.linkedConfigPath, { base })
      configBySheet.set(sheet, config)

      let jsConfigMigration = await migrateJsConfig(
        config.designSystem,
        config.configFilePath,
        base,
      )
      jsConfigMigrationBySheet.set(sheet, jsConfigMigration)

      if (jsConfigMigration !== null) {
        // Remove the JS config if it was fully migrated
        cleanup.push(() => fs.rm(config.configFilePath))
      }

      if (jsConfigMigration !== null) {
        success(
          `↳ Migrated configuration file: ${highlight(relative(config.configFilePath, base))}`,
        )
      }
    }

    // Migrate source files, linked to config files
    info('Migrating templates…')
    {
      // Template migrations
      for (let config of configBySheet.values()) {
        let set = new Set<string>()
        for (let globEntry of config.globs.flatMap((entry) => hoistStaticGlobParts(entry))) {
          let files = await globby([globEntry.pattern], {
            absolute: true,
            gitignore: true,
            cwd: globEntry.base,
          })

          for (let file of files) {
            set.add(file)
          }
        }

        let files = Array.from(set)
        files.sort()

        // Migrate each file
        await Promise.allSettled(
          files.map((file) => migrateTemplate(config.designSystem, config.userConfig, file)),
        )

        success(