Preheat oven to 350°F. Grease two 6-cavity donut pans or coat with baking spray.
Whisk flour, baking powder, baking soda, salt, cinnamon, ginger, and nutmeg in a large bowl.
In another bowl, whisk brown sugar, granulated sugar, eggs, oil, applesauce, vanilla, and milk until smooth.
Fold grated carrots into the wet mixture.
Add wet ingredients to dry. Stir gently until just combined. Fold in nuts if using.
Spoon or pipe batter into pans, filling each cavity about 3/4 full.
Bake 10–12 minutes, until the tops spring back and a tester comes out clean.
Cool 5 minutes in the pan, then transfer donuts to a rack to cool completely.
Beat cream cheese and powdered sugar until creamy. Mix in vanilla and enough milk to make a pourable glaze.
Dip cooled donuts in glaze or drizzle over tops. Let set a few minutes before serving.